-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathbuild_agent.yaml
More file actions
58 lines (55 loc) · 1.75 KB
/
Copy pathbuild_agent.yaml
File metadata and controls
58 lines (55 loc) · 1.75 KB
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
---
.build-agent-tpl:
variables:
# Pass these to triggered agent build job.
AGENT_BRANCH: "main"
RELEASE_VERSION_6: "nightly"
RELEASE_VERSION_7: "nightly-a7"
BUCKET_BRANCH: "dev"
DEPLOY_AGENT: "false"
INTEGRATIONS_CORE_VERSION: ${CI_COMMIT_REF_NAME}
# disable kitchen and e2e tests
RUN_KITCHEN_TESTS: "false"
RUN_E2E_TESTS: "off"
# Override AGENT_BRANCH for release branches
rules:
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^[0-9]+\.[0-9]+\.x$/
variables:
AGENT_BRANCH: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
stage: build
trigger:
project: DataDog/datadog-agent
branch: $AGENT_BRANCH
# It's more convenient to directly show if downstream pipeline succeeded.
strategy: depend
build-agent-auto:
extends: .build-agent-tpl
rules:
# Do not run on release branches
- if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
when: never
# Only run if the branch is not a Github Merge Queue one.
- if: $CI_COMMIT_BRANCH !~ /^gh-readonly-queue.*/
changes:
# We don't yet support variable expansion in `compare_to`. It was added in gitlab 17.2:
# https://gitlab.com/gitlab-org/gitlab/-/issues/369916#note_1972773223
compare_to: "master"
paths:
- .deps/*
- .gitlab/build_agent.yaml
build-agent-manual-release:
extends: .build-agent-tpl
allow_failure: true
trigger:
branch: $CI_COMMIT_BRANCH
rules:
- if: $CI_COMMIT_BRANCH =~ /^[0-9]+\.[0-9]+\.x$/
when: manual
# Always have the option to run manually the agent build manually against the agent's main
build-agent-manual:
extends: .build-agent-tpl
allow_failure: true
rules:
- if: $CI_COMMIT_BRANCH =~ /^7\.\d+\.x$/
when: never
- when: manual