-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
108 lines (101 loc) · 2.67 KB
/
config.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
version: 2.1
orbs:
docker: circleci/[email protected]
jobs:
build-and-test:
docker:
- image: msaginwm/devsecops-base:2023.04
steps:
- checkout
- run:
name: Install dependencies
command: |
python3 -m venv .venv
. .venv/bin/activate
cd application
make install
- save_cache:
paths:
- .venv
key: v3-dependencies-{{ checksum "application/requirements.txt" }}
- run:
name: Run tests
command: |
. .venv/bin/activate
cd application
make lint
static-application-security-testing:
docker:
- image: msaginwm/devsecops-base:2023.04
steps:
- checkout
- restore_cache:
keys:
- v3-dependencies-{{ checksum "application/requirements.txt" }}
- run:
name: Run SAST
command: |
. .venv/bin/activate
cd application
make sast
deploy-infrastructure:
docker:
- image: msaginwm/devsecops-base:2023.04
steps:
- checkout
- run:
name: Deploy infrastructure
no_output_timeout: 30m
command: |
cd infrastructure
./deploy-infrastructure.sh
deploy-workload:
docker:
- image: msaginwm/devsecops-base:2023.04
steps:
- checkout
- run:
name: Create kubeconfig
command: |
aws eks --region us-east-1 update-kubeconfig --name msagi-eks-cluster
- run:
name: Deploy Workload
command: |
kubectl get pods --all-namespaces
cd application
make deploy
smoke-test:
docker:
- image: msaginwm/devsecops-base:2023.04
steps:
- checkout
- run:
name: Create kubeconfig
command: |
aws eks --region us-east-1 update-kubeconfig --name msagi-eks-cluster
- run:
name: Smoke test - health check
command: |
cd application
make smoketest
workflows:
default:
jobs:
- build-and-test
- static-application-security-testing:
requires: [build-and-test]
- docker/publish:
requires: [static-application-security-testing]
path: application
docker-context: application
image: msaginwm/msagi-capstone
tag: v1.0.2
- deploy-infrastructure:
requires: [docker/publish]
# filters:
# branches:
# only: [infra-branch]
- deploy-workload:
requires: [deploy-infrastructure]
- smoke-test:
requires: [deploy-workload]