-
Notifications
You must be signed in to change notification settings - Fork 32
157 lines (147 loc) · 6.46 KB
/
minikube.yaml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: Minikube Tests
on:
pull_request:
branches: [ main ]
jobs:
wait-for-images:
runs-on: ubuntu-22.04
steps:
- name: Wait for Images
run: |
while true
do
if ! docker pull quay.io/redhat-user-workloads/konflux-jbs-pnc-tenant/jvm-build-service/build-request-processor:on-pr-${{ github.event.pull_request.head.sha }} ; then
echo "Failed to pull image 1"
sleep 10
continue
fi
if ! docker pull quay.io/redhat-user-workloads/konflux-jbs-pnc-tenant/jvm-build-service/cache:on-pr-${{ github.event.pull_request.head.sha }} ; then
echo "Failed to pull image 2"
sleep 10
continue
fi
if ! docker pull quay.io/redhat-user-workloads/konflux-jbs-pnc-tenant/jvm-build-service/controller:on-pr-${{ github.event.pull_request.head.sha }} ; then
echo "Failed to pull image 3"
sleep 10
continue
fi
exit 0
done
run-ab-based-tests:
strategy:
fail-fast: false
matrix:
abtestsets:
- "test-repos"
- "build-systems"
- "commons"
needs: [wait-for-images]
runs-on: ubuntu-22.04
name: Minikube Artifact Build Matrix
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
android: true
dotnet: true
haskell: true
docker-images: false
large-packages: true
swap-storage: false
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Registry
run: |
export DEV_IP=172.16.1.1
sudo ifconfig lo:0 $DEV_IP
docker run -d -p 5000:5000 --restart=always registry:2
sudo echo '{ "insecure-registries": ["172.16.1.1:5000"] }' | sudo tee /etc/docker/daemon.json
- name: Start minikube
uses: medyagh/setup-minikube@d8c0eb871f6f455542491d86a574477bd3894533 # v0.0.18
with:
cpus: max
memory: max
insecure-registry: '172.16.1.1:5000'
- name: Run Tests
run: |
export SHELL=/bin/bash
export DEV_IP=172.16.1.1
export JBS_WORKER_NAMESPACE=jvm-build-service-test-namespace-$(shuf -er -n5 {a..z} {0..9} | tr -d '\n')
export MAVEN_USERNAME=admin
export MAVEN_PASSWORD=secret
export MAVEN_REPOSITORY="http://jvm-build-maven-repo.${JBS_WORKER_NAMESPACE}.svc.cluster.local/releases"
export JBS_QUAY_ORG=redhat-user-workloads
export JBS_QUAY_IMAGE_TAG=on-pr-${{ github.event.pull_request.head.sha }}
export JBS_QUAY_IMAGE_CONTROLLER=konflux-jbs-pnc-tenant/jvm-build-service/controller
export JVM_BUILD_SERVICE_IMAGE=quay.io/$JBS_QUAY_ORG/$JBS_QUAY_IMAGE_CONTROLLER:$JBS_QUAY_IMAGE_TAG
export JVM_BUILD_SERVICE_CACHE_IMAGE=quay.io/$JBS_QUAY_ORG/konflux-jbs-pnc-tenant/jvm-build-service/cache:$JBS_QUAY_IMAGE_TAG
export JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE=quay.io/$JBS_QUAY_ORG/konflux-jbs-pnc-tenant/jvm-build-service/build-request-processor:$JBS_QUAY_IMAGE_TAG
echo "Using worker namespace $JBS_WORKER_NAMESPACE DEV_IP $DEV_IP JVM_BUILD_SERVICE_IMAGE $JVM_BUILD_SERVICE_IMAGE"
eval $(minikube -p minikube docker-env)
export ABTESTSET=${{ matrix.abtestsets }}
echo "Using ABTESTSET $ABTESTSET"
./deploy/minikube-ci.sh
make minikube-test
- name: Archive Report
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: matrix-report-${{ matrix.abtestsets }}
path: /tmp/jvm-build-service-report
run-db-based-tests:
strategy:
fail-fast: false
matrix:
dbtestsets:
- "jakartaee"
needs: [wait-for-images]
runs-on: ubuntu-22.04
name: Minikube Dependency Build Matrix
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
android: true
dotnet: true
haskell: true
docker-images: false
large-packages: true
swap-storage: false
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Registry
run: |
export DEV_IP=172.16.1.1
sudo ifconfig lo:0 $DEV_IP
docker run -d -p 5000:5000 --restart=always registry:2
sudo echo '{ "insecure-registries": ["172.16.1.1:5000"] }' | sudo tee /etc/docker/daemon.json
- name: Start minikube
uses: medyagh/setup-minikube@d8c0eb871f6f455542491d86a574477bd3894533 # v0.0.18
with:
cpus: max
memory: max
insecure-registry: '172.16.1.1:5000'
- name: Run Tests
run: |
export SHELL=/bin/bash
export DEV_IP=172.16.1.1
export JBS_WORKER_NAMESPACE=jvm-build-service-test-namespace-$(shuf -er -n5 {a..z} {0..9} | tr -d '\n')
export MAVEN_USERNAME=admin
export MAVEN_PASSWORD=secret
export MAVEN_REPOSITORY="http://jvm-build-maven-repo.${JBS_WORKER_NAMESPACE}.svc.cluster.local/releases"
export JBS_QUAY_ORG=redhat-user-workloads
export JBS_QUAY_IMAGE_TAG=on-pr-${{ github.event.pull_request.head.sha }}
export JBS_QUAY_IMAGE_CONTROLLER=konflux-jbs-pnc-tenant/jvm-build-service/controller
export JVM_BUILD_SERVICE_IMAGE=quay.io/$JBS_QUAY_ORG/$JBS_QUAY_IMAGE_CONTROLLER:$JBS_QUAY_IMAGE_TAG
export JVM_BUILD_SERVICE_CACHE_IMAGE=quay.io/$JBS_QUAY_ORG/konflux-jbs-pnc-tenant/jvm-build-service/cache:$JBS_QUAY_IMAGE_TAG
export JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE=quay.io/$JBS_QUAY_ORG/konflux-jbs-pnc-tenant/jvm-build-service/build-request-processor:$JBS_QUAY_IMAGE_TAG
echo "Using worker namespace $JBS_WORKER_NAMESPACE DEV_IP $DEV_IP JVM_BUILD_SERVICE_IMAGE $JVM_BUILD_SERVICE_IMAGE"
eval $(minikube -p minikube docker-env)
export DBTESTSET=${{ matrix.dbtestsets }}
echo "Using DBTESTSET $DBTESTSET"
./deploy/minikube-ci.sh
make minikube-test
- name: Archive Report
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
if: always()
with:
name: matrix-report-${{ matrix.dbtestsets }}
path: /tmp/jvm-build-service-report