-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuildspec.yaml
More file actions
35 lines (33 loc) · 1.65 KB
/
Copy pathbuildspec.yaml
File metadata and controls
35 lines (33 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
version: 0.2
env:
variables:
CHART_PATH: standardized-path/app
phases:
install:
runtime-versions:
docker: 20
commands:
- curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- terraform version
- helm version
build:
commands:
- terraform -chdir=infra init -backend=false
- terraform -chdir=infra fmt -check
- terraform -chdir=infra validate
- curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
- cd infra && tflint --init && tflint --recursive && cd ..
- wget https://github.com/aquasecurity/trivy/releases/download/v0.48.0/trivy_0.48.0_Linux-64bit.tar.gz
- tar zxvf trivy_0.48.0_Linux-64bit.tar.gz
- ./trivy config --severity HIGH,CRITICAL infra/
- helm lint ${CHART_PATH} -f platform/apps/dev/values.yaml
- helm lint ${CHART_PATH} -f platform/apps/stage/values.yaml
- helm lint ${CHART_PATH} -f platform/apps/prod/values.yaml
- helm template simple-app-dev ${CHART_PATH} -f platform/apps/dev/values.yaml > /tmp/simple-app-dev.yaml
- helm template simple-app-stage ${CHART_PATH} -f platform/apps/stage/values.yaml > /tmp/simple-app-stage.yaml
- helm template simple-app-prod ${CHART_PATH} -f platform/apps/prod/values.yaml > /tmp/simple-app-prod.yaml
- wget https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz
- tar xf kubeconform-linux-amd64.tar.gz
- ./kubeconform -summary /tmp/simple-app-dev.yaml
- ./kubeconform -summary /tmp/simple-app-stage.yaml
- ./kubeconform -summary /tmp/simple-app-prod.yaml