Skip to content

almalinux9

almalinux9 #8

name: webserver alma
on:
push:
branches: [ Alma ]
jobs:
webserver-build-test-almalinux8:
name: webserver-almalinux8-build
runs-on: ubuntu-latest
steps:
- name: checkout otel webserver
uses: actions/checkout@v3
- name: setup buildx
id: buildx
uses: docker/setup-buildx-action@master
with:
install: true
# - name: cache docker layers
# uses: actions/cache@v3
# with:
# path: /tmp/buildx-cache/
# key: apache-almalinux8-${{ github.sha }}
# restore-keys: |
# apache-almalinux8
- name: setup docker image
run: |
cd instrumentation/otel-webserver-module
docker buildx build -t apache_almalinux8 -f docker/almalinux8/Dockerfile \
--load .
- name: build
run: |
cat /etc/os-release
java -version
docker run -idt --name apache_almalinux8_container apache_almalinux8 /bin/bash
cd instrumentation/otel-webserver-module
docker exec apache_almalinux8_container bash -c \
'cd /otel-webserver-module; rm -rf *;'
docker cp . $(docker inspect --format="{{.Id}}" apache_almalinux8_container):/otel-webserver-module/
docker exec apache_almalinux8_container bash -c \
'cd /otel-webserver-module; rm -rf build; \
cp -r /dependencies /otel-webserver-module/; \
cp -r /build-dependencies /otel-webserver-module/; \
./gradlew assembleWebServerModule'
- name: unit test
run: |
docker exec apache_almalinux8_container bash -c \
'cd /otel-webserver-module; ./gradlew runUnitTest'
# - name: update cache
# run: |
# rm -rf /tmp/buildx-cache/apache_almalinux8
# mv /tmp/buildx-cache/apache_almalinux8-new /tmp/buildx-cache/apache_almalinux8
- name: copy artifacts
id: artifacts
run: |
cd instrumentation/otel-webserver-module
mkdir -p /tmp/apache_almalinux8/
docker cp apache_almalinux8_container:/otel-webserver-module/build/opentelemetry-webserver-sdk-x64-linux.tgz \
/tmp/apache_almalinux8/
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: opentelemetry-webserver-sdk-x64-linux.tgz
path: /tmp/apache_almalinux8/opentelemetry-webserver-sdk-x64-linux.tgz