From d50487c6e315d8c8f561a64e7c12a2d9bfe954da Mon Sep 17 00:00:00 2001 From: jjllee Date: Thu, 5 Dec 2024 11:16:13 -0800 Subject: [PATCH] test --- .github/workflows/release-ocb-components.yml | 168 ++++++++++--------- 1 file changed, 87 insertions(+), 81 deletions(-) diff --git a/.github/workflows/release-ocb-components.yml b/.github/workflows/release-ocb-components.yml index 972522006ee7..a9f87873c4d7 100644 --- a/.github/workflows/release-ocb-components.yml +++ b/.github/workflows/release-ocb-components.yml @@ -12,8 +12,8 @@ permissions: contents: read env: - E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }} - E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }} + # E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }} + # E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }} OCB_MODULE_VERSION: ${{ inputs.ocb-module-version }} jobs: @@ -22,109 +22,115 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: aws-ocb-dev - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::${{ env.E2E_TEST_ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }} - aws-region: us-east-1 - - - name: Retrieve account - uses: aws-actions/aws-secretsmanager-get-secrets@v2 - with: - secret-ids: | - ACCOUNT_ID, otlp-region-account/gamma-us-east-1 - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_NAME }} - aws-region: us-east-1 + ref: aws-ocb-dev-workflows-checkpoint + + # - name: Configure AWS Credentials + # uses: aws-actions/configure-aws-credentials@v4 + # with: + # role-to-assume: arn:aws:iam::${{ env.E2E_TEST_ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }} + # aws-region: us-east-1 + + # - name: Retrieve account + # uses: aws-actions/aws-secretsmanager-get-secrets@v2 + # with: + # secret-ids: | + # ACCOUNT_ID, otlp-region-account/gamma-us-east-1 + + # - name: Configure AWS Credentials + # uses: aws-actions/configure-aws-credentials@v4 + # with: + # role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_NAME }} + # aws-region: us-east-1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to private AWS ECR - uses: docker/login-action@v3 - with: - registry: ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com - env: - AWS_REGION: us-east-1 + # - name: Login to private AWS ECR + # uses: docker/login-action@v3 + # with: + # registry: ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com + # env: + # AWS_REGION: us-east-1 - name: Update versions used in OCB testing run: | sed -i -e 's#${TEST_COMPONENT_GITHASH}#${{ github.sha }}#g' ./ocb-utils/builder-config-appsignals.yaml sed -i -e 's#${OCB_VERSION}#${{ env.OCB_MODULE_VERSION }}#g' ./ocb-utils/builder-config-appsignals.yaml sed -i -e 's#${OCB_VERSION}#${{ env.OCB_MODULE_VERSION }}#g' ./ocb-utils/Dockerfile - - - name: Build and push image with latest git hash as tag - uses: docker/build-push-action@v5 - with: - push: true - context: ./ocb-utils/ - file: ./ocb-utils/Dockerfile - platforms: linux/amd64 - tags: ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/ocb-release-test-collector:${{ github.sha }} - load: false - cache-from: type=gha,scope=build-${{ github.ref_name }}-ocb - cache-to: type=gha,scope=build-${{ github.ref_name }}-ocb - - ocb-e2e-test: - secrets: inherit - needs: [ setup-ocb-test-image ] - uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-eks-otlp-ocb-test.yml@main - with: - aws-region: us-east-1 - test-cluster-name: 'e2e-otel-collector-contrib-release-test' - caller-workflow-name: 'appsignals-java-e2e-eks-otlp-ocb-release-test' - java-version: '11' - e2e-otel-collector-image-tag: ${{ github.sha }} + + - name: CAT + run: | + cat ./ocb-utils/builder-config-appsignals.yaml + cat ./ocb-utils/Dockerfile + + + # - name: Build and push image with latest git hash as tag + # uses: docker/build-push-action@v5 + # with: + # push: true + # context: ./ocb-utils/ + # file: ./ocb-utils/Dockerfile + # platforms: linux/amd64 + # tags: ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/ocb-release-test-collector:${{ github.sha }} + # load: false + # cache-from: type=gha,scope=build-${{ github.ref_name }}-ocb + # cache-to: type=gha,scope=build-${{ github.ref_name }}-ocb + + # ocb-e2e-test: + # secrets: inherit + # needs: [ setup-ocb-test-image ] + # uses: aws-observability/aws-application-signals-test-framework/.github/workflows/java-eks-otlp-ocb-test.yml@main + # with: + # aws-region: us-east-1 + # test-cluster-name: 'e2e-otel-collector-contrib-release-test' + # caller-workflow-name: 'appsignals-java-e2e-eks-otlp-ocb-release-test' + # java-version: '11' + # e2e-otel-collector-image-tag: ${{ github.sha }} update-canary-image-and-tag-release: runs-on: ubuntu-latest - needs: [ ocb-e2e-test ] + needs: [ setup-ocb-test-image ] permissions: id-token: write contents: write steps: - uses: actions/checkout@v4 with: - ref: aws-ocb-dev - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::${{ env.E2E_TEST_ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }} - aws-region: us-east-1 - - - name: Retrieve account - uses: aws-actions/aws-secretsmanager-get-secrets@v2 - with: - secret-ids: | - ACCOUNT_ID, otlp-region-account/gamma-us-east-1 - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_NAME }} - aws-region: us-east-1 + ref: aws-ocb-dev-workflows-checkpoint + + # - name: Configure AWS Credentials + # uses: aws-actions/configure-aws-credentials@v4 + # with: + # role-to-assume: arn:aws:iam::${{ env.E2E_TEST_ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }} + # aws-region: us-east-1 + + # - name: Retrieve account + # uses: aws-actions/aws-secretsmanager-get-secrets@v2 + # with: + # secret-ids: | + # ACCOUNT_ID, otlp-region-account/gamma-us-east-1 + + # - name: Configure AWS Credentials + # uses: aws-actions/configure-aws-credentials@v4 + # with: + # role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_NAME }} + # aws-region: us-east-1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to private AWS ECR - uses: docker/login-action@v3 - with: - registry: ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com - env: - AWS_REGION: us-east-1 + # - name: Login to private AWS ECR + # uses: docker/login-action@v3 + # with: + # registry: ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com + # env: + # AWS_REGION: us-east-1 - - name: Build and push image with latest tag - run: | - docker image pull ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/ocb-release-test-collector:${{ github.sha }} - docker tag ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/ocb-release-test-collector:${{ github.sha }} ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/ocb-release-test-collector:latest - docker push ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/ocb-release-test-collector:latest + # - name: Build and push image with latest tag + # run: | + # docker image pull ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/ocb-release-test-collector:${{ github.sha }} + # docker tag ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/ocb-release-test-collector:${{ github.sha }} ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/ocb-release-test-collector:latest + # docker push ${{ env.ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/ocb-release-test-collector:latest # - name: Tag OCB modules # run: |