-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
101 lines (88 loc) · 2.89 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
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
# TODO: Make this image version dynamic per pipeline as it's hard-coded here
variables:
MINIKUBE: "false"
VALUES: "pipeline.yaml"
CHARTS_TO_PUBLISH: ska-low ska-mid ska-landingpage
INGRESS_HOST: "k8s.stfc.skao.int"
GIT_SUBMODULE_STRATEGY: recursive
SKALLOP_VERSION: "2.24.2"
K8S_TEST_IMAGE_TO_TEST: artefact.skao.int/ska-tango-images-pytango-builder:9.3.3
KUBE_BRANCH: $CI_JOB_ID
DOMAIN: "branch"
EXPOSE_All_DS: "true"
CONFIG: "common"
CI_IMAGE: $CI_REGISTRY/ska-telescope/ska-skampi/ska-skampi-ci:1.0.7
image: $CI_IMAGE
stages:
- on-demand
- build
- test
- lint
- clean_test_env
- publish
- deploy
- integration
- staging
- deploy_integration
- clean_integration
- pages
- release
- deploy_staging
- clean_staging
# Globally reused tags declaration for jobs
.tags_default:
tags:
- k8srunner
build-base-image:
stage: .pre
image: $SKA_K8S_TOOLS_BUILD_DEPLOY
tags:
- k8srunner
before_script:
- ""
rules:
- changes:
- images/ska-skampi-ci/Dockerfile
- images/ska-skampi-ci/release
- if: $REBUILD_IMAGES
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
script:
- export TAG=$(cat images/ska-skampi-ci/release)
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY/ska-telescope/ska-skampi/ska-skampi-ci:$TAG images/ska-skampi-ci/
- docker push $CI_REGISTRY/ska-telescope/ska-skampi/ska-skampi-ci:$TAG
# See: https://docs.gitlab.com/ee/ci/yaml/includes.html
include:
# Helm Charts
- project: "ska-telescope/templates-repository"
file: "gitlab-ci/includes/helm-chart.gitlab-ci.yml"
# Docs - only build as stress tests use 'public'
- project: "ska-telescope/templates-repository"
file: "gitlab-ci/includes/docs-build.gitlab-ci.yml"
# release steps
- project: "ska-telescope/templates-repository"
file: "gitlab-ci/includes/release.gitlab-ci.yml"
# integration and staging
- project: "ska-telescope/templates-repository"
file: "gitlab-ci/includes/deploy.integration.gitlab-ci.yml"
- project: "ska-telescope/templates-repository"
file: "gitlab-ci/includes/deploy.staging.gitlab-ci.yml"
# Deployments
- local: "/.gitlab/ci/common.gitlab-ci.yml"
- local: "/.gitlab/ci/ska-low.gitlab-ci.yml"
- local: "/.gitlab/ci/ska-mid.gitlab-ci.yml"
- local: "/.gitlab/ci/psi-low.gitlab-ci.yml"
- local: "/.gitlab/ci/psi-mid.gitlab-ci.yml"
- local: "/.gitlab/ci/mid-itf.gitlab-ci.yml"
- local: "/.gitlab/ci/low-itf.gitlab-ci.yml"
# .post steps
- project: "ska-telescope/templates-repository"
file: "gitlab-ci/includes/finaliser.gitlab-ci.yml"
# linting job
- project: "ska-telescope/templates-repository"
file: "gitlab-ci/includes/python-lint.gitlab-ci.yml"
- project: "ska-telescope/templates-repository"
file: "gitlab-ci/includes/notebook-lint.gitlab-ci.yml"
python-lint:
image: $CI_IMAGE