forked from DataDog/integrations-extras
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
52 lines (49 loc) · 1.59 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
variables:
TAGGER_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/integrations-core:tagger
TAGGER_EMAIL: [email protected]
TAGGER_NAME: ci.integrations-extras
stages:
- release
release-auto:
stage: release
image: $TAGGER_IMAGE
only:
- master
except:
- schedules
script:
- ddev --version
- ddev config set repos.extras .
- ddev config set repo extras
# ssh-agent performed in the main script to be persisted
- eval "$(ssh-agent -s)"
- ./.gitlab/release/git-auth.sh
# Prefix every line with a timestamp
- ./.gitlab/release/tag-release.sh 2>&1 | ts "[%H:%M:%S %Z] "
tags: [ "runner:main", "size:large" ]
release-manual:
stage: release
image: $TAGGER_IMAGE
only:
# Integration release tags e.g. any_check-X.Y.Z-rc.N
- /.*-\d+\.\d+\.\d+(-(rc|pre|alpha|beta)\.\d+)?$/
except:
- schedules
script:
- ddev --version
- ddev config set repos.extras .
- ddev config set repo extras
- ./.gitlab/release/git-auth.sh
# Get tagger info
- tagger=$(git for-each-ref refs/tags/$CI_COMMIT_TAG --format='%(taggername) %(taggeremail)')
# The automatic release builder will trigger this job as a side-effect of
# tagging releases. To prevent multiple redundant builds we don't trigger
# the pipeline unless the tag was applied manually.
- |
if [[ "$tagger" =~ "$TAGGER_NAME <$TAGGER_EMAIL>" ]]; then
echo "Skipping, packages have already been built"
else
./.gitlab/release/sign-release.sh
./.gitlab/release/build-packages.sh
fi
tags: [ "runner:main", "size:large" ]