-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.gitlab-ci.yml
43 lines (38 loc) · 1.41 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
variables:
# These are gitlab variables so that it's easier to do a manual deploy
# If these are set witih value and description, then it gives you UI elements
DOWNSTREAM_BRANCH:
value: "main"
description: "downstream jobs are triggered on this branch"
include:
- local: .gitlab/benchmarks.yml
trigger_internal_build:
variables:
LIBDATADOG_COMMIT_BRANCH: $CI_COMMIT_BRANCH
LIBDATADOG_COMMIT_SHA: $CI_COMMIT_SHA
LIBDATADOG_SHORT_COMMIT_SHA: ${CI_COMMIT_SHORT_SHA}
trigger:
project: DataDog/apm-reliability/libddprof-build
strategy: depend
branch: $DOWNSTREAM_BRANCH
# Following jobs are required otherwise gitsync will not report downstream pipeline failure to github
# This job is used to determine if downstream pipeline has succeeded
report_failure:
tags: ["arch:amd64"]
when: on_failure
needs: [trigger_internal_build, benchmarks]
# allow_failure: true prevents the job from showing up in github statuses (because it's filtered by gitsync)
allow_failure: true
script:
- echo "STATUS=1" >> .env
artifacts:
reports:
dotenv: .env
# Final job that will show in github statuses
report_gitlab_CI_status:
tags: ["arch:amd64"]
when: always
stage: .post
script:
- "echo TIP: If you see this failing, something else in the GitLab pipeline failed. Follow the link to the pipeline and check for other things that failed prior to this step."
- exit ${STATUS}