forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
200 lines (193 loc) · 7.1 KB
/
ci-kubernetes.yml
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
name: Quarkus CI - Kubernetes
on:
workflow_dispatch:
schedule:
# 2am every weekday + saturday
- cron: '0 2 * * 1-6'
env:
MAVEN_ARGS: -B -e
jobs:
cache:
name: Build and save artifacts
runs-on: ubuntu-latest
if: "github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch'"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install artifacts
run: ./mvnw ${MAVEN_ARGS} -DskipTests -DskipITs -Dinvoker.skip clean install -pl :quarkus-integration-test-kubernetes-invoker -am
- name: Tar Maven repository
shell: bash
run: tar -I 'pigz -9' -cf maven-repo.tgz -C ~ .m2/repository
- name: Persist Maven repository
uses: actions/upload-artifact@v4
with:
name: maven-repo
path: maven-repo.tgz
retention-days: 1
kubernetes:
name: Kubernetes Integration Tests
needs: cache
runs-on: ubuntu-latest
if: "github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch'"
strategy:
fail-fast: false
matrix:
kubernetes: [v1.20.1]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Download Maven repository
uses: actions/download-artifact@v4
with:
name: maven-repo
path: .
- name: Extract Maven repository
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Set up Minikube-Kubernetes
uses: manusa/[email protected]
with:
minikube version: v1.16.0
kubernetes version: ${{ matrix.kubernetes }}
github token: ${{ secrets.GITHUB_TOKEN }}
start args: '--addons=metrics-server --force'
- name: Quay login
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_QUARKUSCI_USERNAME }}
password: ${{ secrets.QUAY_QUARKUSCI_PASSWORD }}
- name: Run Kubernetes Invoker Tests
run: |
export QUARKUS_CONTAINER_IMAGE_GROUP=quarkustesting
export QUARKUS_CONTAINER_IMAGE_TAG=${{ github.sha }}
export QUARKUS_CONTAINER_IMAGE_REGISTRY=quay.io
./mvnw ${MAVEN_ARGS} clean install -pl :quarkus-integration-test-kubernetes-invoker -De2e-tests -Dkubernetes-e2e-tests
- name: Report status
if: "always() && github.repository == 'quarkusio/quarkus'"
shell: bash
run: |
curl -Ls https://sh.jbang.dev | bash -s - app setup
~/.jbang/bin/jbang .github/NativeBuildReport.java \
issueNumber=26581 \
runId=${{ github.run_id }} \
status=${{ job.status }} \
token=${{ secrets.GITHUB_API_TOKEN }} \
issueRepo=${{ github.repository }} \
thisRepo=${{ github.repository }}
knative:
name: Knative Integration Tests
needs: cache
runs-on: ubuntu-latest
if: "github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch'"
strategy:
fail-fast: false
matrix:
kubernetes: [v1.20.1]
knative: [v1.2.0]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Download Maven repository
uses: actions/download-artifact@v4
with:
name: maven-repo
path: .
- name: Extract Maven repository
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Kubernetes KinD Cluster
uses: container-tools/kind-action@v2
with:
version: v0.11.1
registry: true
kubectl_version: ${{ matrix.kubernetes }}
knative_serving: ${{ matrix.knative }}
- name: Run Knative Invoker Tests
run: |
kubectl create namespace knative-tests
kubectl config set-context --current --namespace=knative-tests
export QUARKUS_CONTAINER_IMAGE_GROUP=quarkustesting
export QUARKUS_CONTAINER_IMAGE_TAG=${{ github.sha }}
export QUARKUS_CONTAINER_IMAGE_REGISTRY=$KIND_REGISTRY
export QUARKUS_CONTAINER_IMAGE_INSECURE=true
./mvnw ${MAVEN_ARGS} clean install -pl :quarkus-integration-test-kubernetes-invoker -De2e-tests -Dknative-e2e-tests
- name: Report status
if: "always() && github.repository == 'quarkusio/quarkus'"
shell: bash
run: |
curl -Ls https://sh.jbang.dev | bash -s - app setup
~/.jbang/bin/jbang .github/NativeBuildReport.java \
issueNumber=31837 \
runId=${{ github.run_id }} \
status=${{ job.status }} \
token=${{ secrets.GITHUB_API_TOKEN }} \
issueRepo=${{ github.repository }} \
thisRepo=${{ github.repository }}
openshift:
name: OpenShift Integration Tests
needs: cache
runs-on: ubuntu-20.04
if: "github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch'"
strategy:
fail-fast: false
matrix:
openshift: [v3.11.0]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Download Maven repository
uses: actions/download-artifact@v4
with:
name: maven-repo
path: .
- name: Extract Maven repository
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Set up OpenShift
uses: manusa/[email protected]
with:
oc version: ${{ matrix.openshift }}
github token: ${{ secrets.GITHUB_TOKEN }}
- name: Quay login
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_QUARKUSCI_USERNAME }}
password: ${{ secrets.QUAY_QUARKUSCI_PASSWORD }}
- name: Run OpenShift Invoker Tests
run: |
export QUARKUS_CONTAINER_IMAGE_GROUP=quarkustesting
export QUARKUS_CONTAINER_IMAGE_TAG=${{ github.sha }}
export QUARKUS_CONTAINER_IMAGE_REGISTRY=quay.io
export QUARKUS_CONTAINER_IMAGE_USERNAME=${{ secrets.QUAY_QUARKUSCI_USERNAME }}
export QUARKUS_CONTAINER_IMAGE_PASSWORD=${{ secrets.QUAY_QUARKUSCI_PASSWORD }}
./mvnw ${MAVEN_ARGS} clean install -pl :quarkus-integration-test-kubernetes-invoker -De2e-tests -Dopenshift-e2e-tests
- name: Report status
if: "always() && github.repository == 'quarkusio/quarkus'"
shell: bash
run: |
curl -Ls https://sh.jbang.dev | bash -s - app setup
~/.jbang/bin/jbang .github/NativeBuildReport.java \
issueNumber=26582 \
runId=${{ github.run_id }} \
status=${{ job.status }} \
token=${{ secrets.GITHUB_API_TOKEN }} \
issueRepo=${{ github.repository }} \
thisRepo=${{ github.repository }}