-
Notifications
You must be signed in to change notification settings - Fork 0
/
passage.yaml
44 lines (38 loc) · 1.1 KB
/
passage.yaml
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
passage-check:
image: registry.gitlab.com/uniget-org/images/ubuntu:rolling
script:
- |
git clone https://github.com/FiloSottile/passage
cd passage
VERSION="$(git rev-list --count --all)"
if test -z "${VERSION}"; then
echo "Failed to count commits"
exit 1
fi
COMMIT="$(git rev-parse --short HEAD)"
if test -z "${COMMIT}"; then
echo "Failed to get short commit hash"
exit 1
fi
echo "Got version <${VERSION}.${COMMIT}>"
echo "version=${VERSION}.${COMMIT}" >>variables.env
artifacts:
reports:
dotenv: variables.env
passage-release:
needs:
- passage-check
image: registry.gitlab.com/gitlab-org/release-cli:v0.19.0
script:
- |
echo "### Releasing passage v${VERSION}"
if release-cli get --tag-name passage/${VERSION}; then
echo " Already exists"
exit 0
else
release-cli create \
--name "passage v${VERSION}" \
--description "Custom release of passage v${VERSION}" \
--tag-name "passage/${VERSION}" \
--ref "${CI_COMMIT_SHA}"
fi