Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into 202305
  • Loading branch information
mssonicbld committed Nov 1, 2024
2 parents 5ea7537 + 254035e commit 618ce02
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .azure-pipelines/azure-pipelines-image-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,28 @@ jobs:
displayName: 'Make configure'
postSteps:
- script: |
BUILD_REASON=$(Build.Reason)
echo "Build.Reason = $BUILD_REASON"
echo "Build.DefinitionName = $BUILD_DEFINITIONNAME"
if [[ "$BUILD_REASON" != "PullRequest" && "$BUILD_DEFINITIONNAME" == "Azure.sonic-buildimage.official.vs" ]]
then
PORT=443
DOCKERS=$(ls target/docker-ptf.gz)
BRANCH=$(Build.SourceBranchName)
echo "Branch = $BRANCH"
LABELS="$BRANCH"
[[ "$BRANCH" == "master" ]] && LABELS="$LABELS latest"
for f in $DOCKERS; do
echo $f
echo "Labels = $LABELS"
./push_docker.sh $f $(REGISTRY_SERVER_PUBLIC) $PORT $(REGISTRY_USERNAME) "$REGISTRY_PASSWD" "$LABELS"
done
fi
mkdir -p $(Build.ArtifactStagingDirectory)/target
mv target/* $(Build.ArtifactStagingDirectory)/target/
displayName: Copy Artifacts
env:
REGISTRY_PASSWD: $(REGISTRY_PASSWD)
displayName: Publish to Docker Registry and Copy Artifacts
condition: always()
- publish: $(Build.ArtifactStagingDirectory)
artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
Expand Down
1 change: 1 addition & 0 deletions .azure-pipelines/official-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ stages:
- stage: Build
pool: sonicbld-1es
variables:
- group: Container-Registry
- name: CACHE_MODE
value: wcache
- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml@buildimage
Expand Down

0 comments on commit 618ce02

Please sign in to comment.