upade script,sh #245
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: webserver centos8 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: "Work" | |
| jobs: | |
| webserver-build-test-centos8: | |
| name: webserver-centos8-build | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCKER_BUILDKIT: "1" # enable BuildKit features if present | |
| COMPOSE_DOCKER_CLI_BUILD: "1" | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image (CentOS 8) | |
| run: | | |
| cd instrumentation/otel-webserver-module | |
| docker buildx build -t apache_centos8 -f docker/centos8/Dockerfile --load . | |
| # Create a container only to copy artifacts out (no actual run needed) | |
| - name: Create container to copy artifacts | |
| run: | | |
| docker create --name apache_centos8_container apache_centos8 | |
| docker ps -a | |
| # Copy the **augmented** tarball created by the Dockerfile | |
| - name: Copy augmented SDK tarball | |
| run: | | |
| mkdir -p /tmp/apache_centos8 | |
| # Path must match the re-pack step in the Dockerfile (builder stage) | |
| docker cp apache_centos8_container:/otel-webserver-module/build/opentelemetry-webserver-sdk-x64-linux.tgz \ | |
| /tmp/apache_centos8/ | |
| # # Sanity check tar contents (should include third_party/lib/) | |
| # tar -tzf /tmp/apache_centos8/opentelemetry-webserver-sdk-x64-linux.tgz | \ | |
| # grep -E '^opentelemetry-webserver-sdk/third_party/lib/' || \ | |
| # (echo "ERROR: third_party/lib missing in tarball" && exit 1) | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: opentelemetry-webserver-sdk-x64-linux.tgz | |
| path: /tmp/apache_centos8/opentelemetry-webserver-sdk-x64-linux.tgz | |
| - name: Cleanup | |
| run: | | |
| docker rm apache_centos8_container || true |