Skip to content

added aks for pci test #270

added aks for pci test

added aks for pci test #270

name: Static Analysis
on:
push:
branches-ignore:
- main
jobs:
static_analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: init_terraform_folders
env:
FOLDERS: >
src/core
src/coreplus
src/aks-platform
src/domains/diego-app
src/domains/diego-common
src/domains/marco-common
src/domains/legacy-common
src/domains/diego-container-apps
.identity
run: |
pids=()
TAG=$(cat .terraform-version)
for f in $FOLDERS; do
pushd "$(pwd)/${f}"
rm -rf 99_main.tf
mv 99_main.tf.ci 99_main.tf
docker run -v $(pwd):/tmp -w /tmp hashicorp/terraform:$TAG init &
pids+=($!)
popd
done
# Wait for each specific process to terminate.
# Instead of this loop, a single call to 'wait' would wait for all the jobs
# to terminate, but it would not give us their exit status.
#
for pid in "${pids[@]}"; do
#
# Waiting on a specific PID makes the wait command return with the exit
# status of that process. Because of the 'set -e' setting, any exit status
# other than zero causes the current shell to terminate with that exit
# status as well.
#
wait "$pid"
done
- name: run_pre_commit_terraform
run: |
TAG=v1.77.0
docker run -v $(pwd):/lint -w /lint ghcr.io/antonbabenko/pre-commit-terraform:$TAG run -a