Skip to content

Commit 6573006

Browse files
authored
Trigger the agent build when anything changes under .deps (#17232)
* Trigger the agent build when anything changes under .deps * Test trigger * Revert "Test trigger" This reverts commit e366bf7. * Replace references to agent-requirements to dependencies
1 parent e3aee74 commit 6573006

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.gitlab-ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ trigger-agent-build:
5353
rules:
5454
- if: ($CI_COMMIT_BRANCH =~ /^7.[0-9]{2}.x/)
5555
changes:
56-
- datadog_checks_base/datadog_checks/base/data/agent_requirements.in
56+
- .deps/*
5757
when: always
5858
- if: ($CI_COMMIT_BRANCH !~ /^7.[0-9]{2}.x/)
5959
when: always
@@ -62,15 +62,15 @@ trigger-agent-build:
6262
script:
6363
- export SLACK_CACHE_DIR="${PWD}/.slack-cache"
6464
- DATADOG_AGENT_PIPELINE_URL=$(aws ssm get-parameter --region us-east-1 --name ci.integrations-core.datadog-agent-pipeline-url --with-decryption --query "Parameter.Value" --out text)
65-
- export AGENT_REQUIREMENTS_CHANGED="false"
65+
- export DEPENDENCIES_CHANGED="false"
6666
- git fetch origin master
6767
- BASE_REF=$(git merge-base HEAD FETCH_HEAD)
68-
- git --no-pager diff --exit-code --name-only HEAD $BASE_REF -- datadog_checks_base/datadog_checks/base/data/agent_requirements.in || export AGENT_REQUIREMENTS_CHANGED="true" || true
68+
- git --no-pager diff --exit-code --name-only HEAD $BASE_REF -- .deps || export DEPENDENCIES_CHANGED="true" || true
6969
- export RELEASE_BRANCH=""
7070
- |
71-
if [[ "$AGENT_REQUIREMENTS_CHANGED" = "true" ]]; then
71+
if [[ "$DEPENDENCIES_CHANGED" = "true" ]]; then
7272
export RELEASE_BRANCH=$(git tag -l '7\.*' --points-at $BASE_REF | cat | sed 's/\..-.*/\.x/')
73-
echo "File agent_requirements.in has been modified, triggering an agent build pipeline."
73+
echo "Dependency files under .deps have been modified, triggering an agent build pipeline."
7474
DATADOG_AGENT_PIPELINE_URL=$DATADOG_AGENT_PIPELINE_URL RELEASE_BRANCH=$RELEASE_BRANCH python -u /trigger_agent_build.py --output-file pipeline_id.txt
7575
7676
# Get slack user

0 commit comments

Comments
 (0)