forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
143 lines (138 loc) · 4.94 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
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@v3
- uses: actions/setup-java@v3
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@v3
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@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Download Maven repository
uses: actions/download-artifact@v3
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/actions-setup-minikube@v2.7.1
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@v2
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 }}
openshift:
name: OpenShift Integration Tests
needs: cache
runs-on: ubuntu-latest
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@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Download Maven repository
uses: actions/download-artifact@v3
with:
name: maven-repo
path: .
- name: Extract Maven repository
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Set up OpenShift
uses: manusa/actions-setup-openshift@v1.1.4
with:
oc version: ${{ matrix.openshift }}
github token: ${{ secrets.GITHUB_TOKEN }}
- name: Quay login
uses: docker/login-action@v2
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
./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 }}