Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing main build failure #680

Merged
merged 3 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
outputs:
java_agent_tag: ${{ steps.java_agent_versioning.outputs.STAGING_TAG}}
staging-image: ${{ steps.imageOutput.outputs.stagingImage }}
staging_registry: ${{ steps.imageOutput.outputs.stagingRegistry }}
staging_repository: ${{ steps.imageOutput.outputs.stagingRepository }}
aws_default_region: ${{ env.AWS_DEFAULT_REGION }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -98,29 +101,31 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Get current version
id: getADOTJavaVersion
shell: bash
run: |
echo "ADOT_JAVA_VERSION=$(./gradlew printVersion -q )" >> $GITHUB_ENV
run: echo "adot_java_version=$(./gradlew printVersion -q )" >> $GITHUB_OUTPUT

- name: Get ADOT_JAVA_AGENT Image Tag
id: java_agent_versioning
run: |
shortsha="$(git rev-parse --short HEAD)"
java_agent_tag=${{ env.ADOT_JAVA_VERSION }}-$shortsha
java_agent_tag=${{ steps.getADOTJavaVersion.outputs.adot_java_version }}-$shortsha
echo "STAGING_TAG=$java_agent_tag" >> $GITHUB_OUTPUT

- name: Set image to output
id: imageOutput
run: echo "stagingImage=${{ env.STAGING_ECR_REGISTRY }}/${{ env.STAGING_ECR_REPOSITORY }}:${{ steps.java_agent_versioning.outputs.STAGING_TAG }}" >> $GITHUB_OUTPUT
run: |
echo "stagingRegistry=${{ env.STAGING_ECR_REGISTRY }}" >> $GITHUB_OUTPUT
echo "stagingRepository=${{ env.STAGING_ECR_REPOSITORY }}" >> $GITHUB_OUTPUT
echo "stagingImage=${{ env.STAGING_ECR_REGISTRY }}/${{ env.STAGING_ECR_REPOSITORY }}:${{ steps.java_agent_versioning.outputs.STAGING_TAG }}" >> $GITHUB_OUTPUT

- name: Build and Push Java Agent Image and Execute cpUtility Tests
uses: ./.github/workflows/build-and-push-image-with-cpUtility-test.yml
secrets: inherit
with:
aws-region: us-west-2
image_uri_with_tag: ${{ steps.imageOutput.outputs.stagingImage }}
image_registry: ${{ env.STAGING_ECR_REGISTRY }}
adot-java-version: ${{ env.ADOT_JAVA_VERSION }}
image_registry: ${{ steps.imageOutput.outputs.stagingRegistry }}
adot-java-version: ${{ steps.getADOTJavaVersion.outputs.adot_java_version }}

- name: Upload to GitHub Actions
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -150,9 +155,9 @@ 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: ${{ env.STAGING_ECR_REGISTRY }}/${{ env.STAGING_ECR_REPOSITORY }}
image_uri: ${{ needs.build.outputs.staging_registry }}/${{ needs.build.outputs.staging_repository }}
test_ref: ${{ needs.create-test-ref.outputs.testRef }}
caller-workflow-name: 'main-build'

Expand All @@ -162,7 +167,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 All @@ -172,7 +177,7 @@ jobs:
uses: ./.github/workflows/contract-tests.yml
secrets: inherit
with:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
aws-region: ${{ needs.build.outputs.aws_default_region }}
caller-workflow-name: 'main-build'

# AppSignals specific e2e tests
Expand All @@ -184,7 +189,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
29 changes: 17 additions & 12 deletions .github/workflows/nightly-upstream-snapshot-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
outputs:
time_stamp_tag: ${{ steps.generate_time_stamp.outputs.nowTimeTag}}
release-candidate-image: ${{ steps.imageOutput.outputs.rcImage }}
image_registry: ${{ steps.imageOutput.outputs.imageRegistry }}
image_name: ${{ steps.imageOutput.outputs.imageName }}
aws_default_region: ${{ env.AWS_DEFAULT_REGION }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -69,26 +72,28 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Get current version
id: getADOTJavaVersion
shell: bash
run: |
echo "ADOT_JAVA_VERSION=$(./gradlew printVersion -q -PtestUpstreamSnapshots=true )" >> $GITHUB_ENV
run: echo "adot_java_version=$(./gradlew printVersion -q -PtestUpstreamSnapshots=true )" >> $GITHUB_OUTPUT

- name: Generate timestamp for image tag
id: generate_time_stamp
run: echo "nowTimeTag=$(date +'%Y-%m-%dT%H-%M-%S')" >> $$GITHUB_OUTPUT
run: echo "nowTimeTag=$(date +'%Y-%m-%dT%H-%M-%S')" >> $GITHUB_OUTPUT

- name: Set image to output
id: imageOutput
run: echo "rcImage=${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.generate_time_stamp.outputs.nowTimeTag }}" >> $GITHUB_OUTPUT
run: |
echo "imageRegistry=${{ env.IMAGE_REGISTRY }}" >> $GITHUB_OUTPUT
echo "imageName=${{ env.IMAGE_NAME }}" >> $GITHUB_OUTPUT
echo "rcImage=${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.generate_time_stamp.outputs.nowTimeTag }}" >> $GITHUB_OUTPUT

- name: Build and Push Java Agent Image and Execute cpUtility Tests
uses: ./.github/workflows/build-and-push-image-with-cpUtility-test.yml
secrets: inherit
with:
aws-region: us-west-2
image_uri_with_tag: ${{ steps.imageOutput.outputs.rcImage }}
image_registry: ${{ env.IMAGE_REGISTRY }}
adot-java-version: ${{ env.ADOT_JAVA_VERSION }}
image_registry: ${{ steps.imageOutput.outputs.imageRegistry }}
adot-java-version: ${{ steps.getADOTJavaVersion.outputs.adot_java_version }}

- name: Upload to GitHub Actions
uses: actions/upload-artifact@v3
Expand All @@ -104,9 +109,9 @@ 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: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}
image_uri: ${{ needs.build.outputs.image_registry }}/${{ needs.build.outputs.image_name }}
test_ref: 'terraform'
caller-workflow-name: 'nightly-upstream-snapshot-build'

Expand All @@ -116,7 +121,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: ${{ needs.build.outputs.time_stamp_tag }}
caller-workflow-name: 'nightly-upstream-snapshot-build'

Expand All @@ -126,7 +131,7 @@ jobs:
uses: ./.github/workflows/contract-tests.yml
secrets: inherit
with:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
aws-region: ${{ needs.build.outputs.aws_default_region }}
caller-workflow-name: 'nightly-upstream-snapshot-build'

# AppSignals specific e2e tests
Expand All @@ -138,7 +143,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