-
Notifications
You must be signed in to change notification settings - Fork 4.3k
ci: fix integration-test-deployment script #35716
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
Changes from all commits
d081bf1
047c01d
1e4630f
31f9616
8f5fe22
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,11 @@ on: | |
| workflow_dispatch: {} | ||
| merge_group: {} | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - labeled | ||
| branches: | ||
| - main | ||
| paths: | ||
|
|
@@ -21,26 +26,18 @@ jobs: | |
| integration_test_deployment: | ||
| runs-on: codebuild-aws-cdk-github-actions-deployment-integ-runner-${{ github.run_id }}-${{ github.run_attempt }} | ||
| environment: deployment-integ-test # Do not change or remove this without discussing with Appsec | ||
| if: contains(github.event.pull_request.labels.*.name, 'pr/needs-integration-tests-deployment ') | ||
| if: contains(github.event.pull_request.labels.*.name, 'pr/needs-integration-tests-deployment') | ||
| name: 'Deploy integration test snapshots (requires `pr/needs-integration-tests-deployment` label)' | ||
|
|
||
| env: | ||
| PR_BUILD: true | ||
|
|
||
| steps: | ||
| - name: Checkout BASE | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: ${{ github.event.pull_request.base.sha }} | ||
| fetch-depth: 0 | ||
| path: base | ||
|
|
||
| - name: Checkout HEAD | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| fetch-depth: 0 | ||
| path: head | ||
|
|
||
| - name: Configure AWS credentials | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we have the OIDC? Unless there's some concern on it that i'm not aware of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OIDC added back in. I'm currently testing in my fork if it still works. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| uses: aws-actions/configure-aws-credentials@v5 | ||
|
|
@@ -55,8 +52,7 @@ jobs: | |
| node-version: "lts/*" | ||
| cache: "yarn" | ||
| cache-dependency-path: | | ||
| base/yarn.lock | ||
| head/yarn.lock | ||
| yarn.lock | ||
|
|
||
| - name: Set up Docker | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
@@ -85,26 +81,18 @@ jobs: | |
| run: | | ||
| (command -v sysctl || sudo apt-get update && sudo apt-get install -y procps) && \ | ||
| sudo sysctl -w vm.max_map_count=2251954 | ||
|
|
||
| - name: Install dependencies for integration-test-deployment (BASE) | ||
| working-directory: base | ||
| run: yarn --cwd tools/@aws-cdk/integration-test-deployment install | ||
|
|
||
| - name: Build deployment-integ (BASE) | ||
| working-directory: base | ||
| run: yarn --cwd tools/@aws-cdk/integration-test-deployment build | ||
|
|
||
| - name: Install dependencies for Integration Tests (HEAD) | ||
| working-directory: head | ||
| - name: Install dependencies for Integration Tests | ||
| run: yarn install | ||
|
|
||
| - name: Build deployment-integ | ||
| run: yarn --cwd tools/@aws-cdk/integration-test-deployment build | ||
|
|
||
| - name: Build Integration Tests (HEAD) | ||
| working-directory: head | ||
| - name: Build Integration Tests | ||
| run: npx lerna run build --scope=@aws-cdk-testing/framework-integ | ||
|
|
||
| - name: Run integration tests from HEAD using integration-test-deployment script from BASE | ||
| run: yarn --cwd ../base/tools/@aws-cdk/integration-test-deployment/ integration-test-deployment | ||
| working-directory: head | ||
| - name: Run integration tests using integration-test-deployment script | ||
| run: yarn run atmosphere-integ-test | ||
| env: | ||
| CDK_ATMOSPHERE_ENDPOINT: ${{ vars.CDK_ATMOSPHERE_ENDPOINT }} | ||
| CDK_ATMOSPHERE_POOL: ${{ vars.CDK_ATMOSPHERE_POOL}} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,8 @@ | |
| "pack": "./pack.sh", | ||
| "compat": "./scripts/check-api-compatibility.sh", | ||
| "bump": "./bump.sh", | ||
| "build-all": "tsc -b" | ||
| "build-all": "tsc -b", | ||
| "atmosphere-integ-test": "lerna run build --scope @aws-cdk/integration-test-deployment && node tools/@aws-cdk/integration-test-deployment/bin/index.js" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is it building? I believe the normal pattern here is another separate command building, then this one only running There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| }, | ||
| "devDependencies": { | ||
| "@nx/workspace": "^20", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,5 @@ | |
| "ts-jest": "^29.4.1", | ||
| "typescript": "~5.5.4" | ||
| }, | ||
| "main": "bin/project-sync.js", | ||
| "license": "Apache-2.0" | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the default behaviour if we didn't mention any?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't listen to any labelling events by default. So if we add the
pr/needs-integration-test-deploymentlabel, the workflow will still be skipped.