From a50e1df9849b382789da7c98bc1da3f08272be2e Mon Sep 17 00:00:00 2001 From: Mahad Janjua Date: Mon, 22 Jul 2024 10:58:50 -0700 Subject: [PATCH 1/2] Revert "Add build release step back" This reverts commit de611c9ec4d01bac0d04ccba706caff0fc94bf0f. --- .github/workflows/release-build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index cf1180babb..a19454b75b 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -46,10 +46,10 @@ jobs: # with: # registry: public.ecr.aws - - name: Build release with Gradle - uses: gradle/gradle-build-action@v3 - with: - arguments: build integrationTests -PlocalDocker=true -Prelease.version=${{ github.event.inputs.version }} --stacktrace + # - name: Build release with Gradle + # uses: gradle/gradle-build-action@v3 + # with: + # arguments: build integrationTests -PlocalDocker=true -Prelease.version=${{ github.event.inputs.version }} --stacktrace # - name: Configure AWS Credentials # uses: aws-actions/configure-aws-credentials@v4 From 55f15d7d13d630fd63a50e701bb5d1ee24a0143d Mon Sep 17 00:00:00 2001 From: Mahad Janjua Date: Mon, 22 Jul 2024 10:58:58 -0700 Subject: [PATCH 2/2] Revert "temp: Comment out ECR-related release steps" This reverts commit 648cf5dabc272af56a470e4c190b4ae87cd1e216. --- .github/workflows/release-build.yml | 136 ++++++++++++++-------------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index a19454b75b..72b88a8eb6 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -35,74 +35,74 @@ jobs: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} gpg_password: ${{ secrets.GPG_PASSPHRASE }} - # - name: Configure AWS Credentials - # uses: aws-actions/configure-aws-credentials@v4 - # with: - # role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }} - # aws-region: ${{ env.AWS_PUBLIC_ECR_REGION }} - - # - name: Log in to AWS ECR - # uses: docker/login-action@v3 - # with: - # registry: public.ecr.aws - - # - name: Build release with Gradle - # uses: gradle/gradle-build-action@v3 - # with: - # arguments: build integrationTests -PlocalDocker=true -Prelease.version=${{ github.event.inputs.version }} --stacktrace - - # - name: Configure AWS Credentials - # uses: aws-actions/configure-aws-credentials@v4 - # with: - # role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN_RELEASE }} - # aws-region: ${{ env.AWS_PUBLIC_ECR_REGION }} - - # - name: Log in to AWS ECR - # uses: docker/login-action@v3 - # with: - # registry: public.ecr.aws - - # - name: Configure AWS Credentials for Private ECR - # uses: aws-actions/configure-aws-credentials@v4 - # with: - # role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN_RELEASE }} - # aws-region: ${{ env.AWS_PRIVATE_ECR_REGION }} - - # - name: Log in to AWS private ECR - # uses: docker/login-action@v3 - # with: - # registry: ${{ env.PRIVATE_REGISTRY }} - - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 - - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - - # - name: Build image for testing - # uses: docker/build-push-action@v5 - # with: - # push: false - # build-args: "ADOT_JAVA_VERSION=${{ github.event.inputs.version }}" - # context: . - # platforms: linux/amd64 - # tags: ${{ env.TEST_TAG }} - # load: true - - # - name: Test docker image - # shell: bash - # run: .github/scripts/test-adot-javaagent-image.sh "${{ env.TEST_TAG }}" "${{ github.event.inputs.version }}" - - # - name: Build and push image - # uses: docker/build-push-action@v5 - # with: - # push: true - # build-args: "ADOT_JAVA_VERSION=${{ github.event.inputs.version }}" - # context: . - # platforms: linux/amd64,linux/arm64 - # tags: | - # ${{ env.PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }} - # ${{ env.PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }} + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }} + aws-region: ${{ env.AWS_PUBLIC_ECR_REGION }} + + - name: Log in to AWS ECR + uses: docker/login-action@v3 + with: + registry: public.ecr.aws + + - name: Build release with Gradle + uses: gradle/gradle-build-action@v3 + with: + arguments: build integrationTests -PlocalDocker=true -Prelease.version=${{ github.event.inputs.version }} --stacktrace + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN_RELEASE }} + aws-region: ${{ env.AWS_PUBLIC_ECR_REGION }} + + - name: Log in to AWS ECR + uses: docker/login-action@v3 + with: + registry: public.ecr.aws + + - name: Configure AWS Credentials for Private ECR + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN_RELEASE }} + aws-region: ${{ env.AWS_PRIVATE_ECR_REGION }} + + - name: Log in to AWS private ECR + uses: docker/login-action@v3 + with: + registry: ${{ env.PRIVATE_REGISTRY }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build image for testing + uses: docker/build-push-action@v5 + with: + push: false + build-args: "ADOT_JAVA_VERSION=${{ github.event.inputs.version }}" + context: . + platforms: linux/amd64 + tags: ${{ env.TEST_TAG }} + load: true + + - name: Test docker image + shell: bash + run: .github/scripts/test-adot-javaagent-image.sh "${{ env.TEST_TAG }}" "${{ github.event.inputs.version }}" + + - name: Build and push image + uses: docker/build-push-action@v5 + with: + push: true + build-args: "ADOT_JAVA_VERSION=${{ github.event.inputs.version }}" + context: . + platforms: linux/amd64,linux/arm64 + tags: | + ${{ env.PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }} + ${{ env.PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }} - name: Build and Publish release with Gradle uses: gradle/gradle-build-action@v3