Skip to content

Workflow file for this run

name: CI
on:
pull_request:
branches: [master]
# Checks if any concurrent jobs under the same pull request or branch are being executed
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
manifests-validation:
runs-on: ubuntu-latest
steps:
- name: Checkout test-infra ⤵️
uses: actions/checkout@v4
- name: Download kubeconform ⛓️
run: |
wget https://github.com/yannh/kubeconform/releases/download/v0.6.6/kubeconform-linux-amd64.tar.gz
tar -xvf kubeconform-linux-amd64.tar.gz
chmod +x kubeconform
# Since we use eg: 1.21, but kubeconform wants full semver (ie: 1.21.0),
# load the version and append a ".0"
- name: Load k8s version

Check failure on line 28 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 28
id: version
run: |
VERSION=$(cat config/clusters/eks_variables.tf | grep "eks_cluster_version" -A 1 | tail -n1 | awk '{print $3}')
[[ "$VERSION" =~ ^[0-9]+\.[0-9]+ ]] && FULL_VERSION="${BASH_REMATCH[0]}.0"
echo "k8s_version=$FULL_VERSION" >> $GITHUB_OUTPUT
- name: yaml config validation 🔍
run: ./kubeconform -ignore-filename-pattern ".json" -kubernetes-version ${{ steps.version.outputs.k8s_version }} -ignore-missing-schemas /home/federico/Work/test-infra/config/prow/
scan-terraform:
runs-on: ubuntu-latest
steps:
- name: Checkout test-infra ⤵️
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.19
- name: Install deps
run: |
curl -L "$(curl -Ls https://api.github.com/repos/accurics/terrascan/releases/latest | grep -o -E "https://.+?_Linux_x86_64.tar.gz")" > terrascan.tar.gz
tar -xf terrascan.tar.gz
install terrascan /usr/local/bin
- name: Scan terrafrom code
run: |
terrascan scan -i terraform -d config/clusters -v \
--skip-rules 'AC_AWS_0214,AC_AWS_0369,AC_AWS_0487,AC_AWS_078,AWS.CloudTrail.Logging.Medium.007,AC_AWS_0447,AC_AWS_0497,AC_AWS_0458,AC_AWS_0320'