Skip to content

Commit

Permalink
Prepare for conductor based nighty builds (#32807)
Browse files Browse the repository at this point in the history
  • Loading branch information
chouquette authored Jan 13, 2025
1 parent bba2fb6 commit a55d195
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ variables:
if: ($DEPLOY_AGENT == "true" || $DDR_WORKFLOW_ID != null) && $BUCKET_BRANCH == "beta" && $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/

.if_scheduled_main: &if_scheduled_main
if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == "main"
if: ($CI_PIPELINE_SOURCE == "schedule" || ($DDR_WORKFLOW_ID != null && $APPS =~ /^beta-build-/)) && $CI_COMMIT_BRANCH == "main"

# Rule to trigger jobs only when a branch matches the mergequeue pattern.
.if_mergequeue: &if_mergequeue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal_kubernetes_deploy_experimental:
when: always
- if: $CI_COMMIT_BRANCH != "main"
when: never
- if: $DDR != "true"
- if: $DDR_WORKFLOW_ID == null
when: never
- if: $APPS !~ "/^datadog-agent/"
when: never
Expand Down Expand Up @@ -74,7 +74,7 @@ notify-slack:
when: always
- if: $CI_COMMIT_BRANCH != "main"
when: never
- if: $DDR != "true"
- if: $DDR_WORKFLOW_ID == null
when: never
- if: $APPS !~ "/^datadog-agent/"
when: never
Expand Down
6 changes: 2 additions & 4 deletions .gitlab/trigger_release/trigger_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ trigger_auto_staging_release:
AUTO_RELEASE: "true"
TARGET_REPO: staging
rules:
- if: $DDR == "true"
when: never
- if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-v[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+){0,1}$/
when: never
- !reference [.on_deploy]
Expand Down Expand Up @@ -73,13 +71,13 @@ generate_windows_gitlab_runner_bump_pr:
needs: ["trigger_auto_staging_release"]
tags: ["arch:amd64"]
rules:
- if: $DDR == "true"
- if: $DDR_WORKFLOW_ID != null
when: never
- if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-v[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+){0,1}$/
when: never
- if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/

script:
script:
# We are using the agent platform auto PR github app to access the buildenv repository (already used for macOS builds)
- !reference [.setup_github_app_agent_platform_auto_pr]
- python3 -m pip install -r requirements.txt -r tasks/libs/requirements-notifications.txt
Expand Down
6 changes: 1 addition & 5 deletions tasks/libs/notify/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ def should_notify(pipeline_id):
from tasks.libs.ciproviders.gitlab_api import get_pipeline

pipeline = get_pipeline(PROJECT_NAME, pipeline_id)
return (
pipeline.source != 'pipeline'
or pipeline.source == 'pipeline'
and all(var in os.environ for var in ['DDR', 'DDR_WORKFLOW_ID'])
)
return pipeline.source != 'pipeline' or pipeline.source == 'pipeline' and 'DDR_WORKFLOW_ID' in os.environ


def get_pipeline_type(pipeline):
Expand Down

0 comments on commit a55d195

Please sign in to comment.