-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
111 lines (96 loc) · 2.58 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
102
103
104
105
106
107
108
109
110
111
image: $SKA_K8S_TOOLS_BUILD_DEPLOY
variables:
GIT_SUBMODULE_STRATEGY: recursive
cache:
paths:
- build
stages:
- lint
- build
- test
- test-temp
- publish
- pages
- scan
include:
# Python packages build,lint, test and publish
- project: 'ska-telescope/templates-repository'
file: 'gitlab-ci/includes/python.gitlab-ci.yml'
# OCI
- project: 'ska-telescope/templates-repository'
file: 'gitlab-ci/includes/oci-image.gitlab-ci.yml'
# Docs pages
- project: 'ska-telescope/templates-repository'
file: 'gitlab-ci/includes/docs.gitlab-ci.yml'
# Create Gitlab CI badges from CI metrics
- project: 'ska-telescope/templates-repository'
file: 'gitlab-ci/includes/finaliser.gitlab-ci.yml'
# Create a release
- project: 'ska-telescope/templates-repository'
file: 'gitlab-ci/includes/release.gitlab-ci.yml'
# Helm chart
- project: 'ska-telescope/templates-repository'
file: 'gitlab-ci/includes/helm-chart.gitlab-ci.yml'
# k8s
- project: 'ska-telescope/templates-repository'
file: 'gitlab-ci/includes/k8s.gitlab-ci.yml'
# Notebooks
- project: 'ska-telescope/templates-repository'
file: gitlab-ci/includes/notebook.gitlab-ci.yml
notebook-lint:
when: manual
notebook-test:
when: manual
# TODO: For now this manual step deploys to the STFC cloud just like the
# automatic step does.
# In future, we'll set it to deploy to an environment with PaSD hardware
# to test against.
temp-k8s-test:
stage: test-temp
when: manual
tags:
- k8srunner
variables:
TANGO_HOST: "tango-databaseds.$KUBE_NAMESPACE:10000"
KUBE_NAMESPACE: 'ci-$CI_PROJECT_NAME-$CI_COMMIT_SHORT_SHA'
before_script:
- make k8s-install-chart
- make k8s-wait
script:
- make k8s-test
artifacts:
name: "$CI_PROJECT_NAME-$CI_JOB_ID"
paths:
- "build/"
reports:
junit: build/report.xml
when: always
temp-xray-publish:
stage: test-temp
needs:
- temp-k8s-test
tags:
- k8srunner
image: $SKA_K8S_TOOLS_BUILD_DEPLOY
variables:
REALHW_OR_SIMULATED: simulated
script:
- make xray-publish
allow_failure: true
temp-stop-k8s:
stage: test-temp
needs:
- temp-k8s-test
tags:
- k8srunner
environment:
name: test-temp/$CI_COMMIT_REF_SLUG
action: stop
image: $SKA_K8S_TOOLS_BUILD_DEPLOY
variables:
KUBE_NAMESPACE: 'ci-$CI_PROJECT_NAME-$CI_COMMIT_SHORT_SHA'
script:
- make k8s-uninstall-chart
- kubectl -n $KUBE_NAMESPACE delete pods,svc,daemonsets,deployments,replicasets,statefulsets,cronjobs,jobs,ingresses,configmaps --all
- make k8s-delete-namespace
allow_failure: true