-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gitlab] release OTel to public facing repos on relevant tags + protections #30641
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -28,6 +28,30 @@ | |||||
DSD_REPOSITORY: dogstatsd | ||||||
IMG_REGISTRIES: public | ||||||
|
||||||
.manual_on_deploy_auto_on_rc-ot: | ||||||
- if: $BUCKET_BRANCH != "beta" && $BUCKET_BRANCH != "stable" | ||||||
when: manual | ||||||
allow_failure: true | ||||||
variables: | ||||||
AGENT_REPOSITORY: agent-dev | ||||||
IMG_REGISTRIES: dev | ||||||
- if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ && $FORCE_MANUAL != "true" | ||||||
when: on_success | ||||||
variables: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🥜 If these are the default values we can maybe set them in the main There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are all temporary jobs that will be removed once GA is reached for the OTel offering, so not sure it's worth it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes like the other comment, this is maybe something we could change to simplify the gitlab configuration and it's not directly related to your change so you can ignore this |
||||||
AGENT_REPOSITORY: agent | ||||||
IMG_REGISTRIES: public | ||||||
- if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ && $FORCE_MANUAL == "true" | ||||||
when: manual | ||||||
allow_failure: true | ||||||
variables: | ||||||
AGENT_REPOSITORY: agent | ||||||
IMG_REGISTRIES: public | ||||||
- when: manual | ||||||
allow_failure: true | ||||||
variables: | ||||||
AGENT_REPOSITORY: agent | ||||||
IMG_REGISTRIES: public | ||||||
|
||||||
# Rule for job that are triggered on_success on RC pipelines | ||||||
.on_rc: | ||||||
- if: $FORCE_MANUAL == "true" && $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ | ||||||
|
@@ -44,6 +68,20 @@ | |||||
DSD_REPOSITORY: dogstatsd | ||||||
IMG_REGISTRIES: public | ||||||
|
||||||
# Rule for job that are triggered on_success on RC pipelines for OTel Beta | ||||||
.on_rc-ot: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as previously
Suggested change
|
||||||
- if: $FORCE_MANUAL == "true" && $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ | ||||||
when: manual | ||||||
allow_failure: true | ||||||
variables: | ||||||
AGENT_REPOSITORY: agent | ||||||
IMG_REGISTRIES: public | ||||||
- if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ | ||||||
when: on_success | ||||||
variables: | ||||||
AGENT_REPOSITORY: agent | ||||||
IMG_REGISTRIES: public | ||||||
|
||||||
# Rule for job that can be triggered manually on final build, deploy to prod repository on stable branch deploy, else to dev repository | ||||||
.on_final: | ||||||
- if: $BUCKET_BRANCH == "beta" | ||||||
|
@@ -62,13 +100,32 @@ | |||||
DSD_REPOSITORY: dogstatsd | ||||||
IMG_REGISTRIES: public | ||||||
|
||||||
# Rule for job that can be triggered manually on final build, deploy to prod repository on stable branch deploy, else to dev repository | ||||||
# For OTel Beta builds | ||||||
.on_final-ot: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- if: $BUCKET_BRANCH == "beta" | ||||||
when: never | ||||||
- if: $BUCKET_BRANCH != "beta" && $BUCKET_BRANCH != "stable" && $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-v[0-9]+\.[0-9]+\.[0-9]+$/ | ||||||
when: manual | ||||||
allow_failure: true | ||||||
variables: | ||||||
AGENT_REPOSITORY: agent-dev | ||||||
IMG_REGISTRIES: dev | ||||||
- if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-v[0-9]+\.[0-9]+\.[0-9]+$/ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could use a comment to clarify the difference in the pattern/what's expected to match |
||||||
when: manual | ||||||
allow_failure: true | ||||||
variables: | ||||||
AGENT_REPOSITORY: agent | ||||||
IMG_REGISTRIES: public | ||||||
|
||||||
# Rule to deploy to our internal repository, on stable branch deploy | ||||||
.on_internal_final: | ||||||
- if: $BUCKET_BRANCH == "beta" | ||||||
when: never | ||||||
- if: $BUCKET_BRANCH != "beta" && $BUCKET_BRANCH != "stable" | ||||||
when: never | ||||||
- when: manual | ||||||
- if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+$/ | ||||||
when: manual | ||||||
allow_failure: true | ||||||
variables: | ||||||
AGENT_REPOSITORY: ci/datadog-agent/agent-release | ||||||
|
@@ -77,6 +134,19 @@ | |||||
CWS_INSTRUMENTATION_REPOSITORY: ci/datadog-agent/cws-instrumentation-release | ||||||
IMG_REGISTRIES: internal-aws-ddbuild | ||||||
|
||||||
# Rule to deploy to our internal repository, on stable branch deploy | ||||||
.on_internal_final-ot: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- if: $BUCKET_BRANCH == "beta" | ||||||
when: never | ||||||
- if: $BUCKET_BRANCH != "beta" && $BUCKET_BRANCH != "stable" | ||||||
when: never | ||||||
- if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-v[0-9]+\.[0-9]+\.[0-9]+$/ | ||||||
when: manual | ||||||
allow_failure: true | ||||||
variables: | ||||||
AGENT_REPOSITORY: ci/datadog-agent/agent-release | ||||||
IMG_REGISTRIES: internal-aws-ddbuild | ||||||
|
||||||
# Rule to deploy to our internal repository on RC | ||||||
.on_internal_rc: | ||||||
- if: $FORCE_MANUAL == "true" && $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ | ||||||
|
@@ -96,3 +166,17 @@ | |||||
DSD_REPOSITORY: ci/datadog-agent/dogstatsd-release | ||||||
CWS_INSTRUMENTATION_REPOSITORY: ci/datadog-agent/cws-instrumentation-release | ||||||
IMG_REGISTRIES: internal-aws-ddbuild | ||||||
|
||||||
# Rule to deploy to our internal repository on RC for OTel Agent Beta | ||||||
.on_internal_rc-ot: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- if: $FORCE_MANUAL == "true" && $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ | ||||||
when: manual | ||||||
allow_failure: true | ||||||
variables: | ||||||
AGENT_REPOSITORY: ci/datadog-agent/agent-release | ||||||
IMG_REGISTRIES: internal-aws-ddbuild | ||||||
- if: $CI_COMMIT_TAG =~ /^[0-9]+\.[0-9]+\.[0-9]+-v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$/ | ||||||
when: on_success | ||||||
variables: | ||||||
AGENT_REPOSITORY: ci/datadog-agent/agent-release | ||||||
IMG_REGISTRIES: internal-aws-ddbuild |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -48,26 +48,32 @@ include: | |||||
.deploy_containers-a7-base-ot: | ||||||
extends: .docker_publish_job_definition | ||||||
stage: deploy_containers | ||||||
rules: | ||||||
- when: manual | ||||||
allow_failure: true | ||||||
variables: | ||||||
AGENT_REPOSITORY: agent | ||||||
IMG_REGISTRIES: public | ||||||
dependencies: [] | ||||||
|
||||||
deploy_containers-a7: | ||||||
extends: .deploy_containers-a7_external | ||||||
rules: | ||||||
!reference [.manual_on_deploy_auto_on_rc] | ||||||
|
||||||
deploy_containers-a7-ot: | ||||||
extends: .deploy_containers-a7-base-ot | ||||||
rules: | ||||||
!reference [.manual_on_deploy_auto_on_rc-ot] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
deploy_containers-a7-rc: | ||||||
extends: .deploy_containers-a7_external | ||||||
rules: | ||||||
!reference [.on_rc] | ||||||
variables: | ||||||
VERSION: 7-rc | ||||||
|
||||||
deploy_containers-a7-ot-rc: | ||||||
extends: .deploy_containers-a7-base-ot | ||||||
rules: | ||||||
!reference [.on_rc-ot] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
variables: | ||||||
VERSION: 7-ot-beta-rc | ||||||
|
||||||
deploy_containers-dogstatsd: | ||||||
extends: .docker_publish_job_definition | ||||||
stage: deploy_containers | ||||||
|
@@ -95,8 +101,24 @@ deploy_containers-a7_internal-rc: | |||||
VERSION: 7-rc | ||||||
|
||||||
|
||||||
deploy_containers-ot: | ||||||
deploy_containers-a7-ot_internal: | ||||||
extends: .deploy_containers-a7-base-ot | ||||||
rules: | ||||||
!reference [.on_internal_final-ot] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
before_script: | ||||||
- if [[ "$VERSION" == "" ]]; then VERSION="$(inv agent.version --major-version 7 --url-safe --pipeline-id $PARENT_PIPELINE_ID)" || exit $?; fi | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nitpicky, but could you drop the |
||||||
- export IMG_SOURCES="${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-ot-beta${JMX}-amd64,${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-ot-beta${JMX}-arm64" | ||||||
- export IMG_DESTINATIONS="${AGENT_REPOSITORY}:${VERSION}-ot-beta${JMX}" | ||||||
parallel: | ||||||
matrix: | ||||||
- JMX: | ||||||
- "" | ||||||
- "-jmx" | ||||||
|
||||||
deploy_containers-a7-ot_internal-rc: | ||||||
extends: .deploy_containers-a7-base-ot | ||||||
rules: | ||||||
!reference [.on_internal_rc-ot] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
before_script: | ||||||
- if [[ "$VERSION" == "" ]]; then VERSION="$(inv agent.version --major-version 7 --url-safe --pipeline-id $PARENT_PIPELINE_ID)" || exit $?; fi | ||||||
- export IMG_SOURCES="${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-ot-beta${JMX}-amd64,${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-ot-beta${JMX}-arm64" | ||||||
|
@@ -155,8 +177,10 @@ deploy_containers_latest-dogstatsd: | |||||
IMG_SOURCES: ${SRC_DSD}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-amd64,${SRC_DSD}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-arm64 | ||||||
IMG_DESTINATIONS: ${DSD_REPOSITORY}:7,${DSD_REPOSITORY}:latest | ||||||
|
||||||
deploy_containers_latest-ot: | ||||||
deploy_containers_latest-a7-ot: | ||||||
extends: .deploy_containers-a7-base-ot | ||||||
rules: | ||||||
!reference [.on_final-ot] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
variables: | ||||||
VERSION: 7 | ||||||
parallel: | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥜 the logic about
_
and-
is not really strict and sometimes confusing on job names. I would recommend to use_
everywhere if possible (and it allows to select the full name with a double click)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually tried to use the following convention:
job_name-variant
So that anything with
_
underscores can be regarded as the actual job name, of which there may be other variants. And the-
hyphen is used to separate the job name from the particular variant. If you feel strongly about it, I can change it, but I still find it visually useful.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do understand your point. On my side, I often never really know when to put underscore or hyphen, because:
However, this is probably not related to this PR: I was trying to limit some naming conventions, and as there is no strict rule now, I can let you do as you prefer 😄