Skip to content

Commit

Permalink
fixing syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Paramadon committed Jun 10, 2024
1 parent a484acf commit 5577c9b
Showing 1 changed file with 71 additions and 70 deletions.
141 changes: 71 additions & 70 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1160,76 +1160,77 @@ jobs:
retry_wait_seconds: 5
command: cd terraform/performance && terraform destroy --auto-approve

GPUE2E:
name: "GPUE2E"
needs: [ BuildAndUpload, BuildAndUploadPackages, GenerateTestMatrix ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arrays: ${{ fromJson(needs.GenerateTestMatrix.outputs.eks_addon_matrix) }}
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
with:
repository: ${{env.CWA_GITHUB_TEST_REPO_NAME}}
ref: ${{env.CWA_GITHUB_TEST_REPO_BRANCH}}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.TERRAFORM_AWS_ASSUME_ROLE }}
aws-region: us-west-2
role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }}

- name: Verify Terraform version
run: terraform --version

- name: Terraform apply
uses: nick-fields/retry@v2
with:
max_attempts: 4
timeout_minutes: 60
retry_wait_seconds: 5
command: |
if [ "${{ matrix.arrays.terraform_dir }}" != "" ]; then
cd "${{ matrix.arrays.terraform_dir }}"
else
cd terraform/eks/addon/gpu
fi
terraform init
if terraform apply --auto-approve \
-var="aws_ecr_private_registry=${{ secrets.AWS_ECR_PRIVATE_REGISTRY }}" \
-var="ecr_integration_test_repo=${{ env.ECR_INTEGRATION_TEST_REPO }}" \
-var="github_sha=${{ github.sha }}" \
-var="test_dir=${{ matrix.arrays.test_dir }}"\
-var="cwagent_image_repo=${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_INTEGRATION_TEST_REPO }}" \
-var="cwagent_image_tag=${{ github.sha }}" \
-var="beta=true" \
-var="addon_name=amazon-cloudwatch-observability" \
-var="addon_version=v1.6.0-eksbuild.1" \
-var="k8s_version=1.29" ; then
echo "Terraform apply successful."
else
terraform destroy -auto-approve && exit 1
fi

- name: Terraform destroy
if: ${{ cancelled() || failure() }}
uses: nick-fields/retry@v2
with:
max_attempts: 4
timeout_minutes: 8
retry_wait_seconds: 5
command: cd terraform/eks/addon/gpu && terraform destroy --auto-approve




StressTrackingTest:
GPUE2E:
name: "GPUE2E"
needs: [ BuildAndUpload, BuildAndUploadPackages, GenerateTestMatrix ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arrays: ${{ fromJson(needs.GenerateTestMatrix.outputs.eks_addon_matrix) }}
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
with:
repository: ${{env.CWA_GITHUB_TEST_REPO_NAME}}
ref: ${{env.CWA_GITHUB_TEST_REPO_BRANCH}}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.TERRAFORM_AWS_ASSUME_ROLE }}
aws-region: us-west-2
role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }}


- name: Verify Terraform version
run: terraform --version

- name: Terraform apply
uses: nick-fields/retry@v2
with:
max_attempts: 4
timeout_minutes: 60
retry_wait_seconds: 5
command: |
if [ "${{ matrix.arrays.terraform_dir }}" != "" ]; then
cd "${{ matrix.arrays.terraform_dir }}"
else
cd terraform/eks/addon/gpu
fi
terraform init
if terraform apply --auto-approve \
-var="aws_ecr_private_registry=${{ secrets.AWS_ECR_PRIVATE_REGISTRY }}" \
-var="ecr_integration_test_repo=${{ env.ECR_INTEGRATION_TEST_REPO }}" \
-var="github_sha=${{ github.sha }}" \
-var="test_dir=${{ matrix.arrays.test_dir }}"\
-var="cwagent_image_repo=${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_INTEGRATION_TEST_REPO }}" \
-var="cwagent_image_tag=${{ github.sha }}" \
-var="beta=true" \
-var="addon_name=amazon-cloudwatch-observability" \
-var="addon_version=v1.6.0-eksbuild.1" \
-var="k8s_version=1.29" ; then
echo "Terraform apply successful."
else
terraform destroy -auto-approve && exit 1
fi
- name: Terraform destroy
if: ${{ cancelled() || failure() }}
uses: nick-fields/retry@v2
with:
max_attempts: 4
timeout_minutes: 8
retry_wait_seconds: 5
command: cd terraform/eks/addon/gpu && terraform destroy --auto-approve




StressTrackingTest:
name: "StressTrackingTest"
needs: [BuildAndUpload, GenerateTestMatrix]
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5577c9b

Please sign in to comment.