-
Notifications
You must be signed in to change notification settings - Fork 1.4k
173 lines (170 loc) · 7.16 KB
/
quickstart_microprofile-config_ci.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
name: WildFly microprofile-config Quickstart CI
env:
QUICKSTART_PATH: microprofile-config
MICROPROFILE: true
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'microprofile-config/**'
jobs:
Test-build-default-matrix:
name: BUILD DEFAULT - JDK${{ matrix.jdk }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
jdk: [11, 17]
os: [ubuntu-20.04, windows-latest]
steps:
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
with:
path: quickstarts
- name: Set up JDK ${{ matrix.java }}
uses: AdoptOpenJDK/install-jdk@v1
with:
version: ${{ matrix.jdk }}
impl: hotspot
- name: Build ${{ env.QUICKSTART_PATH }} Quickstart for Release
run: |
cd quickstarts
cd ${{ env.QUICKSTART_PATH }}
mvn -U -B -fae clean install -Drelease
shell: bash
- name: Build, run & test ${{ env.QUICKSTART_PATH }} Quickstart with provisioned-server profile
if: ${{ env.MICROPROFILE == 'false' }}
run: |
cd quickstarts
cd ${{ env.QUICKSTART_PATH }}
echo "Building provisioned server..."
mvn -U -B -fae clean package -Pprovisioned-server
echo "Starting provisioned server..."
mvn -U -B -fae wildfly:start -DjbossHome=target/server
echo "Testing provisioned server..."
mvn -U -B -fae verify -Dserver.host=http://localhost:8080 -Pintegration-testing
echo "Shutting down provisioned server..."
mvn -U -B -fae wildfly:shutdown
shell: bash
- name: Build, run & test ${{ env.QUICKSTART_PATH }} Quickstart with bootable-jar profile
if: ${{ env.MICROPROFILE == 'true' }}
run: |
cd quickstarts
cd ${{ env.QUICKSTART_PATH }}
echo "Building bootable jar..."
mvn -U -B -fae clean package -Pbootable-jar
echo "Starting bootable jar..."
mvn -U -B -fae wildfly-jar:start -Djar-file-name=target/${{ env.QUICKSTART_PATH }}-bootable.jar
echo "Testing bootable jar..."
mvn -U -B -fae verify -Dserver.host=http://localhost:8080 -Pintegration-testing
echo "Shutting down bootable jar..."
mvn -U -B -fae wildfly-jar:shutdown
shell: bash
- name: Build ${{ env.QUICKSTART_PATH }} Quickstart with openshift profile
run: |
cd quickstarts
cd ${{ env.QUICKSTART_PATH }}
mvn -U -B -fae clean package -Popenshift
shell: bash
- uses: actions/upload-artifact@v3
if: failure()
with:
name: surefire-reports-JDK${{ matrix.jdk }}-${{ matrix.os }}
path: 'quickstarts/$QUICKSTART_PATH/**/surefire-reports/*.txt'
Test-build-with-deps-matrix:
name: BUILD WITH DEPS - JDK${{ matrix.jdk }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
jdk: [11, 17]
os: [ubuntu-20.04, windows-latest]
steps:
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
with:
repository: wildfly/wildfly
ref: ${{ github.base_ref }}
path: wildfly
- uses: actions/checkout@v2
with:
repository: wildfly/boms
ref: ${{ github.base_ref }}
path: boms
- uses: actions/checkout@v2
with:
path: quickstarts
- name: Set up JDK ${{ matrix.java }}
uses: AdoptOpenJDK/install-jdk@v1
with:
version: ${{ matrix.jdk }}
impl: hotspot
- name: Build Server
run: |
cd wildfly
mvn -U -B -fae -DskipTests clean install
shell: bash
- name: Get Server Version
run: |
cd wildfly
echo "VERSION_SERVER=$(mvn -N org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
shell: bash
- name: Build BOMs with Server Version
run: |
cd boms
mvn -U -B -fae clean install -Dversion.server=${{ env.VERSION_SERVER }}
shell: bash
- name: Get BOMs Version
run: |
cd boms
echo "VERSION_BOMS=$(mvn -N org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
shell: bash
- name: Build Quickstart for Release with Server and BOMs Versions
run: |
cd quickstarts
cd ${{ env.QUICKSTART_PATH }}
mvn -U -B -fae clean package -Drelease -Dversion.bom.ee=${{ env.VERSION_BOMS }} -Dversion.bom.microprofile=${{ env.VERSION_BOMS }} -Dversion.server=${{ env.VERSION_SERVER }}
shell: bash
- name: Build, run & test ${{ env.QUICKSTART_PATH }} Quickstart with provisioned-server profile, Server and BOMs Versions
if: ${{ env.MICROPROFILE == 'false' }}
run: |
cd quickstarts
cd ${{ env.QUICKSTART_PATH }}
echo "Building provisioned server..."
mvn -U -B -fae clean package -Pprovisioned-server -Dversion.bom.ee=${{ env.VERSION_BOMS }} -Dversion.bom.microprofile=${{ env.VERSION_BOMS }} -Dversion.server=${{ env.VERSION_SERVER }}
echo "Starting provisioned server..."
mvn -U -B -fae wildfly:start -DjbossHome=target/server
echo "Testing provisioned server..."
mvn -U -B -fae verify -Dserver.host=http://localhost:8080 -Pintegration-testing
echo "Shutting down provisioned server..."
mvn -U -B -fae wildfly:shutdown
shell: bash
- name: Build, run & test ${{ env.QUICKSTART_PATH }} Quickstart with bootable-jar profile, Server and BOMs Versions
if: ${{ env.MICROPROFILE == 'true' }}
run: |
cd quickstarts
cd ${{ env.QUICKSTART_PATH }}
echo "Building bootable jar..."
mvn -U -B -fae clean package -Pbootable-jar -Dversion.bom.ee=${{ env.VERSION_BOMS }} -Dversion.bom.microprofile=${{ env.VERSION_BOMS }} -Dversion.server=${{ env.VERSION_SERVER }}
echo "Starting bootable jar..."
mvn -U -B -fae wildfly-jar:start -Djar-file-name=target/${{ env.QUICKSTART_PATH }}-bootable.jar
echo "Testing bootable jar..."
mvn -U -B -fae verify -Dserver.host=http://localhost:8080 -Pintegration-testing
echo "Shutting down bootable jar..."
mvn -U -B -fae wildfly-jar:shutdown
shell: bash
- name: Build ${{ env.QUICKSTART_PATH }} Quickstart with openshift profile, Server and BOMs Versions
run: |
cd quickstarts
cd ${{ env.QUICKSTART_PATH }}
mvn -U -B -fae clean package -Popenshift -Dversion.bom.ee=${{ env.VERSION_BOMS }} -Dversion.bom.microprofile=${{ env.VERSION_BOMS }} -Dversion.server=${{ env.VERSION_SERVER }}
shell: bash
- uses: actions/upload-artifact@v3
if: failure()
with:
name: surefire-reports-JDK${{ matrix.jdk }}-${{ matrix.os }}
path: 'quickstarts/**/surefire-reports/*.txt'