-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
71 lines (55 loc) · 3.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
# Makefile for Any Package
#
include $(wildcard unibuild/unibuild.make)
default:
@echo "Run 'make rpm-test' or 'make deb-test' to initiate container based test environment running PS Microdep."
@echo "Run 'make clean-test' to bring down running system test environment."
unibuild-compose.yml:
@echo "Fetching unibuild docker compose file..."
@wget -O unibuild-compose.yml https://raw.githubusercontent.com/perfsonar/unibuild/main/docker-envs/docker-compose.yml
pstracetree:
@echo "Cloning pstracetree..."
git clone https://github.com/perfsonar/pstracetree.git
pstracetree/unibuild-repo/RPMS: pstracetree unibuild-compose.yml
@echo "Build pstracetree EL9 rpms..."
cp unibuild-compose.yml pstracetree/
cd pstracetree && docker compose -f unibuild-compose.yml run el9 bash -c "dnf update && unibuild build"
pstracetree/unibuild-repo/Packages: pstracetree unibuild-compose.yml
@echo "Build pstracetree U22 deb packages..."
cp unibuild-compose.yml pstracetree/
cd pstracetree && docker compose -f unibuild-compose.yml run u22_amd64 bash -c "apt update && unibuild build"
unibuild-repo/RPMS: unibuild-compose.yml
@echo "Build Microdep EL9 rpms..."
docker compose -f unibuild-compose.yml run el9 bash -c "dnf update && unibuild build"
unibuild-repo/Packages: unibuild-compose.yml
@echo "Build Microdep U22 deb packages..."
docker compose -f unibuild-compose.yml run u22_amd64 bash -c "apt update && unibuild build"
rpm-build: pstracetree/unibuild-repo/RPMS unibuild-repo/RPMS
@echo "Building rpm system test environment (containers) for PS Microdep..."
DISTRO=el9 docker compose -f microdep/tests/system-test.yml --project-directory . build
rpm-test: clean-rpm-test rpm-build
@echo "Starting rpm system test environment (containers) for PS Microdep..."
DISTRO=el9 docker compose -f microdep/tests/system-test.yml --project-directory . up
deb-build: unibuild-repo/Packages
@echo "Building deb system test environment (containers) for PS Microdep..."
DISTRO=u22 docker compose -f microdep/tests/system-test.yml --project-directory . build
deb-test: clean-deb-test deb-build
@echo "Starting deb system test environment (containers) for PS Microdep..."
DISTRO=u22 docker compose -f microdep/tests/system-test.yml --project-directory . up
clean-rpm-test:
@echo "Clean up rpm tests of PS Microdep..."
-DISTRO=el9 docker compose -f microdep/tests/system-test.yml --project-directory . down
clean-deb-test:
@echo "Clean up deb tests of PS Microdep..."
-DISTRO=u22 docker compose -f microdep/tests/system-test.yml --project-directory . down
clean-rpm-build: unibuild-compose.yml
@echo "Removing locally built rpm repos..."
-cp unibuild-compose.yml pstracetree/
-cd pstracetree && docker compose -f unibuild-compose.yml run el9 unibuild clean
-docker compose -f unibuild-compose.yml run el9 unibuild clean
clean-deb-build: unibuild-compose.yml
@echo "Removing locally built deb repos..."
-cp unibuild-compose.yml pstracetree/
-cd pstracetree && docker compose -f unibuild-compose.yml run u22_amd64 unibuild clean
-docker compose -f unibuild-compose.yml run u22_amd64 unibuild clean