File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ jobs:
256256 aws s3 cp ./build/distributions/aws-opentelemetry-java-layer.zip s3://adot-main-build-staging-jar/adot-java-lambda-layer-${{ github.run_id }}.zip
257257
258258 application-signals-e2e-test :
259+ name : " Application Signals E2E Test"
259260 needs : [build, application-signals-lambda-layer-build]
260261 uses : ./.github/workflows/application-signals-e2e-test.yml
261262 secrets : inherit
Original file line number Diff line number Diff line change 2525 runs-on : ubuntu-latest
2626 steps :
2727 - uses : actions/checkout@v5
28+
29+ - name : Check main build status
30+ env :
31+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32+ run : |
33+ WORKFLOW_ID=$(gh api repos/${{ github.repository }}/actions/workflows --jq '.workflows[] | select(.name=="Java Agent Main Build") | .id')
34+ 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}')
35+ STATUS=$(echo "$LATEST_RUN" | jq -r '.status')
36+ CONCLUSION=$(echo "$LATEST_RUN" | jq -r '.conclusion')
37+
38+ if [ "$STATUS" = "in_progress" ] || [ "$STATUS" = "queued" ]; then
39+ echo "Main build is still running (status: $STATUS). Cannot proceed with release."
40+ exit 1
41+ elif [ "$CONCLUSION" != "success" ]; then
42+ echo "Latest main build on branch ${{ github.ref_name }} conclusion: $CONCLUSION"
43+ exit 1
44+ fi
45+ echo "Main build succeeded, proceeding with release"
2846 - uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
2947 with :
3048 java-version-file : .java-version
You can’t perform that action at this time.
0 commit comments