-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
80 lines (68 loc) · 1.67 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
stages:
- lint
- build
- docs
- release
- deploy
variables:
DOCKERFILE: ${CI_PROJECT_DIR}/Dockerfile
RELEASE_REGISTRY: docker.io
RELEASE_REGISTRY_IMAGE: index.docker.io/magentaaps/os2mo-naldo
IMAGE_SHA: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}
PRODUCT: os2mo
COMPONENT: naldo
# Conditions
#############
# Global Conditions
.if-tag: &if-tag
if: "$CI_COMMIT_TAG"
.if-default-branch-refs: &if-default-branch-refs
if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
.if-merge-request: &if-merge-request
if: "$CI_MERGE_REQUEST_IID"
include:
- project: "labs/salt-automation"
file:
- gitlab-ci-templates/common/no-interrupt-meta.v1.yml
- gitlab-ci-templates/common/conventional-commits.v1.yml
- gitlab-ci-templates/common/conventional-commits-changelog.v1.yml
- gitlab-ci-templates/common/docker-build-meta.v2.yml
- gitlab-ci-templates/common/docker-release.v1.yml
- gitlab-ci-templates/common/config-updater-salt.v1.yml
- gitlab-ci-templates/common/config-updater-flux.v1.yml
# Workflow
###########
workflow:
rules:
- <<: *if-tag
- <<: *if-default-branch-refs
- <<: *if-merge-request
default:
# All jobs are interruptible by default
interruptible: true
Pre-commit:
image: python:3.9
stage: lint
before_script:
- pip install pre-commit
script:
- pre-commit run --all-files
Svelte-check:
image: node:20
stage: lint
script:
- cd web/
- yarn
- yarn run check
SvelteKit build:
image: node:20
stage: build
script:
- cd web/
- yarn
- yarn build
Build Naldo:
extends:
- .build-docker
variables:
BUILD_DOCKER_EXTRA_FLAGS: --build-arg=COMMIT_TAG=${CI_COMMIT_TAG}