From 81227c1cac80532cad598c8dc8194bb87e05d522 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 28 Sep 2023 14:56:30 -0400 Subject: [PATCH 01/69] cryostat ITests --- .github/workflows/ci.yaml | 18 +++-- .github/workflows/cryostat-IT.yml | 119 ++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/cryostat-IT.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5223afbf..26e22c94 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,14 +16,12 @@ on: jobs: build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - uses: skjolber/maven-cache-github-action@v1 with: @@ -32,3 +30,13 @@ jobs: - uses: skjolber/maven-cache-github-action@v1 with: step: save + + cryostat-test: + needs: [build] + strategy: + matrix: + arch: [amd64, arm64] + uses: ./.github/workflows/cryostat-IT.yml + with: + build-arch: ${{ matrix.arch }} + skip-itests: ${{ matrix.arch != 'amd64' }} diff --git a/.github/workflows/cryostat-IT.yml b/.github/workflows/cryostat-IT.yml new file mode 100644 index 00000000..78b5e8b2 --- /dev/null +++ b/.github/workflows/cryostat-IT.yml @@ -0,0 +1,119 @@ +on: + workflow_call: + inputs: + build-arch: + required: true + type: string + skip-itests: + required: false + type: boolean + default: false + outputs: + image-version: + description: the Cryostat application version that will be built + value: ${{ jobs.get-pom-properties.outputs.image-version }} + +permissions: + contents: read + packages: read + +jobs: + get-pom-properties: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + repository: cryostatio/cryostat + ref: main + - id: query-pom + name: Get properties from POM + # Query POM for image version and save as output parameter + run: | + IMAGE_VERSION="$(mvn validate help:evaluate -Dexpression=cryostat.imageVersionLower -q -DforceStdout)" + echo "image-version=$IMAGE_VERSION" >> "$GITHUB_OUTPUT" + outputs: + image-version: ${{ steps.query-pom.outputs.image-version }} + + build-image: + runs-on: ubuntu-latest + needs: [get-pom-properties] + steps: + - name: Install qemu + if: ${{ inputs.build-arch != 'amd64' }} + continue-on-error: true + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + - uses: actions/checkout@v4 + if: always() + with: + repository: cryostatio/cryostat + ref: main + submodules: true + fetch-depth: 0 + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: maven-settings + uses: s4u/maven-settings-action@v2 + with: + servers: '[{"id": "github", "username": "dummy", "password": "${env.GITHUB_TOKEN_REF}"}]' + githubServer: false + - uses: skjolber/maven-cache-github-action@v1 + with: + step: restore + - run: git submodule init + - run: git submodule update + - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} clean package + env: + GITHUB_TOKEN_REF: ${{ secrets.GITHUB_TOKEN }} + - name: Save cryostat image + run: podman save -o cryostat-${{ inputs.build-arch }}.tar --format oci-archive quay.io/cryostat/cryostat + - uses: actions/upload-artifact@v3 + with: + name: cryostat-${{ inputs.build-arch }} + path: /home/runner/work/cryostat-core/cryostat-core/cryostat-${{ inputs.build-arch }}.tar + - uses: skjolber/maven-cache-github-action@v1 + with: + step: save + + integration-tests: + runs-on: ubuntu-latest + needs: [build-image] + if: ${{ ! inputs.skip-itests }} + steps: + - name: Install xpath + run: | + sudo apt-get update + sudo apt-get install -y libxml-xpath-perl + - uses: actions/checkout@v4 + if: always() + with: + repository: cryostatio/cryostat + ref: main + submodules: true + fetch-depth: 0 + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - uses: actions/download-artifact@v3 + with: + name: cryostat-${{ inputs.build-arch }} + - name: Load cryostat image + run: podman load -i cryostat-${{ inputs.build-arch }}.tar + - uses: skjolber/maven-cache-github-action@v1 + with: + step: restore + - name: Run integration tests + run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash + - name: Print itest logs + if: failure() + run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat + - name: Print itest container logs + if: failure() + run: ls -1dt target/cryostat-*.server.log | head -n1 | xargs cat + - uses: skjolber/maven-cache-github-action@v1 + with: + step: save From f8c8a2903b33a05ba9af8b6b940d62b0d1bdab1c Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 29 Sep 2023 15:55:58 -0400 Subject: [PATCH 02/69] review --- .github/workflows/cryostat-IT.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cryostat-IT.yml b/.github/workflows/cryostat-IT.yml index 78b5e8b2..4aa6aff0 100644 --- a/.github/workflows/cryostat-IT.yml +++ b/.github/workflows/cryostat-IT.yml @@ -13,10 +13,6 @@ on: description: the Cryostat application version that will be built value: ${{ jobs.get-pom-properties.outputs.image-version }} -permissions: - contents: read - packages: read - jobs: get-pom-properties: runs-on: ubuntu-latest @@ -47,7 +43,8 @@ jobs: - uses: actions/checkout@v4 if: always() with: - repository: cryostatio/cryostat + repository: ${{ github.repository_owner }} + name: cryostat ref: main submodules: true fetch-depth: 0 From 69221a410076ff010419f8f68897eb72dfa128bb Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Mon, 2 Oct 2023 10:26:01 -0400 Subject: [PATCH 03/69] push to ghcr --- .github/workflows/ci.yaml | 72 +++++++++++++++++++++++++++++++ .github/workflows/cryostat-IT.yml | 13 ++++-- 2 files changed, 81 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 26e22c94..b837296e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,6 +27,10 @@ jobs: with: step: restore - run: mvn -B -U clean verify + - uses: actions/upload-artifact@v3 + with: + name: cryostat-core + path: /home/runner/work/cryostat-core/cryostat-core/target/cryostat-core-2.24.0-SNAPSHOT.jar - uses: skjolber/maven-cache-github-action@v1 with: step: save @@ -40,3 +44,71 @@ jobs: with: build-arch: ${{ matrix.arch }} skip-itests: ${{ matrix.arch != 'amd64' }} + + push-to-ghcr: + runs-on: ubuntu-latest + needs: [cryostat-test] + strategy: + matrix: + arch: [amd64, arm64] + outputs: + amd64_image: ${{ steps.amd64_image.outputs.image }} + arm64_image: ${{ steps.arm64_image.outputs.image }} + permissions: + packages: write + steps: + - uses: actions/download-artifact@v3 + with: + name: cryostat-${{ matrix.arch }} + - name: Load cryostat image + run: podman load -i cryostat-${{ matrix.arch }}.tar + - name: Tag cryostat image + run: podman tag cryostat ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} + - name: Push PR test image to ghcr.io + id: push-to-ghcr + uses: redhat-actions/push-to-registry@v2 + with: + image: cryostat + tags: pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} + registry: ghcr.io/${{ github.repository_owner }} + username: ${{ github.event.pull_request.user.login }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Store images as output amd64 + if: ${{ matrix.arch == 'amd64' }} + id: amd64_image + run: echo "image=${{ steps.push-to-ghcr.outputs.registry-path }}" >> "$GITHUB_OUTPUT" + - name: Store images as output + if: ${{ matrix.arch == 'arm64' }} + id: arm64_image + run: echo "image=${{ steps.push-to-ghcr.outputs.registry-path }}" >> "$GITHUB_OUTPUT" + + comment-image: + runs-on: ubuntu-latest + needs: [push-to-ghcr] + env: + amd64_image: ${{ needs.push-to-ghcr.outputs.amd64_image }} + arm64_image: ${{ needs.push-to-ghcr.outputs.arm64_image }} + permissions: + pull-requests: write + steps: + - name: Create markdown table + id: md-table + uses: petems/csv-to-md-table-action@v3.0.0 + with: + csvinput: | + ARCH, IMAGE + amd64, ${{ env.amd64_image }} + arm64, ${{ env.arm64_image }} + - uses: thollander/actions-comment-pull-request@v2 + with: + message: |- + ${{ steps.md-table.outputs.markdown-table }} + + To run smoketest: + ``` + # amd64 + CRYOSTAT_IMAGE=${{ env.amd64_image }} sh smoketest.sh + + # or arm64 + CRYOSTAT_IMAGE=${{ env.arm64_image }} sh smoketest.sh + ``` diff --git a/.github/workflows/cryostat-IT.yml b/.github/workflows/cryostat-IT.yml index 4aa6aff0..8b05263d 100644 --- a/.github/workflows/cryostat-IT.yml +++ b/.github/workflows/cryostat-IT.yml @@ -19,8 +19,11 @@ jobs: steps: - uses: actions/checkout@v4 with: - repository: cryostatio/cryostat + repository: ${{ github.repository_owner }}/cryostat ref: main + - uses: Mudlet/xmlstarlet-action@master + with: + args: ed -P -L -u '//_:properties[_:io.cryostat.core.version="2.23.0"]/_:io.cryostat.core.version' -v "2.24.0-SNAPSHOT" pom.xml - id: query-pom name: Get properties from POM # Query POM for image version and save as output parameter @@ -43,8 +46,7 @@ jobs: - uses: actions/checkout@v4 if: always() with: - repository: ${{ github.repository_owner }} - name: cryostat + repository: ${{ github.repository_owner }}/cryostat ref: main submodules: true fetch-depth: 0 @@ -62,6 +64,9 @@ jobs: step: restore - run: git submodule init - run: git submodule update + - uses: actions/download-artifact@v3 + with: + name: cryostat-core - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} clean package env: GITHUB_TOKEN_REF: ${{ secrets.GITHUB_TOKEN }} @@ -87,7 +92,7 @@ jobs: - uses: actions/checkout@v4 if: always() with: - repository: cryostatio/cryostat + repository: ${{ github.repository_owner }}/cryostat ref: main submodules: true fetch-depth: 0 From def550dc79e9fe95fe99f230910f2279fe2c9c80 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 5 Oct 2023 10:27:44 -0400 Subject: [PATCH 04/69] push before build --- .github/workflows/ci.yaml | 44 ++++++++++++++++--- .../{cryostat-IT.yml => cryostat-build.yml} | 41 ----------------- 2 files changed, 39 insertions(+), 46 deletions(-) rename .github/workflows/{cryostat-IT.yml => cryostat-build.yml} (66%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b837296e..d4f7d511 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,7 +15,7 @@ on: - cryostat-v[0-9]+.[0-9]+ jobs: - build: + build-core: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -35,19 +35,19 @@ jobs: with: step: save - cryostat-test: - needs: [build] + build-cryostat: + needs: [build-core] strategy: matrix: arch: [amd64, arm64] - uses: ./.github/workflows/cryostat-IT.yml + uses: ./.github/workflows/cryostat-build.yml with: build-arch: ${{ matrix.arch }} skip-itests: ${{ matrix.arch != 'amd64' }} push-to-ghcr: runs-on: ubuntu-latest - needs: [cryostat-test] + needs: [build-core] strategy: matrix: arch: [amd64, arm64] @@ -82,6 +82,40 @@ jobs: id: arm64_image run: echo "image=${{ steps.push-to-ghcr.outputs.registry-path }}" >> "$GITHUB_OUTPUT" + cryostat-test: + runs-on: ubuntu-latest + steps: + - name: Install xpath + run: | + sudo apt-get update + sudo apt-get install -y libxml-xpath-perl + - uses: actions/checkout@v4 + with: + repository: ${{ github.repository_owner }} + ref: main + submodules: true + fetch-depth: 0 + - uses: actions/setup-java@v3 + with: + java-version: '17' 02W + distribution: 'temurin' + - name: Pull cryostat image + run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} + - uses: skjolber/maven-cache-github-action@v1 + with: + step: restore + - name: Run integration tests + run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash + - name: Print itest logs + if: failure() + run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat + - name: Print itest container logs + if: failure() + run: ls -1dt target/cryostat-*.server.log | head -n1 | xargs cat + - uses: skjolber/maven-cache-github-action@v1 + with: + step: save + comment-image: runs-on: ubuntu-latest needs: [push-to-ghcr] diff --git a/.github/workflows/cryostat-IT.yml b/.github/workflows/cryostat-build.yml similarity index 66% rename from .github/workflows/cryostat-IT.yml rename to .github/workflows/cryostat-build.yml index 8b05263d..0033edb1 100644 --- a/.github/workflows/cryostat-IT.yml +++ b/.github/workflows/cryostat-build.yml @@ -44,7 +44,6 @@ jobs: sudo apt-get update sudo apt-get install -y qemu-user-static - uses: actions/checkout@v4 - if: always() with: repository: ${{ github.repository_owner }}/cryostat ref: main @@ -79,43 +78,3 @@ jobs: - uses: skjolber/maven-cache-github-action@v1 with: step: save - - integration-tests: - runs-on: ubuntu-latest - needs: [build-image] - if: ${{ ! inputs.skip-itests }} - steps: - - name: Install xpath - run: | - sudo apt-get update - sudo apt-get install -y libxml-xpath-perl - - uses: actions/checkout@v4 - if: always() - with: - repository: ${{ github.repository_owner }}/cryostat - ref: main - submodules: true - fetch-depth: 0 - - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - uses: actions/download-artifact@v3 - with: - name: cryostat-${{ inputs.build-arch }} - - name: Load cryostat image - run: podman load -i cryostat-${{ inputs.build-arch }}.tar - - uses: skjolber/maven-cache-github-action@v1 - with: - step: restore - - name: Run integration tests - run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - - name: Print itest logs - if: failure() - run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat - - name: Print itest container logs - if: failure() - run: ls -1dt target/cryostat-*.server.log | head -n1 | xargs cat - - uses: skjolber/maven-cache-github-action@v1 - with: - step: save From 81b9f134ead8fba7776783771dde4eddc37a28bd Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 5 Oct 2023 11:10:26 -0400 Subject: [PATCH 05/69] review updates --- .github/workflows/ci.yaml | 16 +++++++++++++--- .github/workflows/cryostat-build.yml | 6 +++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d4f7d511..9b6c9fca 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,5 +1,9 @@ name: CI build +concurrency: + group: ci-${{ github.run_id }} + cancel-in-progress: true + on: push: branches: @@ -14,6 +18,9 @@ on: - v[0-9]+.[0-9]+ - cryostat-v[0-9]+.[0-9]+ +env: + TEST_VERSION: 2.24.0-SNAPSHOT + jobs: build-core: runs-on: ubuntu-latest @@ -23,14 +30,16 @@ jobs: with: java-version: '17' distribution: 'temurin' + cache: 'maven' - uses: skjolber/maven-cache-github-action@v1 with: step: restore + - run: mvn -B package --file pom.xml - run: mvn -B -U clean verify - uses: actions/upload-artifact@v3 with: name: cryostat-core - path: /home/runner/work/cryostat-core/cryostat-core/target/cryostat-core-2.24.0-SNAPSHOT.jar + path: /home/runner/work/cryostat-core/cryostat-core/target/cryostat-core-${{ env.TEST_VERSION }}.jar - uses: skjolber/maven-cache-github-action@v1 with: step: save @@ -47,7 +56,7 @@ jobs: push-to-ghcr: runs-on: ubuntu-latest - needs: [build-core] + needs: [build-cryostat] strategy: matrix: arch: [amd64, arm64] @@ -84,6 +93,7 @@ jobs: cryostat-test: runs-on: ubuntu-latest + needs: [push-to-ghcr] steps: - name: Install xpath run: | @@ -97,7 +107,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-java@v3 with: - java-version: '17' 02W + java-version: '17' distribution: 'temurin' - name: Pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index 0033edb1..021f5f0d 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -13,6 +13,10 @@ on: description: the Cryostat application version that will be built value: ${{ jobs.get-pom-properties.outputs.image-version }} +env: + CURRENT_VERSION: "2.23.0" + TEST_VERSION: 2.24.0-SNAPSHOT + jobs: get-pom-properties: runs-on: ubuntu-latest @@ -23,7 +27,7 @@ jobs: ref: main - uses: Mudlet/xmlstarlet-action@master with: - args: ed -P -L -u '//_:properties[_:io.cryostat.core.version="2.23.0"]/_:io.cryostat.core.version' -v "2.24.0-SNAPSHOT" pom.xml + args: ed -P -L -u '//_:properties[_:io.cryostat.core.version=${{ env.CURRENT_VERSION }}]/_:io.cryostat.core.version' -v ${{ env.TEST_VERSION }} pom.xml - id: query-pom name: Get properties from POM # Query POM for image version and save as output parameter From 0744db7d7d3dc32ba1ac469b3494a044465146bc Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 5 Oct 2023 14:04:21 -0400 Subject: [PATCH 06/69] update test_version --- .github/workflows/ci.yaml | 24 ++++++++---------- .github/workflows/cryostat-build.yml | 38 ++++------------------------ 2 files changed, 15 insertions(+), 47 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9b6c9fca..3a7efba8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,31 +18,27 @@ on: - v[0-9]+.[0-9]+ - cryostat-v[0-9]+.[0-9]+ -env: - TEST_VERSION: 2.24.0-SNAPSHOT - jobs: build-core: runs-on: ubuntu-latest + outputs: + test_version: ${{ steps.get_core_version.outputs.test_version }} steps: - uses: actions/checkout@v4 + - id: get_core_version + run: | + echo "test_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT + echo "name=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_OUTPUT - uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' cache: 'maven' - - uses: skjolber/maven-cache-github-action@v1 - with: - step: restore - - run: mvn -B package --file pom.xml - run: mvn -B -U clean verify - uses: actions/upload-artifact@v3 with: name: cryostat-core - path: /home/runner/work/cryostat-core/cryostat-core/target/cryostat-core-${{ env.TEST_VERSION }}.jar - - uses: skjolber/maven-cache-github-action@v1 - with: - step: save + path: $GITHUB_WORKSPACE/target/${{ steps.get_core_version.outputs.name }}-${{ steps.get_core_version.outputs.test_version }}.jar build-cryostat: needs: [build-core] @@ -52,7 +48,7 @@ jobs: uses: ./.github/workflows/cryostat-build.yml with: build-arch: ${{ matrix.arch }} - skip-itests: ${{ matrix.arch != 'amd64' }} + test-version: ${{ needs.build-core.outputs.test_version }} push-to-ghcr: runs-on: ubuntu-latest @@ -77,7 +73,7 @@ jobs: id: push-to-ghcr uses: redhat-actions/push-to-registry@v2 with: - image: cryostat + image: cryostat-core tags: pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} registry: ghcr.io/${{ github.repository_owner }} username: ${{ github.event.pull_request.user.login }} @@ -85,7 +81,7 @@ jobs: - name: Store images as output amd64 if: ${{ matrix.arch == 'amd64' }} id: amd64_image - run: echo "image=${{ steps.push-to-ghcr.outputs.registry-path }}" >> "$GITHUB_OUTPUT" + run: z "image=${{ steps.push-to-ghcr.outputs.registry-path }}" >> "$GITHUB_OUTPUT" - name: Store images as output if: ${{ matrix.arch == 'arm64' }} id: arm64_image diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index 021f5f0d..a86683d8 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -4,42 +4,13 @@ on: build-arch: required: true type: string - skip-itests: - required: false - type: boolean - default: false - outputs: - image-version: - description: the Cryostat application version that will be built - value: ${{ jobs.get-pom-properties.outputs.image-version }} - -env: - CURRENT_VERSION: "2.23.0" - TEST_VERSION: 2.24.0-SNAPSHOT + test-version: + required: true + type: string jobs: - get-pom-properties: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - repository: ${{ github.repository_owner }}/cryostat - ref: main - - uses: Mudlet/xmlstarlet-action@master - with: - args: ed -P -L -u '//_:properties[_:io.cryostat.core.version=${{ env.CURRENT_VERSION }}]/_:io.cryostat.core.version' -v ${{ env.TEST_VERSION }} pom.xml - - id: query-pom - name: Get properties from POM - # Query POM for image version and save as output parameter - run: | - IMAGE_VERSION="$(mvn validate help:evaluate -Dexpression=cryostat.imageVersionLower -q -DforceStdout)" - echo "image-version=$IMAGE_VERSION" >> "$GITHUB_OUTPUT" - outputs: - image-version: ${{ steps.query-pom.outputs.image-version }} - build-image: runs-on: ubuntu-latest - needs: [get-pom-properties] steps: - name: Install qemu if: ${{ inputs.build-arch != 'amd64' }} @@ -57,6 +28,7 @@ jobs: with: java-version: '17' distribution: 'temurin' + cache: maven - name: maven-settings uses: s4u/maven-settings-action@v2 with: @@ -70,7 +42,7 @@ jobs: - uses: actions/download-artifact@v3 with: name: cryostat-core - - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} clean package + - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} -Dio.cryostat.core.version=${{ inputs.test-version }} clean package env: GITHUB_TOKEN_REF: ${{ secrets.GITHUB_TOKEN }} - name: Save cryostat image From 70e8975a15bfddb45aff739a7e49b4a5ba5d1b0e Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 5 Oct 2023 16:41:42 -0400 Subject: [PATCH 07/69] clean install --- .github/workflows/ci.yaml | 8 ++++---- .github/workflows/cryostat-build.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3a7efba8..0e8f7b23 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,18 +27,18 @@ jobs: - uses: actions/checkout@v4 - id: get_core_version run: | - echo "test_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT - echo "name=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_OUTPUT + echo "test_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT + echo "name=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_OUTPUT - uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' cache: 'maven' - - run: mvn -B -U clean verify + - run: mvn -B -U clean install - uses: actions/upload-artifact@v3 with: name: cryostat-core - path: $GITHUB_WORKSPACE/target/${{ steps.get_core_version.outputs.name }}-${{ steps.get_core_version.outputs.test_version }}.jar + path: ${{ github.workspace }}/target/${{ steps.get_core_version.outputs.name }}-${{ steps.get_core_version.outputs.test_version }}.jar build-cryostat: needs: [build-core] diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index a86683d8..c9985fc0 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -50,7 +50,7 @@ jobs: - uses: actions/upload-artifact@v3 with: name: cryostat-${{ inputs.build-arch }} - path: /home/runner/work/cryostat-core/cryostat-core/cryostat-${{ inputs.build-arch }}.tar + path: ${{ github.workspace }}/cryostat-${{ inputs.build-arch }}.tar - uses: skjolber/maven-cache-github-action@v1 with: step: save From 1b4a7485bd7dc2953e82cd15582a7b524bf28f6d Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 6 Oct 2023 11:26:25 -0400 Subject: [PATCH 08/69] updates --- .github/workflows/ci.yaml | 29 ++++++++-------------------- .github/workflows/cryostat-build.yml | 13 ++----------- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0e8f7b23..ab155570 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,13 +5,13 @@ concurrency: cancel-in-progress: true on: - push: - branches: - - main - - v[0-9]+ - - v[0-9]+.[0-9]+ - - cryostat-v[0-9]+.[0-9]+ - pull_request: + pull_request_target: + types: + - opened + - reopened + - synchronize + - labeled + - unlabeled branches: - main - v[0-9]+ @@ -35,10 +35,6 @@ jobs: distribution: 'temurin' cache: 'maven' - run: mvn -B -U clean install - - uses: actions/upload-artifact@v3 - with: - name: cryostat-core - path: ${{ github.workspace }}/target/${{ steps.get_core_version.outputs.name }}-${{ steps.get_core_version.outputs.test_version }}.jar build-cryostat: needs: [build-core] @@ -91,10 +87,6 @@ jobs: runs-on: ubuntu-latest needs: [push-to-ghcr] steps: - - name: Install xpath - run: | - sudo apt-get update - sudo apt-get install -y libxml-xpath-perl - uses: actions/checkout@v4 with: repository: ${{ github.repository_owner }} @@ -105,11 +97,9 @@ jobs: with: java-version: '17' distribution: 'temurin' + cache: maven - name: Pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} - - uses: skjolber/maven-cache-github-action@v1 - with: - step: restore - name: Run integration tests run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - name: Print itest logs @@ -118,9 +108,6 @@ jobs: - name: Print itest container logs if: failure() run: ls -1dt target/cryostat-*.server.log | head -n1 | xargs cat - - uses: skjolber/maven-cache-github-action@v1 - with: - step: save comment-image: runs-on: ubuntu-latest diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index c9985fc0..66491383 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -4,7 +4,7 @@ on: build-arch: required: true type: string - test-version: + core-version: required: true type: string @@ -34,15 +34,9 @@ jobs: with: servers: '[{"id": "github", "username": "dummy", "password": "${env.GITHUB_TOKEN_REF}"}]' githubServer: false - - uses: skjolber/maven-cache-github-action@v1 - with: - step: restore - run: git submodule init - run: git submodule update - - uses: actions/download-artifact@v3 - with: - name: cryostat-core - - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} -Dio.cryostat.core.version=${{ inputs.test-version }} clean package + - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} -Dio.cryostat.core.version=${{ inputs.core-version }} clean package env: GITHUB_TOKEN_REF: ${{ secrets.GITHUB_TOKEN }} - name: Save cryostat image @@ -51,6 +45,3 @@ jobs: with: name: cryostat-${{ inputs.build-arch }} path: ${{ github.workspace }}/cryostat-${{ inputs.build-arch }}.tar - - uses: skjolber/maven-cache-github-action@v1 - with: - step: save From c3f0f9c407578e94380426137bf1c08fe2f14a71 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 6 Oct 2023 14:08:23 -0400 Subject: [PATCH 09/69] change test to core_version --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ab155570..b6eba895 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,12 +22,12 @@ jobs: build-core: runs-on: ubuntu-latest outputs: - test_version: ${{ steps.get_core_version.outputs.test_version }} + core_version: ${{ steps.get_core_version.outputs.core_version }} steps: - uses: actions/checkout@v4 - id: get_core_version run: | - echo "test_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT + echo "core_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT echo "name=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_OUTPUT - uses: actions/setup-java@v3 with: @@ -44,7 +44,7 @@ jobs: uses: ./.github/workflows/cryostat-build.yml with: build-arch: ${{ matrix.arch }} - test-version: ${{ needs.build-core.outputs.test_version }} + core-version: ${{ needs.build-core.outputs.core_version }} push-to-ghcr: runs-on: ubuntu-latest From 31c7e3ce96f561772854d44150921e277630f5d6 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 6 Oct 2023 15:44:38 -0400 Subject: [PATCH 10/69] cache --- .github/workflows/ci.yaml | 11 ++++++++++- .github/workflows/cryostat-build.yml | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b6eba895..85ec7395 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,8 +33,17 @@ jobs: with: java-version: '17' distribution: 'temurin' - cache: 'maven' + - id: cache_restore + uses: actions/cache/restore@v3 + with: + path: pom + key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - run: mvn -B -U clean install + - id: cache_save + uses: actions/cache/save@v3 + with: + path: pom + key: ${{ steps.cache_restore.outputs.cache-primary-key }} build-cryostat: needs: [build-core] diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index 66491383..8dbbb96f 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -28,7 +28,11 @@ jobs: with: java-version: '17' distribution: 'temurin' - cache: maven + - id: cache_restore + uses: actions/cache/restore@v3 + with: + path: pom + key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - name: maven-settings uses: s4u/maven-settings-action@v2 with: From 542608bec578377c1386139edbd689be26b21776 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 6 Oct 2023 15:48:17 -0400 Subject: [PATCH 11/69] s --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 85ec7395..737af0fc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,9 +35,9 @@ jobs: distribution: 'temurin' - id: cache_restore uses: actions/cache/restore@v3 - with: - path: pom - key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} + with: + path: pom + key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - run: mvn -B -U clean install - id: cache_save uses: actions/cache/save@v3 From 3d82874e57f394fb84c6cb410ed40214d9d2bac7 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 6 Oct 2023 15:49:27 -0400 Subject: [PATCH 12/69] s --- .github/workflows/ci.yaml | 6 +++--- .github/workflows/cryostat-build.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 737af0fc..ed689cb1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,9 +41,9 @@ jobs: - run: mvn -B -U clean install - id: cache_save uses: actions/cache/save@v3 - with: - path: pom - key: ${{ steps.cache_restore.outputs.cache-primary-key }} + with: + path: pom + key: ${{ steps.cache_restore.outputs.cache-primary-key }} build-cryostat: needs: [build-core] diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index 8dbbb96f..6f467e1b 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -30,9 +30,9 @@ jobs: distribution: 'temurin' - id: cache_restore uses: actions/cache/restore@v3 - with: - path: pom - key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} + with: + path: pom + key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - name: maven-settings uses: s4u/maven-settings-action@v2 with: From 2bbe5451d149f400f9e04d0e8af7261e8f7af968 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 6 Oct 2023 15:55:49 -0400 Subject: [PATCH 13/69] s --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ed689cb1..bcc6d41d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,13 +36,13 @@ jobs: - id: cache_restore uses: actions/cache/restore@v3 with: - path: pom + path: pom.xml key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - run: mvn -B -U clean install - id: cache_save uses: actions/cache/save@v3 with: - path: pom + path: pom.xml key: ${{ steps.cache_restore.outputs.cache-primary-key }} build-cryostat: From 6448d573309669424226fe10cebcd088c18a3144 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 6 Oct 2023 16:12:51 -0400 Subject: [PATCH 14/69] s --- .github/workflows/ci.yaml | 4 ++-- .github/workflows/cryostat-build.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bcc6d41d..60a085c0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,13 +36,13 @@ jobs: - id: cache_restore uses: actions/cache/restore@v3 with: - path: pom.xml + path: ~/.m2 key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - run: mvn -B -U clean install - id: cache_save uses: actions/cache/save@v3 with: - path: pom.xml + path: ~/.m2 key: ${{ steps.cache_restore.outputs.cache-primary-key }} build-cryostat: diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index 6f467e1b..61eab3fe 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -31,7 +31,7 @@ jobs: - id: cache_restore uses: actions/cache/restore@v3 with: - path: pom + path: ~/.m2 key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - name: maven-settings uses: s4u/maven-settings-action@v2 From c0865e602c8d9f6221bd444ee43a3ed45f88138c Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 6 Oct 2023 16:49:37 -0400 Subject: [PATCH 15/69] cache --- .github/workflows/ci.yaml | 6 ++++-- .github/workflows/cryostat-build.yml | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 60a085c0..b4ead2d9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,11 +33,13 @@ jobs: with: java-version: '17' distribution: 'temurin' - - id: cache_restore - uses: actions/cache/restore@v3 + - uses: actions/cache/restore@v3 with: path: ~/.m2 key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} + retore-keys: | + ${{ runner.os }}-build + ${{ runner.os }} - run: mvn -B -U clean install - id: cache_save uses: actions/cache/save@v3 diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index 61eab3fe..fc1df3c4 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -33,6 +33,9 @@ jobs: with: path: ~/.m2 key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} + retore-keys: | + ${{ runner.os }}-build + ${{ runner.os }} - name: maven-settings uses: s4u/maven-settings-action@v2 with: From 533b431c44c9abd93a39cce7d83c2145e24716bb Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 6 Oct 2023 17:01:17 -0400 Subject: [PATCH 16/69] s --- .github/workflows/ci.yaml | 7 +------ .github/workflows/cryostat-build.yml | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b4ead2d9..85656e51 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,7 +33,7 @@ jobs: with: java-version: '17' distribution: 'temurin' - - uses: actions/cache/restore@v3 + - uses: actions/cache@v3 with: path: ~/.m2 key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} @@ -41,11 +41,6 @@ jobs: ${{ runner.os }}-build ${{ runner.os }} - run: mvn -B -U clean install - - id: cache_save - uses: actions/cache/save@v3 - with: - path: ~/.m2 - key: ${{ steps.cache_restore.outputs.cache-primary-key }} build-cryostat: needs: [build-core] diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index fc1df3c4..0f49eb2b 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -28,8 +28,7 @@ jobs: with: java-version: '17' distribution: 'temurin' - - id: cache_restore - uses: actions/cache/restore@v3 + - uses: actions/cache@v3 with: path: ~/.m2 key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} From dfbdb6a0a1a771ed670ba659beb473704789887e Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 6 Oct 2023 17:27:53 -0400 Subject: [PATCH 17/69] s --- .github/workflows/ci.yaml | 3 --- .github/workflows/cryostat-build.yml | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 85656e51..aa76e89f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,9 +37,6 @@ jobs: with: path: ~/.m2 key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - retore-keys: | - ${{ runner.os }}-build - ${{ runner.os }} - run: mvn -B -U clean install build-cryostat: diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index 0f49eb2b..9eaf320f 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -33,8 +33,8 @@ jobs: path: ~/.m2 key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} retore-keys: | - ${{ runner.os }}-build - ${{ runner.os }} + ${{ runner.os }}-build- + ${{ runner.os }}- - name: maven-settings uses: s4u/maven-settings-action@v2 with: From d1ea0fca68ecd70620be4ffe38c661f701ce2ae3 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Tue, 10 Oct 2023 14:47:27 -0400 Subject: [PATCH 18/69] mvn login --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index aa76e89f..f2d6c36c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,6 +33,8 @@ jobs: with: java-version: '17' distribution: 'temurin' + server-username: $GITHUB_ACTOR + server-password: $GTIBUB_TOKEN - uses: actions/cache@v3 with: path: ~/.m2 From 0ee8d73fe4fba766a4006c2df98ce9e8be6053d2 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Tue, 10 Oct 2023 15:04:03 -0400 Subject: [PATCH 19/69] test --- .github/workflows/cryostat-build.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index 9eaf320f..3a5f51df 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -19,11 +19,6 @@ jobs: sudo apt-get update sudo apt-get install -y qemu-user-static - uses: actions/checkout@v4 - with: - repository: ${{ github.repository_owner }}/cryostat - ref: main - submodules: true - fetch-depth: 0 - uses: actions/setup-java@v3 with: java-version: '17' @@ -35,6 +30,12 @@ jobs: retore-keys: | ${{ runner.os }}-build- ${{ runner.os }}- + - uses: actions/checkout@v4 + with: + repository: ${{ github.repository_owner }}/cryostat + ref: main + submodules: true + fetch-depth: 0 - name: maven-settings uses: s4u/maven-settings-action@v2 with: From 4d84222f9a74ca7248cf34ccd0acddefdf925363 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Wed, 11 Oct 2023 12:30:54 -0400 Subject: [PATCH 20/69] restore --- .github/workflows/cryostat-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index 3a5f51df..fe2a31f8 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -18,7 +18,6 @@ jobs: run: | sudo apt-get update sudo apt-get install -y qemu-user-static - - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: java-version: '17' @@ -27,7 +26,7 @@ jobs: with: path: ~/.m2 key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - retore-keys: | + restore-keys: | ${{ runner.os }}-build- ${{ runner.os }}- - uses: actions/checkout@v4 From 309ab0dae5932768f6eec8a28d97fc81b1a8b1cd Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Wed, 11 Oct 2023 12:42:57 -0400 Subject: [PATCH 21/69] cryostat --- .github/workflows/cryostat-build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index fe2a31f8..755611d0 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -18,6 +18,12 @@ jobs: run: | sudo apt-get update sudo apt-get install -y qemu-user-static + - uses: actions/checkout@v4 + with: + repository: ${{ github.repository_owner }}/cryostat + ref: main + submodules: true + fetch-depth: 0 - uses: actions/setup-java@v3 with: java-version: '17' @@ -29,12 +35,6 @@ jobs: restore-keys: | ${{ runner.os }}-build- ${{ runner.os }}- - - uses: actions/checkout@v4 - with: - repository: ${{ github.repository_owner }}/cryostat - ref: main - submodules: true - fetch-depth: 0 - name: maven-settings uses: s4u/maven-settings-action@v2 with: From 33963b1e036fe1087651e9f8dbd7b9d4c00ca69c Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Wed, 11 Oct 2023 12:47:01 -0400 Subject: [PATCH 22/69] clean --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f2d6c36c..ef90c0df 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -82,7 +82,7 @@ jobs: - name: Store images as output amd64 if: ${{ matrix.arch == 'amd64' }} id: amd64_image - run: z "image=${{ steps.push-to-ghcr.outputs.registry-path }}" >> "$GITHUB_OUTPUT" + run: echo "image=${{ steps.push-to-ghcr.outputs.registry-path }}" >> "$GITHUB_OUTPUT" - name: Store images as output if: ${{ matrix.arch == 'arm64' }} id: arm64_image From a1da7ffe0d6f50a9d7f287d375a588889fbf9d8b Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Wed, 11 Oct 2023 12:55:21 -0400 Subject: [PATCH 23/69] maven settings --- .github/workflows/cryostat-build.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index 755611d0..aa1a8645 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -28,6 +28,9 @@ jobs: with: java-version: '17' distribution: 'temurin' + server-id: 'github' + server-username: 'dummy' + server-password: ${env.GITHUB_TOKEN_REF}"} - uses: actions/cache@v3 with: path: ~/.m2 @@ -35,11 +38,6 @@ jobs: restore-keys: | ${{ runner.os }}-build- ${{ runner.os }}- - - name: maven-settings - uses: s4u/maven-settings-action@v2 - with: - servers: '[{"id": "github", "username": "dummy", "password": "${env.GITHUB_TOKEN_REF}"}]' - githubServer: false - run: git submodule init - run: git submodule update - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} -Dio.cryostat.core.version=${{ inputs.core-version }} clean package From 02d0e6f4f260e06614c28c2b97e35aabe0c43b4c Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Wed, 11 Oct 2023 13:15:27 -0400 Subject: [PATCH 24/69] test --- .github/workflows/ci.yaml | 23 ++++++++++++++++++----- .github/workflows/cryostat-build.yml | 3 --- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ef90c0df..7fb0bc21 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -69,12 +69,12 @@ jobs: - name: Load cryostat image run: podman load -i cryostat-${{ matrix.arch }}.tar - name: Tag cryostat image - run: podman tag cryostat ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} + run: podman tag cryostat ghcr.io/${{ github.repository_owner }}/cryostat:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} - name: Push PR test image to ghcr.io id: push-to-ghcr uses: redhat-actions/push-to-registry@v2 with: - image: cryostat-core + image: cryostat tags: pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} registry: ghcr.io/${{ github.repository_owner }} username: ${{ github.event.pull_request.user.login }} @@ -91,10 +91,17 @@ jobs: cryostat-test: runs-on: ubuntu-latest needs: [push-to-ghcr] + env: + build_arch: 'arm64' steps: + - name: Install qemu + continue-on-error: true + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static - uses: actions/checkout@v4 with: - repository: ${{ github.repository_owner }} + repository: ${{ github.repository_owner }}/cryostat ref: main submodules: true fetch-depth: 0 @@ -102,9 +109,15 @@ jobs: with: java-version: '17' distribution: 'temurin' - cache: maven + - uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-build- + ${{ runner.os }}- - name: Pull cryostat image - run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} + run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} - name: Run integration tests run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - name: Print itest logs diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index aa1a8645..1db0b7c1 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -28,9 +28,6 @@ jobs: with: java-version: '17' distribution: 'temurin' - server-id: 'github' - server-username: 'dummy' - server-password: ${env.GITHUB_TOKEN_REF}"} - uses: actions/cache@v3 with: path: ~/.m2 From e226b658358a78a8e1c15fb0822fcd5ec5376991 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Wed, 11 Oct 2023 13:27:33 -0400 Subject: [PATCH 25/69] core --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7fb0bc21..0bbf0ec6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -69,12 +69,12 @@ jobs: - name: Load cryostat image run: podman load -i cryostat-${{ matrix.arch }}.tar - name: Tag cryostat image - run: podman tag cryostat ghcr.io/${{ github.repository_owner }}/cryostat:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} + run: podman tag cryostat ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} - name: Push PR test image to ghcr.io id: push-to-ghcr uses: redhat-actions/push-to-registry@v2 with: - image: cryostat + image: cryostat-core tags: pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} registry: ghcr.io/${{ github.repository_owner }} username: ${{ github.event.pull_request.user.login }} @@ -117,7 +117,7 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- - name: Pull cryostat image - run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} + run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} - name: Run integration tests run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - name: Print itest logs From 68a3ef7cc52fbed0b51dcd1808d4445bf9c169c7 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Wed, 11 Oct 2023 14:06:30 -0400 Subject: [PATCH 26/69] test --- .github/workflows/ci.yaml | 9 --------- .github/workflows/cryostat-build.yml | 5 +++++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0bbf0ec6..ee3c093b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -33,8 +33,6 @@ jobs: with: java-version: '17' distribution: 'temurin' - server-username: $GITHUB_ACTOR - server-password: $GTIBUB_TOKEN - uses: actions/cache@v3 with: path: ~/.m2 @@ -109,13 +107,6 @@ jobs: with: java-version: '17' distribution: 'temurin' - - uses: actions/cache@v3 - with: - path: ~/.m2 - key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-build- - ${{ runner.os }}- - name: Pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} - name: Run integration tests diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index 1db0b7c1..755611d0 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -35,6 +35,11 @@ jobs: restore-keys: | ${{ runner.os }}-build- ${{ runner.os }}- + - name: maven-settings + uses: s4u/maven-settings-action@v2 + with: + servers: '[{"id": "github", "username": "dummy", "password": "${env.GITHUB_TOKEN_REF}"}]' + githubServer: false - run: git submodule init - run: git submodule update - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} -Dio.cryostat.core.version=${{ inputs.core-version }} clean package From 7a337ee8e5580a0b74dec89bb6a03ee032ede1d2 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 11:19:19 -0400 Subject: [PATCH 27/69] test --- .github/workflows/ci.yaml | 18 ++++++++++++++++-- .github/workflows/cryostat-build.yml | 5 ++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ee3c093b..d597fc64 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -88,7 +88,7 @@ jobs: cryostat-test: runs-on: ubuntu-latest - needs: [push-to-ghcr] + needs: [push-to-ghcr, build-core] env: build_arch: 'arm64' steps: @@ -107,10 +107,24 @@ jobs: with: java-version: '17' distribution: 'temurin' + - uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: maven-settings + uses: s4u/maven-settings-action@v2 + with: + servers: '[{"id": "github", "username": "dummy", "password": "${env.GITHUB_TOKEN}"}]' + githubServer: false - name: Pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} - name: Run integration tests - run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash + run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest CORE_VERSION=${{ needs.build-core.outputs.core_version }} bash repeated-integration-tests.bash + env: + GITHUB_TOKEN_REF: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs if: failure() run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml index 755611d0..d26ee787 100644 --- a/.github/workflows/cryostat-build.yml +++ b/.github/workflows/cryostat-build.yml @@ -38,13 +38,12 @@ jobs: - name: maven-settings uses: s4u/maven-settings-action@v2 with: - servers: '[{"id": "github", "username": "dummy", "password": "${env.GITHUB_TOKEN_REF}"}]' - githubServer: false + githubServer: true - run: git submodule init - run: git submodule update - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} -Dio.cryostat.core.version=${{ inputs.core-version }} clean package env: - GITHUB_TOKEN_REF: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Save cryostat image run: podman save -o cryostat-${{ inputs.build-arch }}.tar --format oci-archive quay.io/cryostat/cryostat - uses: actions/upload-artifact@v3 From 93d13c9308f0f696ae4251203bf4f4c85bf2a902 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 11:34:00 -0400 Subject: [PATCH 28/69] test --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d597fc64..b8bc9fb7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -117,7 +117,7 @@ jobs: - name: maven-settings uses: s4u/maven-settings-action@v2 with: - servers: '[{"id": "github", "username": "dummy", "password": "${env.GITHUB_TOKEN}"}]' + servers: '[{"id": "github", "username": "dummy", "password": "${env.GITHUB_TOKEN_REF}"}]' githubServer: false - name: Pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} From ca4baa1686d3387cc76899f105194bbe1d92c2d9 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 13:56:06 -0400 Subject: [PATCH 29/69] commit --- .github/workflows/ci.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b8bc9fb7..a31a4e0c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -117,14 +117,13 @@ jobs: - name: maven-settings uses: s4u/maven-settings-action@v2 with: - servers: '[{"id": "github", "username": "dummy", "password": "${env.GITHUB_TOKEN_REF}"}]' - githubServer: false + githubServer: true - name: Pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} - name: Run integration tests run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest CORE_VERSION=${{ needs.build-core.outputs.core_version }} bash repeated-integration-tests.bash env: - GITHUB_TOKEN_REF: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs if: failure() run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat From 2df560ee4280e9f31297e3270e273e47b492612b Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 15:40:06 -0400 Subject: [PATCH 30/69] tag --- .github/workflows/ci.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a31a4e0c..00862a67 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -118,10 +118,8 @@ jobs: uses: s4u/maven-settings-action@v2 with: githubServer: true - - name: Pull cryostat image - run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} - name: Run integration tests - run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest CORE_VERSION=${{ needs.build-core.outputs.core_version }} bash repeated-integration-tests.bash + run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} bash repeated-integration-tests.bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From d391e297b48331d768503f673865f2ad8463bdcb Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 17:42:44 -0400 Subject: [PATCH 31/69] update pom --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 00862a67..034bf9bf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -118,8 +118,10 @@ jobs: uses: s4u/maven-settings-action@v2 with: githubServer: true + - name: pull ghcr image + run: podman login ghcr.io - name: Run integration tests - run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} bash repeated-integration-tests.bash + run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} IMAGE_STREAM=ghcr.io/${{ github.repository_owner }}/cryostat-core CORE_VERSION=${{ needs.build-core.outputs.core_version }} bash repeated-integration-tests.bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From 18bce79aa3e88ab15e47d38ac092021d9d511078 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 17:57:51 -0400 Subject: [PATCH 32/69] test --- .github/workflows/ci.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 034bf9bf..274e13cf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -118,10 +118,17 @@ jobs: uses: s4u/maven-settings-action@v2 with: githubServer: true - - name: pull ghcr image - run: podman login ghcr.io + - name: ghcr login + uses: redhat-actions/podman-login@v1 + with: + registry: ghcr.io/${{ github.repository_owner }} + username: ${{ github.event.pull_request.user.login }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: pull and tag cryostat image + run: podman pull cryostat ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} + run: podman tag cryostat quay.io/${{ github.repository_owner }}/cryostat-core:latest - name: Run integration tests - run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ matrix.arch }} IMAGE_STREAM=ghcr.io/${{ github.repository_owner }}/cryostat-core CORE_VERSION=${{ needs.build-core.outputs.core_version }} bash repeated-integration-tests.bash + run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From b6797d5b5755b5d7123ea34e6ba2eac907fce263 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 18:06:56 -0400 Subject: [PATCH 33/69] tag --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 274e13cf..a16e6abb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -124,8 +124,9 @@ jobs: registry: ghcr.io/${{ github.repository_owner }} username: ${{ github.event.pull_request.user.login }} password: ${{ secrets.GITHUB_TOKEN }} - - name: pull and tag cryostat image + - name: pull cryostat image run: podman pull cryostat ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} + - name: tag cryostat image run: podman tag cryostat quay.io/${{ github.repository_owner }}/cryostat-core:latest - name: Run integration tests run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash From 0a0fada85da9afaf7b819cb0a0261dba2c985afb Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 22:32:03 -0400 Subject: [PATCH 34/69] pull --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a16e6abb..7d42f930 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -125,7 +125,7 @@ jobs: username: ${{ github.event.pull_request.user.login }} password: ${{ secrets.GITHUB_TOKEN }} - name: pull cryostat image - run: podman pull cryostat ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} + run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} - name: tag cryostat image run: podman tag cryostat quay.io/${{ github.repository_owner }}/cryostat-core:latest - name: Run integration tests From 28a94c9f0204fc72745980e8c7aad009bb9d2a14 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 22:48:02 -0400 Subject: [PATCH 35/69] split workflows --- .github/workflows/ci.yaml | 53 --------------------- .github/workflows/cryostat-test.yml | 72 +++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 53 deletions(-) create mode 100644 .github/workflows/cryostat-test.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7d42f930..15f148c8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -86,59 +86,6 @@ jobs: id: arm64_image run: echo "image=${{ steps.push-to-ghcr.outputs.registry-path }}" >> "$GITHUB_OUTPUT" - cryostat-test: - runs-on: ubuntu-latest - needs: [push-to-ghcr, build-core] - env: - build_arch: 'arm64' - steps: - - name: Install qemu - continue-on-error: true - run: | - sudo apt-get update - sudo apt-get install -y qemu-user-static - - uses: actions/checkout@v4 - with: - repository: ${{ github.repository_owner }}/cryostat - ref: main - submodules: true - fetch-depth: 0 - - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - uses: actions/cache@v3 - with: - path: ~/.m2 - key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-build- - ${{ runner.os }}- - - name: maven-settings - uses: s4u/maven-settings-action@v2 - with: - githubServer: true - - name: ghcr login - uses: redhat-actions/podman-login@v1 - with: - registry: ghcr.io/${{ github.repository_owner }} - username: ${{ github.event.pull_request.user.login }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: pull cryostat image - run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-linux-${{ env.build_arch }} - - name: tag cryostat image - run: podman tag cryostat quay.io/${{ github.repository_owner }}/cryostat-core:latest - - name: Run integration tests - run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Print itest logs - if: failure() - run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat - - name: Print itest container logs - if: failure() - run: ls -1dt target/cryostat-*.server.log | head -n1 | xargs cat - comment-image: runs-on: ubuntu-latest needs: [push-to-ghcr] diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml new file mode 100644 index 00000000..39e881c3 --- /dev/null +++ b/.github/workflows/cryostat-test.yml @@ -0,0 +1,72 @@ +on: + workflow_call: + issue_comment: + types: + - created + +jobs: + checkout-branch: + runs-on: ubuntu-latest + outputs: + PR_head_ref: ${{ fromJSON(steps.comment-branch.outputs.result).ref }} + PR_head_sha: ${{ fromJSON(steps.comment-branch.outputs.result).sha }} + PR_num: ${{ fromJSON(steps.comment-branch.outputs.result).num }} + PR_repo: ${{ fromJSON(steps.comment-branch.outputs.result).repo }} + permissions: + pull-requests: read + steps: + - uses: actions/github-script@v4 + id: comment-branch + with: + script: | + const result = await github.pulls.get ({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number + }) + return { repo: result.data.head.repo.full_name, num: result.data.number, sha: result.data.head.sha, ref: result.data.head.ref } + + cryostat-test: + runs-on: ubuntu-latest + if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/cryostat_test') + needs: [checkout-branch] + env: + build_arch: 'arm64' + steps: + - name: Install qemu + continue-on-error: true + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + - uses: actions/checkout@v4 + with: + repository: ${{ github.repository_owner }}/cryostat + ref: main + submodules: true + fetch-depth: 0 + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: maven-settings + uses: s4u/maven-settings-action@v2 + with: + githubServer: true + - name: ghcr login + uses: redhat-actions/podman-login@v1 + with: + registry: ghcr.io/${{ github.repository_owner }} + username: ${{ github.event.comment.user.login }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: pull cryostat image + run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} + - name: tag cryostat image + run: podman tag cryostat quay.io/${{ github.repository_owner }}/cryostat-core:latest + - name: Run integration tests + run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash + - name: Print itest logs + if: failure() + run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat + - name: Print itest container logs + if: failure() + run: ls -1dt target/cryostat-*.server.log | head -n1 | xargs cat From d07e7dcb92809286038e161f5b1ff7aee868b238 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 22:49:06 -0400 Subject: [PATCH 36/69] tmp --- .github/workflows/cryostat-test.yml | 86 ++++++++++++++--------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 39e881c3..b894ef6c 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -27,46 +27,46 @@ jobs: return { repo: result.data.head.repo.full_name, num: result.data.number, sha: result.data.head.sha, ref: result.data.head.ref } cryostat-test: - runs-on: ubuntu-latest - if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/cryostat_test') - needs: [checkout-branch] - env: - build_arch: 'arm64' - steps: - - name: Install qemu - continue-on-error: true - run: | - sudo apt-get update - sudo apt-get install -y qemu-user-static - - uses: actions/checkout@v4 - with: - repository: ${{ github.repository_owner }}/cryostat - ref: main - submodules: true - fetch-depth: 0 - - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - name: maven-settings - uses: s4u/maven-settings-action@v2 - with: - githubServer: true - - name: ghcr login - uses: redhat-actions/podman-login@v1 - with: - registry: ghcr.io/${{ github.repository_owner }} - username: ${{ github.event.comment.user.login }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: pull cryostat image - run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - - name: tag cryostat image - run: podman tag cryostat quay.io/${{ github.repository_owner }}/cryostat-core:latest - - name: Run integration tests - run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - - name: Print itest logs - if: failure() - run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat - - name: Print itest container logs - if: failure() - run: ls -1dt target/cryostat-*.server.log | head -n1 | xargs cat + runs-on: ubuntu-latest + if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/cryostat_test') + needs: [checkout-branch] + env: + build_arch: 'arm64' + steps: + - name: Install qemu + continue-on-error: true + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + - uses: actions/checkout@v4 + with: + repository: ${{ github.repository_owner }}/cryostat + ref: main + submodules: true + fetch-depth: 0 + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: maven-settings + uses: s4u/maven-settings-action@v2 + with: + githubServer: true + - name: ghcr login + uses: redhat-actions/podman-login@v1 + with: + registry: ghcr.io/${{ github.repository_owner }} + username: ${{ github.event.comment.user.login }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: pull cryostat image + run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} + - name: tag cryostat image + run: podman tag cryostat quay.io/${{ github.repository_owner }}/cryostat-core:latest + - name: Run integration tests + run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash + - name: Print itest logs + if: failure() + run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat + - name: Print itest container logs + if: failure() + run: ls -1dt target/cryostat-*.server.log | head -n1 | xargs cat From 2795b226c2cd76f12696fadcbe61e2b070b5c323 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 22:51:13 -0400 Subject: [PATCH 37/69] tmp --- .github/workflows/cryostat-test.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index b894ef6c..012917e2 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -1,8 +1,13 @@ +name: cryostat-test + +concurrency: + group: ci-${{ github.run_id }} + cancel-in-progress: true + on: - workflow_call: - issue_comment: - types: - - created + issue_comment: + types: + - created jobs: checkout-branch: From e4178b24cef18bd33f2caf01d96a7c9911279bcb Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 22:52:38 -0400 Subject: [PATCH 38/69] ?? --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 012917e2..2cad29b6 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -66,7 +66,7 @@ jobs: - name: pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - name: tag cryostat image - run: podman tag cryostat quay.io/${{ github.repository_owner }}/cryostat-core:latest + run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:quay.io/${{ github.repository_owner }}/cryostat - name: Run integration tests run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - name: Print itest logs From ca10372977c9ec95c15c62ed936f1321ea12aad8 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 23:11:14 -0400 Subject: [PATCH 39/69] tag? --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 2cad29b6..970b43e2 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -66,7 +66,7 @@ jobs: - name: pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - name: tag cryostat image - run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:quay.io/${{ github.repository_owner }}/cryostat + run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat-core - name: Run integration tests run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - name: Print itest logs From e4c97d792a6139c034deec5b2846d4bf14b86c0d Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 23:14:55 -0400 Subject: [PATCH 40/69] add token --- .github/workflows/cryostat-test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 970b43e2..54047bcf 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -68,7 +68,9 @@ jobs: - name: tag cryostat image run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat-core - name: Run integration tests - run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash + run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs if: failure() run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat From 5264b7b468a19f87c4c5b67b2aa47388e0e9ef29 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 23:17:19 -0400 Subject: [PATCH 41/69] fixup --- .github/workflows/ci.yaml | 44 ++++++++++++++++++++--- .github/workflows/cryostat-build.yml | 52 ---------------------------- .github/workflows/cryostat-test.yml | 2 +- 3 files changed, 41 insertions(+), 57 deletions(-) delete mode 100644 .github/workflows/cryostat-build.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 15f148c8..92da16b1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -44,10 +44,46 @@ jobs: strategy: matrix: arch: [amd64, arm64] - uses: ./.github/workflows/cryostat-build.yml - with: - build-arch: ${{ matrix.arch }} - core-version: ${{ needs.build-core.outputs.core_version }} + runs-on: ubuntu-latest + steps: + - name: Install qemu + if: ${{ inputs.build-arch != 'amd64' }} + continue-on-error: true + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + - uses: actions/checkout@v4 + with: + repository: ${{ github.repository_owner }}/cryostat + ref: main + submodules: true + fetch-depth: 0 + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: maven-settings + uses: s4u/maven-settings-action@v2 + with: + githubServer: true + - run: git submodule init + - run: git submodule update + - run: mvn -B -U -Dbuild.arch=${{ matrix.arch}} -Dio.cryostat.core.version=${{ needs.build-core.outputs.core_version }} clean package + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Save cryostat image + run: podman save -o cryostat-${{ matrix.arch }}.tar --format oci-archive quay.io/cryostat/cryostat + - uses: actions/upload-artifact@v3 + with: + name: cryostat-${{ inputs.build-arch }} + path: ${{ github.workspace }}/cryostat-${{ matrix.arch }}.tar push-to-ghcr: runs-on: ubuntu-latest diff --git a/.github/workflows/cryostat-build.yml b/.github/workflows/cryostat-build.yml deleted file mode 100644 index d26ee787..00000000 --- a/.github/workflows/cryostat-build.yml +++ /dev/null @@ -1,52 +0,0 @@ -on: - workflow_call: - inputs: - build-arch: - required: true - type: string - core-version: - required: true - type: string - -jobs: - build-image: - runs-on: ubuntu-latest - steps: - - name: Install qemu - if: ${{ inputs.build-arch != 'amd64' }} - continue-on-error: true - run: | - sudo apt-get update - sudo apt-get install -y qemu-user-static - - uses: actions/checkout@v4 - with: - repository: ${{ github.repository_owner }}/cryostat - ref: main - submodules: true - fetch-depth: 0 - - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - uses: actions/cache@v3 - with: - path: ~/.m2 - key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-build- - ${{ runner.os }}- - - name: maven-settings - uses: s4u/maven-settings-action@v2 - with: - githubServer: true - - run: git submodule init - - run: git submodule update - - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} -Dio.cryostat.core.version=${{ inputs.core-version }} clean package - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Save cryostat image - run: podman save -o cryostat-${{ inputs.build-arch }}.tar --format oci-archive quay.io/cryostat/cryostat - - uses: actions/upload-artifact@v3 - with: - name: cryostat-${{ inputs.build-arch }} - path: ${{ github.workspace }}/cryostat-${{ inputs.build-arch }}.tar diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 54047bcf..11874f7b 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -1,4 +1,4 @@ -name: cryostat-test +name: Cryostat Test concurrency: group: ci-${{ github.run_id }} From 2cd2cbc621a8899ef276ee2fb92d6dad14a9265c Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Thu, 12 Oct 2023 23:23:22 -0400 Subject: [PATCH 42/69] cache --- .github/workflows/cryostat-test.yml | 85 ++++++++++++++++------------- 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 11874f7b..09036feb 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -38,42 +38,49 @@ jobs: env: build_arch: 'arm64' steps: - - name: Install qemu - continue-on-error: true - run: | - sudo apt-get update - sudo apt-get install -y qemu-user-static - - uses: actions/checkout@v4 - with: - repository: ${{ github.repository_owner }}/cryostat - ref: main - submodules: true - fetch-depth: 0 - - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - - name: maven-settings - uses: s4u/maven-settings-action@v2 - with: - githubServer: true - - name: ghcr login - uses: redhat-actions/podman-login@v1 - with: - registry: ghcr.io/${{ github.repository_owner }} - username: ${{ github.event.comment.user.login }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: pull cryostat image - run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - - name: tag cryostat image - run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat-core - - name: Run integration tests - run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Print itest logs - if: failure() - run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat - - name: Print itest container logs - if: failure() - run: ls -1dt target/cryostat-*.server.log | head -n1 | xargs cat + - name: Install qemu + continue-on-error: true + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + - uses: actions/checkout@v4 + with: + repository: ${{ github.repository_owner }}/cryostat + ref: main + submodules: true + fetch-depth: 0 + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: maven-settings + uses: s4u/maven-settings-action@v2 + with: + githubServer: true + - name: ghcr login + uses: redhat-actions/podman-login@v1 + with: + registry: ghcr.io/${{ github.repository_owner }} + username: ${{ github.event.comment.user.login }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: pull cryostat image + run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} + - name: tag cryostat image + run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat-core + - name: Run integration tests + run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Print itest logs + if: failure() + run: ls -1dt target/cryostat-itest-*.log | head -n1 | xargs cat + - name: Print itest container logs + if: failure() + run: ls -1dt target/cryostat-*.server.log | head -n1 | xargs cat From 79c7cabbcb26b049c60003b03f09a712d6dddcb0 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 11:44:22 -0400 Subject: [PATCH 43/69] pull quay images --- .github/workflows/cryostat-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 09036feb..902bd022 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -74,6 +74,8 @@ jobs: run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - name: tag cryostat image run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat-core + - name: pull other images + run: podman pull quay.io/cryostat/jfr-datasource quay.io/cryostat/grafana quay.io/cryostat/ - name: Run integration tests run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash env: From 55d0fbc940018837da8058f12a5f53bafaa352aa Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 11:59:35 -0400 Subject: [PATCH 44/69] safe-to-tests --- .github/workflows/ci.yaml | 7 +++++ .github/workflows/cryostat-test.yml | 42 +++++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 92da16b1..587c2be6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,6 +19,13 @@ on: - cryostat-v[0-9]+.[0-9]+ jobs: + check-before-build: + runs-on: ubuntu-latest + steps: + - name: Fail if safe-to-test is not applied + if: (!contains(github.event.pull_request.labels.*.name, 'safe-to-test')) + run: exit 1 + build-core: runs-on: ubuntu-latest outputs: diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 902bd022..01d6dc39 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -10,8 +10,41 @@ on: - created jobs: + check-before-build: + runs-on: ubuntu-latest + if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/build_test') + permissions: + pull-requests: write + steps: + - name: Show warning if permission is denied + if: | + !(github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') + && (!contains(github.event.issue.labels.*.name, 'safe-to-test') || github.event.issue.user.name != github.event.comment.user.name) + uses: thollander/actions-comment-pull-request@v2 + with: + message: |- + You do not have permission to run the /build_test command. Please ask @cryostatio/reviewers + to resolve the issue. + - name: Fail if command permission is denied + if: | + !(github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') + && (!contains(github.event.issue.labels.*.name, 'safe-to-test') || github.event.issue.user.name != github.event.comment.user.name) + run: exit 1 + - name: React to comment + uses: actions/github-script@v4 + with: + script: | + const {owner, repo} = context.issue + github.reactions.createForIssueComment({ + owner, + repo, + comment_id: context.payload.comment.id, + content: "+1", + }); + checkout-branch: runs-on: ubuntu-latest + needs: [check-before-build] outputs: PR_head_ref: ${{ fromJSON(steps.comment-branch.outputs.result).ref }} PR_head_sha: ${{ fromJSON(steps.comment-branch.outputs.result).sha }} @@ -33,7 +66,6 @@ jobs: cryostat-test: runs-on: ubuntu-latest - if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/cryostat_test') needs: [checkout-branch] env: build_arch: 'arm64' @@ -70,12 +102,18 @@ jobs: registry: ghcr.io/${{ github.repository_owner }} username: ${{ github.event.comment.user.login }} password: ${{ secrets.GITHUB_TOKEN }} + - name: quay login + uses: redhat-actions/podman-login@v1 + with: + registry: ghcr.io/cryostat + username: ${{ github.event.comment.user.login }} + password: ${{ secrets.GITHUB_TOKEN }} - name: pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - name: tag cryostat image run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat-core - name: pull other images - run: podman pull quay.io/cryostat/jfr-datasource quay.io/cryostat/grafana quay.io/cryostat/ + run: podman pull quay.io/cryostat/jfr-datasource quay.io/cryostat/grafana - name: Run integration tests run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash env: From 6b953626b55a96e5cfdce63ca9c08e91ae1a28b6 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 12:09:45 -0400 Subject: [PATCH 45/69] test --- .github/workflows/cryostat-test.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 01d6dc39..ac5f6e59 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -102,20 +102,13 @@ jobs: registry: ghcr.io/${{ github.repository_owner }} username: ${{ github.event.comment.user.login }} password: ${{ secrets.GITHUB_TOKEN }} - - name: quay login - uses: redhat-actions/podman-login@v1 - with: - registry: ghcr.io/cryostat - username: ${{ github.event.comment.user.login }} - password: ${{ secrets.GITHUB_TOKEN }} - name: pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - name: tag cryostat image run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat-core - - name: pull other images - run: podman pull quay.io/cryostat/jfr-datasource quay.io/cryostat/grafana - name: Run integration tests - run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash + #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash + run: ./mvnw exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana-dashboard exec:exec@start-container exec:exec@wait-for-container failsafe:integration-test exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From ac8e05fd7761cd1606f53085e97142001f970315 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 16:05:38 -0400 Subject: [PATCH 46/69] update --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index ac5f6e59..06230cd4 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -108,7 +108,7 @@ jobs: run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat-core - name: Run integration tests #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - run: ./mvnw exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana-dashboard exec:exec@start-container exec:exec@wait-for-container failsafe:integration-test exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod + run: ./mvnw exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From 4e1bf0147ede70ae7fd406f293c60aefa20070b9 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 16:09:00 -0400 Subject: [PATCH 47/69] test --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 06230cd4..cff0574c 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -108,7 +108,7 @@ jobs: run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat-core - name: Run integration tests #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - run: ./mvnw exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod + run: ./mvnw exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-container exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-container failsafe:integration-test exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From cc8ea311ac3ecff54f1a1ad3fe799ca0d38966cd Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 16:16:48 -0400 Subject: [PATCH 48/69] t --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index cff0574c..0c06aa54 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -108,7 +108,7 @@ jobs: run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat-core - name: Run integration tests #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - run: ./mvnw exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-container exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-container failsafe:integration-test exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod + run: ./mvnw exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From bb2e713bdfb5dd9d63daf7f301e8d453e16bd42c Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 16:27:23 -0400 Subject: [PATCH 49/69] test --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 0c06aa54..1eae8411 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -105,7 +105,7 @@ jobs: - name: pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - name: tag cryostat image - run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat-core + run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat - name: Run integration tests #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash run: ./mvnw exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod From 629704f00258927c4aec2f9acbee0ea4c49dc356 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 16:33:52 -0400 Subject: [PATCH 50/69] test --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 1eae8411..879fee13 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -108,7 +108,7 @@ jobs: run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat - name: Run integration tests #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - run: ./mvnw exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod + run: ./mvnw build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From 7e054f17620a19952e4ee27fc2b92fcc025429ca Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 16:36:32 -0400 Subject: [PATCH 51/69] test --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 879fee13..24077be8 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -108,7 +108,7 @@ jobs: run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat - name: Run integration tests #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - run: ./mvnw build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod + run: ./mvnw build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From 33892831327aadf8fe6e31dddb73eedc0deb1edc Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 16:38:12 -0400 Subject: [PATCH 52/69] test --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 24077be8..168b60c5 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -108,7 +108,7 @@ jobs: run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat - name: Run integration tests #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - run: ./mvnw build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod + run: ./mvnw -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From 0a96841e5cbfe9c72a7ae639b0b92d91e381c08e Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 16:46:50 -0400 Subject: [PATCH 53/69] test --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 168b60c5..562f754c 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -105,7 +105,7 @@ jobs: - name: pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - name: tag cryostat image - run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/${{ github.repository_owner }}/cryostat + run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat - name: Run integration tests #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash run: ./mvnw -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod From db6ec717fbbf85e627664866435d4986326679c5 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 17:00:12 -0400 Subject: [PATCH 54/69] test --- .github/workflows/cryostat-test.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 562f754c..5692777b 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -78,7 +78,7 @@ jobs: - uses: actions/checkout@v4 with: repository: ${{ github.repository_owner }}/cryostat - ref: main + ref: core-ci-test submodules: true fetch-depth: 0 - uses: actions/setup-java@v3 @@ -104,11 +104,8 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - - name: tag cryostat image - run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat - name: Run integration tests - #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - run: ./mvnw -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-container exec:exec@destroy-pod + run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} IMAGE_STREAM=ghcr.io/${{ github.repository_owner }}/cryostat-core bash repeated-integration-tests.bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From b43246ad0864a90c6c71f9aed2961d594534f1fd Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 17:11:37 -0400 Subject: [PATCH 55/69] test --- .github/workflows/cryostat-test.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 5692777b..40bb901a 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -78,7 +78,7 @@ jobs: - uses: actions/checkout@v4 with: repository: ${{ github.repository_owner }}/cryostat - ref: core-ci-test + ref: main submodules: true fetch-depth: 0 - uses: actions/setup-java@v3 @@ -104,8 +104,13 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} + - name: tag cryostat image + run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat + - name: clean up old pods + run: ./mvnw exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod - name: Run integration tests - run: POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} IMAGE_STREAM=ghcr.io/${{ github.repository_owner }}/cryostat-core bash repeated-integration-tests.bash + #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash + run: ./mvnw -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From 6e416fd3c306474250890da5bb310bf3e0a0daf5 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 17:20:07 -0400 Subject: [PATCH 56/69] tets --- .github/workflows/cryostat-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 40bb901a..fab2d637 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -108,6 +108,8 @@ jobs: run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat - name: clean up old pods run: ./mvnw exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run integration tests #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash run: ./mvnw -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod From 54d1b6fbfe6f5e6d2d8235306a6031e01eb80d35 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 17:26:20 -0400 Subject: [PATCH 57/69] test --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index fab2d637..889864fd 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -107,7 +107,7 @@ jobs: - name: tag cryostat image run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat - name: clean up old pods - run: ./mvnw exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod + run: ./mvnw -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run integration tests From e78e5648f40794b4791bb03acc64b58efb736d9b Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 17:30:46 -0400 Subject: [PATCH 58/69] f --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 889864fd..c21a616c 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -107,7 +107,7 @@ jobs: - name: tag cryostat image run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat - name: clean up old pods - run: ./mvnw -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod + run: ./mvnw -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run integration tests From bf132a5a8833e56f9c2aaae7a93f3fe839e1060c Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 17:34:18 -0400 Subject: [PATCH 59/69] test --- .github/workflows/cryostat-test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index c21a616c..c93fdeec 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -106,10 +106,6 @@ jobs: run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - name: tag cryostat image run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat - - name: clean up old pods - run: ./mvnw -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@destroy-pod - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Run integration tests #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash run: ./mvnw -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod From 15f75e6882ee087264a7664d094a99a729f287c8 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 17:48:28 -0400 Subject: [PATCH 60/69] test --- .github/workflows/cryostat-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index c93fdeec..f65794d2 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -107,8 +107,8 @@ jobs: - name: tag cryostat image run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat - name: Run integration tests - #run: PULL_IMAGES=never POD_NAME=cryostat-itests CONTAINER_NAME=cryostat-itest ITEST_IMG_VERSION=latest bash repeated-integration-tests.bash - run: ./mvnw -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod + #run: PULL_IMAGES=never bash repeated-integration-tests.bash + run: ./mvnw -DfailIfNoTests=true -Dcryostat.itest.pullImages=never -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From 3d8dfeb61fd1de889e613944bbe47fba3941219e Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 17:57:04 -0400 Subject: [PATCH 61/69] test --- .github/workflows/cryostat-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index f65794d2..b2e218ba 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -108,7 +108,7 @@ jobs: run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat - name: Run integration tests #run: PULL_IMAGES=never bash repeated-integration-tests.bash - run: ./mvnw -DfailIfNoTests=true -Dcryostat.itest.pullImages=never -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod + run: ./mvnw -DfailIfNoTests=true build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From 512d79aca0baefe6280dfc70ab18a42294eba6ee Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 18:06:10 -0400 Subject: [PATCH 62/69] test --- .github/workflows/cryostat-test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index b2e218ba..498b161a 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -105,10 +105,9 @@ jobs: - name: pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - name: tag cryostat image - run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat + run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat:test-core - name: Run integration tests - #run: PULL_IMAGES=never bash repeated-integration-tests.bash - run: ./mvnw -DfailIfNoTests=true build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod + run: ./mvnw -DfailIfNoTests=true -Dcryostat.itest.imageTag=test-core build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From 9afe4e491dcf40b6b78bc2f40768da762e1cf685 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Fri, 13 Oct 2023 18:12:26 -0400 Subject: [PATCH 63/69] test --- .github/workflows/cryostat-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 498b161a..d5fea1d3 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -105,9 +105,9 @@ jobs: - name: pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - name: tag cryostat image - run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat:test-core + run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat - name: Run integration tests - run: ./mvnw -DfailIfNoTests=true -Dcryostat.itest.imageTag=test-core build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod + run: ./mvnw -DfailIfNoTests=true -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From 26fbf5d9269cd9a6757e83e7c2179fbf7983a897 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Mon, 16 Oct 2023 11:09:23 -0400 Subject: [PATCH 64/69] test --- .github/workflows/cryostat-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index d5fea1d3..3f635ef2 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -105,9 +105,9 @@ jobs: - name: pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - name: tag cryostat image - run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat + run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat:test-core - name: Run integration tests - run: ./mvnw -DfailIfNoTests=true -Dcryostat.itest.imageTag=latest build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@stop-jfr-datasource exec:exec@stop-grafana exec:exec@stop-cryostat exec:exec@destroy-pod + run: ./mvnw -DfailIfNoTests=true -Dcryostat.itest.imageTag=test-core build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@destroy-pod env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From 0030737edd15405ab6a3970632fea78851b47a55 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Mon, 16 Oct 2023 11:53:39 -0400 Subject: [PATCH 65/69] update --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 587c2be6..9da97d55 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -89,7 +89,7 @@ jobs: run: podman save -o cryostat-${{ matrix.arch }}.tar --format oci-archive quay.io/cryostat/cryostat - uses: actions/upload-artifact@v3 with: - name: cryostat-${{ inputs.build-arch }} + name: cryostat-${{ matrix.arch } path: ${{ github.workspace }}/cryostat-${{ matrix.arch }}.tar push-to-ghcr: From 7473f7421db01e7d8c81b3ba1f3867102e963134 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Mon, 16 Oct 2023 11:54:21 -0400 Subject: [PATCH 66/69] fixs --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9da97d55..87121bda 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -89,7 +89,7 @@ jobs: run: podman save -o cryostat-${{ matrix.arch }}.tar --format oci-archive quay.io/cryostat/cryostat - uses: actions/upload-artifact@v3 with: - name: cryostat-${{ matrix.arch } + name: cryostat-${{ matrix.arch }} path: ${{ github.workspace }}/cryostat-${{ matrix.arch }}.tar push-to-ghcr: From 8e0bd1cb108fd45dd23cf1943e95993dbe92fd8d Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Mon, 16 Oct 2023 12:18:52 -0400 Subject: [PATCH 67/69] test --- .github/workflows/cryostat-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 3f635ef2..06af3a68 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -107,7 +107,8 @@ jobs: - name: tag cryostat image run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat:test-core - name: Run integration tests - run: ./mvnw -DfailIfNoTests=true -Dcryostat.itest.imageTag=test-core build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@destroy-pod + #run: ./mvnw -DfailIfNoTests=true -Dcryostat.itest.imageTag=test-core build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@destroy-pod + run: TEST_IMG_VERSION=test-core bash repeated-integration-tests.bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From b20e691ae4d424d295dc30f96177e16260a47e08 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Mon, 16 Oct 2023 13:38:57 -0400 Subject: [PATCH 68/69] twest --- .github/workflows/cryostat-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index 06af3a68..f2360091 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -105,10 +105,10 @@ jobs: - name: pull cryostat image run: podman pull ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} - name: tag cryostat image - run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat:test-core + run: podman tag ghcr.io/${{ github.repository_owner }}/cryostat-core:pr-${{ needs.checkout-branch.outputs.PR_num }}-${{ needs.checkout-branch.outputs.PR_head_sha }}-linux-${{ env.build_arch }} quay.io/cryostat/cryostat - name: Run integration tests #run: ./mvnw -DfailIfNoTests=true -Dcryostat.itest.imageTag=test-core build-helper:regex-property@image-tag-to-lower exec:exec@create-pod exec:exec@start-jfr-datasource exec:exec@start-grafana exec:exec@start-cryostat exec:exec@wait-for-jfr-datasource exec:exec@wait-for-grafana exec:exec@wait-for-cryostat failsafe:integration-test failsafe:verify exec:exec@capture-oci-logs exec:exec@destroy-pod - run: TEST_IMG_VERSION=test-core bash repeated-integration-tests.bash + run: bash repeated-integration-tests.bash env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print itest logs From 787f8f569a7972c58e36fab7ca28b3f794a23763 Mon Sep 17 00:00:00 2001 From: Ming Wang Date: Wed, 18 Oct 2023 15:58:22 -0400 Subject: [PATCH 69/69] test --- .github/workflows/cryostat-test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cryostat-test.yml b/.github/workflows/cryostat-test.yml index f2360091..8ff41241 100644 --- a/.github/workflows/cryostat-test.yml +++ b/.github/workflows/cryostat-test.yml @@ -6,8 +6,7 @@ concurrency: on: issue_comment: - types: - - created + types: [created] jobs: check-before-build: @@ -16,6 +15,11 @@ jobs: permissions: pull-requests: write steps: + - name: add status check + uses: actions/checkout@v4 + - run: gh pr checkout ${{ github.event.issue.number }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Show warning if permission is denied if: | !(github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')