forked from riversideresearch/ucpact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
55 lines (45 loc) · 1.7 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
# You can copy and paste this template into a new `.gitlab-ci.yml` file.
# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword.
#
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Bash.gitlab-ci.yml
# See https://docs.gitlab.com/ee/ci/yaml/index.html for all available options
before_script:
- echo "Make sure all profiles are down and removed"
- docker builder prune -a -f
- docker image prune -a -f
- docker compose --profile tests down --rmi all
- docker compose --profile pytest down --rmi all
- docker compose --profile integration-tests down --rmi all
- docker compose --profile default down
after_script:
- echo "After script section"
- docker compose --profile tests down
- docker compose --profile pytest down --rmi all
- docker compose --profile integration-tests down
- docker compose --profile default down
- docker builder prune -a -f
- docker image prune -a -f
#build:
# stage: build
# script:
# - docker compose --profile default build
test1:
stage: test
script:
- docker compose --profile tests build
- docker compose --profile tests up --exit-code-from frontend-tests
test2:
stage: test
script:
- docker compose --profile pytest build
- docker compose --profile pytest up --exit-code-from backend-tests
#deploy:
# stage: deploy
# script:
# - echo "Do your deploy here"
#- docker compose --profile default build
#- docker compose --profile default up
# environment: production