diff --git a/.github/workflows/codebuild-ci.yml b/.github/workflows/codebuild-ci.yml index 853d0099ed3..0901a52a2cf 100644 --- a/.github/workflows/codebuild-ci.yml +++ b/.github/workflows/codebuild-ci.yml @@ -91,6 +91,7 @@ jobs: uses: ./aws-sdk-kotlin/.github/actions/custom-gradle-distribution-url - name: Run Service Check Batch and Calculate Artifact Size Metrics id: svc-check-batch + working-directory: ./aws-sdk-kotlin run: | REPOSITORY=$(echo ${{ github.repository }} | cut -d '/' -f 2) PULL_REQUEST="" @@ -119,12 +120,14 @@ jobs: if: ${{ cancelled() }} env: BUILD_ID: ${{ steps.svc-check-batch.outputs.aws-build-id }} + working-directory: ./aws-sdk-kotlin run: | if [ ! -z "$BUILD_ID" ]; then echo "cancelling in-progress batch build: id=$BUILD_ID" aws codebuild stop-build --id $BUILD_ID fi - name: Collect Artifact Size Metrics + working-directory: ./aws-sdk-kotlin run: | PULL_REQUEST="" INTERNAL=${{ github.event.number }} @@ -143,6 +146,7 @@ jobs: ./gradlew collectDelegatedArtifactSizeMetrics -PpullRequest=$PULL_REQUEST - name: Analyze Artifact Size Metrics + working-directory: ./aws-sdk-kotlin run: ./gradlew analyzeArtifactSizeMetrics - name: Show Results uses: actions/github-script@v7 @@ -197,6 +201,7 @@ jobs: - name: Evaluate Result if: ${{ !contains(github.event.pull_request.labels.*.name, 'acknowledge-artifact-size-increase') }} + working-directory: ./aws-sdk-kotlin run: | cd build/reports/metrics cat has-significant-change.txt | grep false || { @@ -222,6 +227,7 @@ jobs: uses: ./aws-sdk-kotlin/.github/actions/custom-gradle-distribution-url - name: Calculate Artifact Size Metrics id: svc-check-batch + working-directory: ./aws-sdk-kotlin run: | REPOSITORY=$(echo ${{ github.repository }} | cut -d '/' -f 2) @@ -234,14 +240,18 @@ jobs: if: ${{ cancelled() }} env: BUILD_ID: ${{ steps.svc-check-batch.outputs.aws-build-id }} + working-directory: ./aws-sdk-kotlin run: | if [ ! -z "$BUILD_ID" ]; then echo "cancelling in-progress batch build: id=$BUILD_ID" aws codebuild stop-build --id $BUILD_ID fi - name: Collect Artifact Size Metrics + working-directory: ./aws-sdk-kotlin run: ./gradlew collectDelegatedArtifactSizeMetrics -Prelease=${{ github.event.release.tag_name }} - name: Save Artifact Size Metrics + working-directory: ./aws-sdk-kotlin run: ./gradlew saveArtifactSizeMetrics -Prelease=${{ github.event.release.tag_name }} - name: Put Artifact Size Metrics in CloudWatch + working-directory: ./aws-sdk-kotlin run: ./gradlew putArtifactSizeMetricsInCloudWatch -Prelease=${{ github.event.release.tag_name }}