Update system-tests to 54517a50d663b92d8b0a2f599261105768e92a72 (#6734) #13351
This file contains 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: "Lib Injection Test" | |
on: | |
push: | |
branches: | |
- master | |
- 'release/*' | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build-and-publish-init-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # 2.3.4 | |
with: | |
fetch-depth: 0 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # 2.0.0 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # 2.0.0 | |
with: | |
version: v0.9.1 # https://github.com/docker/buildx/issues/1533 | |
- name: Set up Docker platforms | |
id: buildx-platforms | |
run: | | |
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw alpine:3.18.3 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'` | |
echo "$BUILDX_PLATFORMS" | |
echo "platforms=$BUILDX_PLATFORMS" >> $GITHUB_OUTPUT | |
- name: lib-injection-tags | |
id: lib-injection-tags | |
uses: DataDog/system-tests/lib-injection/docker-tags@89d754340046eafcc72dc5c5fd6ea651ca7b920e # main | |
with: | |
init-image-name: 'dd-lib-java-init' | |
main-branch-name: 'master' | |
- name: Build dd-java-agent.jar | |
run: ./lib-injection/build_java_agent.sh | |
- name: Login to Docker | |
run: docker login -u publisher -p ${{ secrets.GITHUB_TOKEN }} ghcr.io | |
- name: Docker Build | |
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # 3.2.0 | |
with: | |
push: true | |
tags: ${{ steps.lib-injection-tags.outputs.tag-names }} | |
platforms: ${{ steps.buildx-platforms.outputs.platforms }} | |
context: ./lib-injection | |
injection-tests: | |
needs: | |
- build-and-publish-init-image | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
matrix: | |
lib-injection-connection: [ 'network','uds'] | |
lib-injection-use-admission-controller: ['', 'use-admission-controller'] | |
weblog-variant: [ 'dd-lib-java-init-test-app'] | |
fail-fast: false | |
env: | |
TEST_LIBRARY: java | |
WEBLOG_VARIANT: ${{ matrix.weblog-variant }} | |
LIBRARY_INJECTION_CONNECTION: ${{ matrix.lib-injection-connection }} | |
LIBRARY_INJECTION_ADMISSION_CONTROLLER: ${{ matrix.lib-injection-use-admission-controller }} | |
DOCKER_REGISTRY_IMAGES_PATH: ghcr.io/datadog | |
DOCKER_IMAGE_TAG: ${{ github.sha }} | |
MODE: manual | |
steps: | |
- name: lib-injection test runner | |
id: lib-injection-test-runner | |
uses: DataDog/system-tests/lib-injection/runner@89d754340046eafcc72dc5c5fd6ea651ca7b920e # main | |
with: | |
docker-registry: ghcr.io | |
docker-registry-username: ${{ github.repository_owner }} | |
docker-registry-password: ${{ secrets.GITHUB_TOKEN }} | |
test-script: ./lib-injection/run-manual-lib-injection.sh |