-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
55 lines (49 loc) · 1.27 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
image: python:3.8.12-slim
variables:
ENV_DEV: "dev"
GCLOUD_IMAGE_NAME: google/cloud-sdk:420.0.0
CI_SERVICE_NAME: gitlab-ci
stages:
- tests
- build_flex_template_image
- deploy_flex_template_spec_file
- run_dataflow_job
tests:
stage: tests
script:
- pip install 'pytest==7.3.1'
- pip install 'pytest-custom-exit-code==0.3.0'
- pip install -U -r team_league/requirements.txt
- pytest -v --suppress-no-test-exit-code .
build_flex_template_image:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [ '' ]
stage: build_flex_template_image
when: manual
before_script:
- . ./scripts/export_env_variables.sh
script:
- . ./scripts/build_image_kaniko.sh
environment:
name: $ENV_DEV
deploy_flex_template_spec_file:
image: $GCLOUD_IMAGE_NAME
stage: deploy_flex_template_spec_file
when: manual
before_script:
- . ./scripts/export_env_variables.sh
script:
- . ./scripts/gcp_authentication.sh
- . ./scripts/create_flex_template_spec_file_gcs.sh
environment:
name: $ENV_DEV
run_dataflow_job:
image: $GCLOUD_IMAGE_NAME
stage: run_dataflow_job
when: manual
before_script:
- . ./scripts/export_env_variables.sh
script:
- . ./scripts/gcp_authentication.sh
- . ./scripts/run_dataflow_job.sh