Remove NCFX RON/USD Includes Config #577
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Clean up on PR close | |
on: | |
pull_request: | |
types: [closed] | |
paths: | |
- 'packages/sources/**' | |
- 'packages/composites/**' | |
- 'packages/targets/**' | |
- 'packages/core/**' | |
jobs: | |
cleanup-ephemeral-adapters-on-pr-close: | |
name: Cleanup Ephemeral Adapters used for testing | |
runs-on: ubuntu-latest | |
environment: QA | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | |
with: | |
aws-access-key-id: ${{ secrets.QA_SDLC_AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.QA_SDLC_AWS_SECRET_KEY }} | |
aws-region: ${{ secrets.QA_SDLC_AWS_REGION }} | |
role-to-assume: ${{ secrets.QA_SDLC_AWS_ROLE_TO_ASSUME }} | |
role-duration-seconds: 3600 | |
mask-aws-account-id: true | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 | |
- name: Set Kubernetes Context | |
uses: azure/k8s-set-context@212a19233d93f03eceaac31ae5a1d1acf650b6ef # v4.0.1 | |
with: | |
method: kubeconfig | |
kubeconfig: ${{ secrets.QA_SDLC_KUBECONFIG }} | |
- uses: ./.github/actions/setup # Yarn install > setup | |
- name: cleaning up adapters | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
run: | | |
# Build the list of adapters using the PR number | |
ADAPTER_NAMES=$(kubectl get deployments --namespace adapters | awk '{print $1;}' | grep "${PR_NUMBER}$" | awk -F'-' '{print $3;}') | |
for adapter in ${ADAPTER_NAMES}; do | |
# stop the k6 pod | |
NAME=k6-${PR_NUMBER}-${adapter} yarn qa:adapter stop k6 ${PR_NUMBER} || true | |
# stop the adapter pod | |
yarn qa:adapter stop ${adapter} ${PR_NUMBER} || true | |
done |