-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
48 lines (38 loc) · 932 Bytes
/
.gitlab-ci.yml
File metadata and controls
48 lines (38 loc) · 932 Bytes
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
#
# gitlab ci/cd config file.
#
# Default docker image for runner.
image: debian:12.2
# Default Variables.
variables:
BUILD_OUT_DIR: "build-dir"
# Default Stages.
stages:
- generate_version_id
- release_version_id
# Generate Version ID.
generate_version_id:
stage: generate_version_id
script:
- VERSION_ID=$(bash helper-scripts/generate_version_id.sh)
- echo "Version ID is - ${VERSION_ID}"
- mkdir -p ${BUILD_OUT_DIR}
- echo ${VERSION_ID} > ${BUILD_OUT_DIR}/version-id
artifacts:
paths:
- ${BUILD_OUT_DIR}/*
expire_in: 1 day
except:
- tags
# Release Version ID.
release_version_id:
stage: release_version_id
script:
- VERSION_ID=$(cat ${BUILD_OUT_DIR}/version-id)
- echo "Version ID is - ${VERSION_ID}"
- bash helper-scripts/release_version_id.sh "${VERSION_ID}" "${PROJECT_ACCESS_TOKEN}"
only:
- /^v+\d+\.+\d+\.+\d+$/
- main
except:
- tags