Skip to content

Commit

Permalink
Set default region as build output (#704)
Browse files Browse the repository at this point in the history
* Set output for default region

* Update the rest of the workflows
  • Loading branch information
bryan-aguilar authored Jan 10, 2024
1 parent 11a7f8a commit 59de65d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
staging-image: ${{ steps.imageOutput.outputs.stagingImage }}
staging_registry: ${{ steps.imageOutput.outputs.stagingRegistry }}
staging_repository: ${{ steps.imageOutput.outputs.stagingRepository }}
aws_default_region: ${{ steps.default_region_output.aws_default_region }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -133,6 +134,11 @@ jobs:
name: aws-opentelemetry-agent.jar
path: otelagent/build/libs/aws-opentelemetry-agent-*.jar

- name: Set default region output
id: default_region_output
run: |
echo "aws_default_region=${{ env.AWS_DEFAULT_REGION }}" >> $GITHUB_OUTPUT
create-test-ref:
runs-on: ubuntu-latest
outputs:
Expand All @@ -155,7 +161,7 @@ jobs:
uses: ./.github/workflows/e2e-tests-with-operator.yml
secrets: inherit
with:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
aws-region: ${{ needs.build.outputs.aws_default_region }}
image_tag: ${{ needs.build.outputs.java_agent_tag }}
image_uri: ${{ needs.build.outputs.staging_registry }}/${{ needs.build.outputs.staging_repository }}
test_ref: ${{ needs.create-test-ref.outputs.testRef }}
Expand All @@ -167,7 +173,7 @@ jobs:
uses: ./.github/workflows/e2e-tests-app-with-java-agent.yml
secrets: inherit
with:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
aws-region: ${{ needs.build.outputs.aws_default_region }}
image_tag: ${{ github.sha }}
caller-workflow-name: 'main-build'

Expand Down Expand Up @@ -222,7 +228,7 @@ jobs:
uses: ./.github/workflows/appsignals-e2e-eks-test.yml
secrets: inherit
with:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
aws-region: ${{ needs.build.outputs.aws_default_region }}
test-cluster-name: "e2e-adot-test"
appsignals-adot-image-name: ${{ needs.build.outputs.staging-image }}
caller-workflow-name: 'main-build'
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/nightly-upstream-snapshot-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
release-candidate-image: ${{ steps.imageOutput.outputs.rcImage }}
image_registry: ${{ steps.imageOutput.outputs.imageRegistry }}
image_name: ${{ steps.imageOutput.outputs.imageName }}
aws_default_region: ${{ steps.default_region_output.aws_default_region }}

steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -85,6 +87,11 @@ jobs:
name: aws-opentelemetry-agent.jar
path: otelagent/build/libs/aws-opentelemetry-agent-*.jar

- name: Set default region output
id: default_region_output
run: |
echo "aws_default_region=${{ env.AWS_DEFAULT_REGION }}" >> $GITHUB_OUTPUT
e2e-operator-test:
concurrency:
group: e2e-adot-agent-operator-test
Expand All @@ -93,7 +100,7 @@ jobs:
uses: ./.github/workflows/e2e-tests-with-operator.yml
secrets: inherit
with:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
aws-region: ${{ needs.build.outputs.aws_default_region }}
image_tag: ${{ needs.build.outputs.time_stamp_tag }}
image_uri: ${{ needs.build.outputs.image_registry }}/${{ needs.build.outputs.image_name }}
test_ref: 'terraform'
Expand Down Expand Up @@ -141,7 +148,7 @@ jobs:
uses: ./.github/workflows/appsignals-e2e-eks-test.yml
secrets: inherit
with:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
aws-region: ${{ needs.build.outputs.aws_default_region }}
test-cluster-name: "e2e-adot-test"
appsignals-adot-image-name: ${{ needs.build.outputs.release-candidate-image }}
caller-workflow-name: 'nightly-upstream-snapshot-build'
Expand Down

0 comments on commit 59de65d

Please sign in to comment.