Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ jobs:
aws s3 cp ./build/distributions/aws-opentelemetry-java-layer.zip s3://adot-main-build-staging-jar/adot-java-lambda-layer-${{ github.run_id }}.zip

application-signals-e2e-test:
name: "Application Signals E2E Test"
needs: [build, application-signals-lambda-layer-build]
uses: ./.github/workflows/application-signals-e2e-test.yml
secrets: inherit
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Check main build status
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
WORKFLOW_ID=$(gh api repos/${{ github.repository }}/actions/workflows --jq '.workflows[] | select(.name=="Java Agent Main Build") | .id')
LATEST_RUN=$(gh api repos/${{ github.repository }}/actions/workflows/$WORKFLOW_ID/runs --jq '[.workflow_runs[] | select(.head_branch=="${{ github.ref_name }}")] | sort_by(.created_at) | .[-1] | {conclusion, status}')
STATUS=$(echo "$LATEST_RUN" | jq -r '.status')
CONCLUSION=$(echo "$LATEST_RUN" | jq -r '.conclusion')

if [ "$STATUS" = "in_progress" ] || [ "$STATUS" = "queued" ]; then
echo "Main build is still running (status: $STATUS). Cannot proceed with release."
exit 1
elif [ "$CONCLUSION" != "success" ]; then
echo "Latest main build on branch ${{ github.ref_name }} conclusion: $CONCLUSION"
exit 1
fi
echo "Main build succeeded, proceeding with release"
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
java-version-file: .java-version
Expand Down
Loading