-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
58 lines (50 loc) · 1.28 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
include:
- project: 'megalis/extraction-data-stack'
ref: master
file: .docker-template.yml
before_script:
- export http_proxy=http://pro01.sib.fr:3128
- export https_proxy=http://pro01.sib.fr:3128
- export no_proxy=sib.fr
- apk update && apk add git
- git clone --depth 1 https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.sib.fr/megalis/extraction-data-stack stack
- source ./stack/init.sh
- apk update && apk add sshpass openssh-client bash
stages:
- build
- test
- deploy
build:
extends: .build
pytest-unit:
image: python:3.11.5-alpine
stage: test
only:
- master
- /^hotfix.*$/
script:
- apk add --no-cache build-base git
- pip install -r requirements.txt
- pip install -r dev-requirements.txt
- apk del --no-cache build-base git
- unset http_proxy
- unset https_proxy
- unset no_proxy
- pytest -s tests/unit/
deploy dev:
extends: .deployInteg
only: [] # XXX: Désactivation du déploiement vers integ
variables:
STACK_NAME: "extraction-data"
deploy pre-prod:
extends: .deployPreProd
variables:
STACK_NAME: "extraction-data"
deploy pre-prod master:
extends: .deployPreprodManual
variables:
STACK_NAME: "extraction-data"
deploy prod:
extends: .deployProd
variables:
STACK_NAME: "extraction-data"