Skip to content

Commit

Permalink
skip: test account
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-shcherbak committed May 10, 2024
1 parent bc59314 commit d5b45fc
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions .github/workflows/tf_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
CORE_TESTING_FOLDER: ${{ github.workspace }}
OUTPUT_DIR: ${{ github.workspace }}/auto_policy_testing/output
AWS_DEFAULT_REGION: ${{ vars.AWS_REGION }}
resource_priority_list: 'internet,kms,key,lambda'
resource_priority_list: 'account'
RED: '\033[0;31m'

jobs:
Expand Down Expand Up @@ -64,40 +64,40 @@ jobs:
test -s $OUTPUT_DIR/.tf_failed && exit 1
exit 0
terraform_test_policy_red_flights:
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-22.04
steps:
- name: Git clone the repository
uses: actions/checkout@v4
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.CI_ASSUME_ROLE }}
role-session-name: ECC-AWS-RULEPACK_CI-RED
aws-region: ${{ vars.AWS_REGION }}
- name: Install dependencies
shell: bash
working-directory: auto_policy_testing/scripts
run: |
pip install -r requirements.txt
- name: terraform_test_policy_red_flights
shell: bash
working-directory: auto_policy_testing/scripts
run: |
python main.py \
--cloud AWS \
--infra_color red \
-l $resource_priority_list \
--base_dir $GITHUB_WORKSPACE \
--output_dir $OUTPUT_DIR \
--sa "github_ci_readonly_ecc-aws-rulepack"
echo -e "${RED}Failed policies:"
cat $OUTPUT_DIR/.failed
echo -e "${RED}Failed terraforms:"
cat $OUTPUT_DIR/.tf_failed
test -s $OUTPUT_DIR/.failed && exit 1
test -s $OUTPUT_DIR/.tf_failed && exit 1
exit 0
# terraform_test_policy_red_flights:
# permissions:
# contents: 'read'
# id-token: 'write'
# runs-on: ubuntu-22.04
# steps:
# - name: Git clone the repository
# uses: actions/checkout@v4
# - name: configure aws credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# role-to-assume: ${{ secrets.CI_ASSUME_ROLE }}
# role-session-name: ECC-AWS-RULEPACK_CI-RED
# aws-region: ${{ vars.AWS_REGION }}
# - name: Install dependencies
# shell: bash
# working-directory: auto_policy_testing/scripts
# run: |
# pip install -r requirements.txt
# - name: terraform_test_policy_red_flights
# shell: bash
# working-directory: auto_policy_testing/scripts
# run: |
# python main.py \
# --cloud AWS \
# --infra_color red \
# -l $resource_priority_list \
# --base_dir $GITHUB_WORKSPACE \
# --output_dir $OUTPUT_DIR \
# --sa "github_ci_readonly_ecc-aws-rulepack"
# echo -e "${RED}Failed policies:"
# cat $OUTPUT_DIR/.failed
# echo -e "${RED}Failed terraforms:"
# cat $OUTPUT_DIR/.tf_failed
# test -s $OUTPUT_DIR/.failed && exit 1
# test -s $OUTPUT_DIR/.tf_failed && exit 1
# exit 0

0 comments on commit d5b45fc

Please sign in to comment.