forked from Tanuki-Learn/workshop-application
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
65 lines (56 loc) · 1.63 KB
/
.gitlab-ci.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
image: docker:latest
services:
- docker:dind
variables:
POSTGRES_ENABLED: "false"
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "" # https://gitlab.com/gitlab-org/gitlab-runner/issues/4501
ROLLOUT_RESOURCE_TYPE: deployment
stages:
- build
- test
- cfuzz
- review
- staging
- canary
- production
- dast
- fuzz
- incremental rollout 10%
- incremental rollout 25%
- incremental rollout 50%
- incremental rollout 100%
- cleanup
include:
- template: Jobs/Build.gitlab-ci.yml
- template: Jobs/Code-Quality.gitlab-ci.yml
- template: Jobs/Deploy.gitlab-ci.yml
- template: Jobs/DAST-Default-Branch-Deploy.gitlab-ci.yml
- template: Security/DAST.gitlab-ci.yml
- template: Security/Container-Scanning.gitlab-ci.yml
- template: Security/Dependency-Scanning.gitlab-ci.yml
- template: Security/License-Scanning.gitlab-ci.yml
- template: Security/SAST.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml
build:
stage: build
variables:
IMAGE: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
script:
- docker info
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $IMAGE .
- docker push $IMAGE
unit:
image: python:3
stage: test
script:
- apt update -y
- apt install libmariadb3 libmariadb-dev sqlite3 libsqlite3-dev -y
- pip3 install -r requirements.txt
- python -m unittest tests/test_db.py
# ensuring that our image is updated before running dependency scanning
gemnasium-python-dependency_scanning:
before_script:
- apt update
- apt install libmariadb3 libmariadb-dev sqlite3 libsqlite3-dev -y