-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[docker-ptf]: CI change to publish docker-ptf image to the docker registry #20528
base: master
Are you sure you want to change the base?
[docker-ptf]: CI change to publish docker-ptf image to the docker registry #20528
Conversation
azure-pipelines.yml
Outdated
@@ -52,6 +52,8 @@ variables: | |||
stages: | |||
- stage: BuildVS | |||
pool: sonicbld-1es | |||
variables: |
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.
azure-pipelines.yml don't need this Variable Group
official-build.yml need this.
@@ -58,9 +58,23 @@ jobs: | |||
displayName: 'Make configure' | |||
postSteps: | |||
- script: | | |||
BUILD_REASON=$(Build.Reason) | |||
if [[ "$BUILD_REASON" != "PullRequest" && "$GROUP_NAME" == "vs" ]] |
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.
Azure.sonic-buildimage.official.vs
Please use pipeline name in condition. Only this pipeline need the step.
Publish to docker registry only for this pipeline
mkdir -p $(Build.ArtifactStagingDirectory)/target | ||
mv target/* $(Build.ArtifactStagingDirectory)/target/ | ||
displayName: Copy Artifacts | ||
displayName: Publish to Docker Registry and Copy Artifacts |
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.
you need add something like this
env:
REGISTRY_PASSWD: $(ABC)
Why I did it
Changes to
docker-ptf
Dockerfile don't get automatically published to the docker registry accessed by the community. This PR addresses the issue.Work item tracking
How I did it
Modified the
postSteps
phase inazure-pipelines-image-template.yml
to invoke the script to pushdocker-ptf
image to the docker registry. The push is applicable to build branches (master
,202305
,202311
etc.) and not feature branches.How to verify it
TBD
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Not applicable.
Description for the changelog
[docker-ptf]: CI change to publish docker-ptf image to the public/community docker registry
Link to config_db schema for YANG module changes
Not applicable
A picture of a cute animal (not mandatory but encouraged)