Skip to content

Commit

Permalink
Updating destination branch to main
Browse files Browse the repository at this point in the history
  • Loading branch information
mitali-salvi committed Sep 18, 2023
1 parent c87cc57 commit c9aeddf
Showing 1 changed file with 48 additions and 49 deletions.
97 changes: 48 additions & 49 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Build the operator
# release-artifacts needs the IMG variable to build the operator.
run: mkdir ${{ github.workspace }}/dist && make kustomize && make release-artifacts IMG=506463145083.dkr.ecr.us-west-2.amazonaws.com/cwagent-operator-pre-release:latest
run: mkdir ${{ github.workspace }}/dist && make kustomize && make release-artifacts IMG=${{ secrets.ECR_OPERATOR_RELEASE_REPOSITORY }}

- name: Store operator-build
run: echo APM_YAML="${{ github.workspace }}/dist/apm.yaml" >> $GITHUB_ENV
Expand Down Expand Up @@ -74,52 +74,51 @@ jobs:
command: |
cd integration-tests/terraform/eks
terraform destroy -var="test_dir=../../operator" -var="typeOfTest=operator" --auto-approve
# EKSAddOnIntegrationTest:
# name: EKSAddOnIntegrationTest
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# permissions:
# id-token: write
# contents: read
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
#
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v2
# with:
# role-to-assume: ${{ env.TERRAFORM_AWS_ASSUME_ROLE }}
# aws-region: us-east-1
#
# - name: Verify Terraform version
# run: terraform --version
#
# - name: Terraform apply
# uses: nick-fields/retry@v2
# with:
# max_attempts: 1
# timeout_minutes: 60 # EKS takes about 20 minutes to spin up a cluster and service on the cluster
# retry_wait_seconds: 5
# command: |
# cd integration-tests/terraform/eks
# terraform init
# if terraform apply -var="test_dir=../../eks-addon" -var="typeOfTest=add-on" --auto-approve; then
# terraform destroy -var="test_dir=../../eks-addon" -var="typeOfTest=add-on" -auto-approve
# else
# terraform destroy -var="test_dir=../../eks-addon" -var="typeOfTest=add-on" -auto-approve && exit 1
# fi
#
# - name: Terraform destroy
# if: ${{ cancelled() || failure() }}
# uses: nick-fields/retry@v2
# with:
# max_attempts: 3
# timeout_minutes: 8
# retry_wait_seconds: 5
# command: |
# cd integration-tests/terraform/eks
# terraform destroy -var="test_dir=../../eks-addon" -var="typeOfTest=add-on" --auto-approve
EKSAddOnIntegrationTest:
name: EKSAddOnIntegrationTest
runs-on: ubuntu-latest
strategy:
fail-fast: false
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.TERRAFORM_AWS_ASSUME_ROLE }}
aws-region: us-east-1

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

- name: Terraform apply
uses: nick-fields/retry@v2
with:
max_attempts: 1
timeout_minutes: 60 # EKS takes about 20 minutes to spin up a cluster and service on the cluster
retry_wait_seconds: 5
command: |
cd integration-tests/terraform/eks
terraform init
if terraform apply -var="test_dir=../../eks-addon" -var="typeOfTest=add-on" --auto-approve; then
terraform destroy -var="test_dir=../../eks-addon" -var="typeOfTest=add-on" -auto-approve
else
terraform destroy -var="test_dir=../../eks-addon" -var="typeOfTest=add-on" -auto-approve && exit 1
fi
- name: Terraform destroy
if: ${{ cancelled() || failure() }}
uses: nick-fields/retry@v2
with:
max_attempts: 3
timeout_minutes: 8
retry_wait_seconds: 5
command: |
cd integration-tests/terraform/eks
terraform destroy -var="test_dir=../../eks-addon" -var="typeOfTest=add-on" --auto-approve

0 comments on commit c9aeddf

Please sign in to comment.