Skip to content

Commit b9dbd9a

Browse files
fixes
1 parent 68bec88 commit b9dbd9a

File tree

3 files changed

+379
-3
lines changed

3 files changed

+379
-3
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: webserver centos9
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
webserver-build-test-centos9:
8+
name: webserver-centos9-build
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: checkout otel webserver
12+
uses: actions/checkout@v4
13+
- name: setup buildx
14+
id: buildx
15+
uses: docker/setup-buildx-action@master
16+
with:
17+
install: true
18+
# - name: cache docker layers
19+
# uses: actions/cache@v3
20+
# with:
21+
# path: /tmp/buildx-cache/
22+
# key: apache-centos9-${{ github.sha }}
23+
# restore-keys: |
24+
# apache-centos9
25+
- name: setup docker image
26+
run: |
27+
cd instrumentation/otel-webserver-module
28+
docker buildx build -t apache_centos9 -f docker/centos9/Dockerfile \
29+
--load .
30+
- name: build
31+
run: |
32+
docker run -idt --name apache_centos9_container apache_centos9 /bin/bash
33+
cd instrumentation/otel-webserver-module
34+
docker exec apache_centos9_container bash -c \
35+
'cd /otel-webserver-module; rm -rf *;'
36+
docker cp . $(docker inspect --format="{{.Id}}" apache_centos9_container):/otel-webserver-module/
37+
docker exec apache_centos9_container bash -c \
38+
'cd /otel-webserver-module; rm -rf build; \
39+
cp -r /dependencies /otel-webserver-module/; \
40+
cp -r /build-dependencies /otel-webserver-module/; \
41+
./gradlew assembleWebServerModule'
42+
- name: unit test
43+
run: |
44+
docker exec apache_centos9_container bash -c \
45+
'cd /otel-webserver-module; ./gradlew runUnitTest'
46+
# - name: update cache
47+
# run: |
48+
# rm -rf /tmp/buildx-cache/apache_centos9
49+
# mv /tmp/buildx-cache/apache_centos9-new /tmp/buildx-cache/apache_centos9
50+
- name: copy artifacts
51+
id: artifacts
52+
run: |
53+
cd instrumentation/otel-webserver-module
54+
mkdir -p /tmp/apache_centos9/
55+
docker cp apache_centos9_container:/otel-webserver-module/build/opentelemetry-webserver-sdk-x64-linux.tgz \
56+
/tmp/apache_centos9/
57+
- name: upload artifacts
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: opentelemetry-webserver-sdk-x64-linux.tgz
61+
path: /tmp/apache_centos9/opentelemetry-webserver-sdk-x64-linux.tgz

instrumentation/otel-webserver-module/docker/centos8/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ ARG PERL_VERSION="5.20.2"
2727
ARG PERL_CPANVERSION="5.0"
2828
ARG PCRE_VERSION="8.44"
2929
ARG NGINX_VERSION="1.29.3"
30-
ARG GCC_TOOLSET="14.2"
3130

3231
# create default non-root user
3332
RUN groupadd -r swuser && useradd -u 1000 -g swuser -m -s /sbin/nologin -c "default non-root user" swuser
@@ -59,10 +58,10 @@ RUN yum install -y epel-release && \
5958

6059

6160
# install devtoolset toolchain
62-
RUN dnf install -y gcc-toolset-${GCC_TOOLSET} && \
61+
RUN dnf install -y gcc-toolset-9 && \
6362
dnf clean all
6463

65-
ENV PATH="/opt/rh/gcc-toolset-${GCC_TOOLSET}/root/usr/bin:${PATH}"
64+
ENV PATH="/opt/rh/gcc-toolset-9/root/usr/bin:${PATH}"
6665

6766
# install python 2.7.8
6867
RUN wget http://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz \

0 commit comments

Comments
 (0)