Skip to content

Commit 7db9acf

Browse files
Adding support for Centos8
1 parent cf45cc9 commit 7db9acf

File tree

5 files changed

+383
-6
lines changed

5 files changed

+383
-6
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: webserver centos8
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
webserver-build-test-centos8:
8+
name: webserver-centos8-build
9+
runs-on: ubuntu-20.04
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-centos8-${{ github.sha }}
23+
# restore-keys: |
24+
# apache-centos8
25+
- name: setup docker image
26+
run: |
27+
cd instrumentation/otel-webserver-module
28+
docker buildx build -t apache_centos8 -f docker/centos8/Dockerfile \
29+
--load .
30+
- name: build
31+
run: |
32+
docker run -idt --name apache_centos8_container apache_centos8 /bin/bash
33+
cd instrumentation/otel-webserver-module
34+
docker exec apache_centos8_container bash -c \
35+
'cd /otel-webserver-module; rm -rf *;'
36+
docker cp . $(docker inspect --format="{{.Id}}" apache_centos8_container):/otel-webserver-module/
37+
docker exec apache_centos8_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_centos8_container bash -c \
45+
'cd /otel-webserver-module; ./gradlew runUnitTest'
46+
# - name: update cache
47+
# run: |
48+
# rm -rf /tmp/buildx-cache/apache_centos8
49+
# mv /tmp/buildx-cache/apache_centos8-new /tmp/buildx-cache/apache_centos8
50+
- name: copy artifacts
51+
id: artifacts
52+
run: |
53+
cd instrumentation/otel-webserver-module
54+
mkdir -p /tmp/apache_centos8/
55+
docker cp apache_centos8_container:/otel-webserver-module/build/opentelemetry-webserver-sdk-x64-linux.tgz \
56+
/tmp/apache_centos8/
57+
- name: upload artifacts
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: opentelemetry-webserver-sdk-x64-linux.tgz
61+
path: /tmp/apache_centos8/opentelemetry-webserver-sdk-x64-linux.tgz

instrumentation/otel-webserver-module/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ARG LOG4CXX_VERSION="0.11.0"
2424
ARG GTEST_VERSION="1.10.0"
2525
ARG AUTOMAKE_VERSION="1.16.3"
2626
ARG PCRE_VERSION="8.44"
27-
ARG NGINX_VERSION="1.26.0"
27+
ARG NGINX_VERSION="1.27.3"
2828

2929

3030
# create default non-root user
@@ -273,7 +273,7 @@ RUN cd /otel-webserver-module/build \
273273
&& cd /
274274

275275
RUN cp /otel-webserver-module/conf/nginx/opentelemetry_module.conf /opt/ \
276-
&& sed -i '8i load_module /opt/opentelemetry-webserver-sdk/WebServerModule/Nginx/1.26.0/ngx_http_opentelemetry_module.so;' /etc/nginx/nginx.conf \
276+
&& sed -i '8i load_module /opt/opentelemetry-webserver-sdk/WebServerModule/Nginx/1.27.3/ngx_http_opentelemetry_module.so;' /etc/nginx/nginx.conf \
277277
&& sed -i '33i include /opt/opentelemetry_module.conf;' /etc/nginx/nginx.conf \
278278
&& cd /
279279

@@ -284,4 +284,4 @@ RUN rm -rf grpc && rm -rf autoconf-${AUTOCONF_VERSION} && rm -rf automake-${AUTO
284284
&& rm -f httpd-2.2.31.tar.gz && rm -f httpd-2.4.23.tar.gz
285285

286286
COPY entrypoint.sh /usr/local/bin/
287-
ENTRYPOINT ["entrypoint.sh"]
287+
ENTRYPOINT ["entrypoint.sh"]

instrumentation/otel-webserver-module/codeql-env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ APRUTIL_VERSION="1.6.1"
3636
LOG4CXX_VERSION="0.11.0"
3737
GTEST_VERSION="1.10.0"
3838
PCRE_VERSION="8.44"
39-
NGINX_VERSION="1.26.2"
39+
NGINX_VERSION="1.27.3"
4040

4141
# Install GRPC
4242
git clone --shallow-submodules --depth 1 --recurse-submodules -b v${GRPC_VERSION} \
@@ -176,4 +176,4 @@ mkdir -p /dependencies/pcre/${PCRE_VERSION}/ \
176176
# install nginx
177177
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz \
178178
&& tar -xvf nginx-${NGINX_VERSION}.tar.gz -C /build-dependencies \
179-
&& rm -rf nginx-${NGINX_VERSION}.tar.gz
179+
&& rm -rf nginx-${NGINX_VERSION}.tar.gz

0 commit comments

Comments
 (0)