13
13
- ' .github/workflows/webserver.yml'
14
14
15
15
jobs :
16
- webserver-build-test-ubuntu-x64 :
17
- name : webserver-ubuntu-build-x64
16
+ webserver-build-test-ubuntu :
17
+ name : webserver-ubuntu-build
18
18
runs-on : ubuntu-20.04
19
19
steps :
20
20
- name : checkout otel webserver
24
24
uses : docker/setup-buildx-action@master
25
25
with :
26
26
install : true
27
- platforms : linux/amd64
28
27
- name : cache docker layers
29
28
uses : actions/cache@v3
30
29
with :
@@ -35,18 +34,18 @@ jobs:
35
34
- name : setup docker image
36
35
run : |
37
36
cd instrumentation/otel-webserver-module
38
- docker buildx build -t apache_ubuntu_amd64 -f docker/ubuntu20.04/Dockerfile \
39
- --cache-from type=local,src=/tmp/buildx-cache/apache_ubuntu_amd64 \
40
- --cache-to type=local,dest=/tmp/buildx-cache/apache_ubuntu_amd64 -new \
37
+ docker buildx build -t apache_ubuntu -f docker/ubuntu20.04/Dockerfile \
38
+ --cache-from type=local,src=/tmp/buildx-cache/apache_ubuntu \
39
+ --cache-to type=local,dest=/tmp/buildx-cache/apache_ubuntu -new \
41
40
--load .
42
41
- name : build
43
42
run : |
44
- docker run -idt --name apache_ubuntu_container_amd64 apache_ubuntu_amd64 /bin/bash
43
+ docker run -idt --name apache_ubuntu_container apache_ubuntu /bin/bash
45
44
cd instrumentation/otel-webserver-module
46
- docker exec apache_ubuntu_container_amd64 bash -c \
45
+ docker exec apache_ubuntu_container bash -c \
47
46
'cd /otel-webserver-module; rm -rf *;'
48
- docker cp . $(docker inspect --format="{{.Id}}" apache_ubuntu_container_amd64 ):/otel-webserver-module/
49
- docker exec apache_ubuntu_container_amd64 bash -c \
47
+ docker cp . $(docker inspect --format="{{.Id}}" apache_ubuntu_container ):/otel-webserver-module/
48
+ docker exec apache_ubuntu_container bash -c \
50
49
'cd /otel-webserver-module; rm -rf build; \
51
50
cp -r /dependencies /otel-webserver-module/; \
52
51
cp -r /build-dependencies /otel-webserver-module/; \
55
54
56
55
- name : update cache
57
56
run : |
58
- rm -rf /tmp/buildx-cache/apache_ubuntu_amd64
59
- mv /tmp/buildx-cache/apache_ubuntu_amd64 -new /tmp/buildx-cache/apache_ubuntu_amd64
57
+ rm -rf /tmp/buildx-cache/apache_ubuntu
58
+ mv /tmp/buildx-cache/apache_ubuntu -new /tmp/buildx-cache/apache_ubuntu
60
59
61
60
webserver-build-test-ubuntu-arm64 :
62
61
name : webserver-ubuntu-build-arm64
82
81
- name : setup docker image
83
82
run : |
84
83
cd instrumentation/otel-webserver-module
85
- docker buildx build -t apache_ubuntu_arm64 -f docker/ubuntu20.04/Dockerfile \
84
+ docker buildx build -t apache_ubuntu_arm64 -f docker/ubuntu20.04-arm64 /Dockerfile \
86
85
--cache-from type=local,src=/tmp/buildx-cache/apache_ubuntu_arm64 \
87
86
--cache-to type=local,dest=/tmp/buildx-cache/apache_ubuntu_arm64-new \
88
87
--load . --platform linux/arm64
@@ -128,8 +127,8 @@ jobs:
128
127
# sleep 30
129
128
# ./gradlew :test:integration:integrationTests -i
130
129
131
- webserver-build-test-centos7-x64 :
132
- name : webserver-centos7-build-x64
130
+ webserver-build-test-centos7 :
131
+ name : webserver-centos7-build
133
132
runs-on : ubuntu-20.04
134
133
steps :
135
134
- name : checkout otel webserver
@@ -139,7 +138,6 @@ jobs:
139
138
uses : docker/setup-buildx-action@master
140
139
with :
141
140
install : true
142
- platforms : linux/amd64
143
141
# - name: cache docker layers
144
142
# uses: actions/cache@v3
145
143
# with:
@@ -150,43 +148,43 @@ jobs:
150
148
- name : setup docker image
151
149
run : |
152
150
cd instrumentation/otel-webserver-module
153
- docker buildx build -t apache_centos7_amd64 -f docker/centos7/Dockerfile \
151
+ docker buildx build -t apache_centos7 -f docker/centos7/Dockerfile \
154
152
--load .
155
153
- name : build
156
154
run : |
157
- docker run -idt --name apache_centos7_container_amd64 apache_centos7_amd64 /bin/bash
155
+ docker run -idt --name apache_centos7_container apache_centos7 /bin/bash
158
156
cd instrumentation/otel-webserver-module
159
- docker exec apache_centos7_container_amd64 bash -c \
157
+ docker exec apache_centos7_container bash -c \
160
158
'cd /otel-webserver-module; rm -rf *;'
161
- docker cp . $(docker inspect --format="{{.Id}}" apache_centos7_container_amd64 ):/otel-webserver-module/
162
- docker exec apache_centos7_container_amd64 bash -c \
159
+ docker cp . $(docker inspect --format="{{.Id}}" apache_centos7_container ):/otel-webserver-module/
160
+ docker exec apache_centos7_container bash -c \
163
161
'cd /otel-webserver-module; rm -rf build; \
164
162
cp -r /dependencies /otel-webserver-module/; \
165
163
cp -r /build-dependencies /otel-webserver-module/; \
166
164
./gradlew assembleWebServerModule'
167
165
- name : unit test
168
166
run : |
169
- docker exec apache_centos7_container_amd64 bash -c \
167
+ docker exec apache_centos7_container bash -c \
170
168
'cd /otel-webserver-module; ./gradlew runUnitTest'
171
169
# - name: update cache
172
170
# run: |
173
- # rm -rf /tmp/buildx-cache/apache_centos7_amd64
174
- # mv /tmp/buildx-cache/apache_centos7_amd64 -new /tmp/buildx-cache/apache_centos7_amd64
171
+ # rm -rf /tmp/buildx-cache/apache_centos7
172
+ # mv /tmp/buildx-cache/apache_centos7 -new /tmp/buildx-cache/apache_centos7
175
173
- name : copy artifacts
176
174
id : artifacts
177
175
run : |
178
176
cd instrumentation/otel-webserver-module
179
- mkdir -p /tmp/apache_centos7_amd64 /
180
- docker cp apache_centos7_container_amd64 :/otel-webserver-module/build/opentelemetry-webserver-sdk-x64-linux.tgz \
181
- /tmp/apache_centos7_amd64 /
177
+ mkdir -p /tmp/apache_centos7 /
178
+ docker cp apache_centos7_container :/otel-webserver-module/build/opentelemetry-webserver-sdk-x64-linux.tgz \
179
+ /tmp/apache_centos7 /
182
180
- name : upload artifacts
183
181
uses : actions/upload-artifact@v3
184
182
with :
185
183
name : opentelemetry-webserver-sdk-x64-linux.tgz
186
- path : /tmp/apache_centos7_amd64 /opentelemetry-webserver-sdk-x64-linux.tgz
184
+ path : /tmp/apache_centos7 /opentelemetry-webserver-sdk-x64-linux.tgz
187
185
- name : run integrationtest
188
186
run : |
189
- docker rm -f apache_centos7_container_amd64
187
+ docker rm -f apache_centos7_container
190
188
cd instrumentation/otel-webserver-module
191
189
docker compose --profile centos7 up -d
192
190
docker ps -a
@@ -217,10 +215,8 @@ jobs:
217
215
- name : setup docker image
218
216
run : |
219
217
cd instrumentation/otel-webserver-module
220
- docker buildx build -t apache_centos7_arm64 -f docker/centos7/Dockerfile \
221
- --load . --platform linux/arm64 --build-arg BUILD_ARCH='arm64' \
222
- --build-arg CMAKE_ARCH='aarch64' --build-arg GOSU_ARCH='arm64' \
223
- --build-arg JDK_ARCH='aarch64' --build-arg NGINX_ARCH='aarch64'
218
+ docker buildx build -t apache_centos7_arm64 -f docker/centos7-arm64/Dockerfile \
219
+ --load . --platform linux/arm64
224
220
- name : build
225
221
run : |
226
222
docker run -idt --platform linux/arm64 --name apache_centos7_container_arm64 apache_centos7_arm64 /bin/bash
0 commit comments