зеркало из https://github.com/Azure/ARO-RP.git
Build and push tagged aro image into ACR
When annotated TAG is not set the new step fails. Otherwise it builds the tagged image and pushes it to the ACR. Signed-off-by: Petr Kotas <pkotas@redhat.com>
This commit is contained in:
Родитель
44f6fc55fb
Коммит
82edb0e92d
|
@ -0,0 +1,15 @@
|
||||||
|
parameters:
|
||||||
|
rpImageACR: ''
|
||||||
|
imageTag: ''
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
trap 'set +e; for c in $(docker ps -aq); do docker rm -f $c; done; docker image prune -af ; rm -rf ~/.docker/config.json' EXIT
|
||||||
|
|
||||||
|
export RP_IMAGE_ACR=${{ parameters.rpImageACR }}
|
||||||
|
export TAG=${{ parameters.imageTag }}
|
||||||
|
az acr login --name "$RP_IMAGE_ACR"
|
||||||
|
# azure checkouts commit, so removing master reference when publishing image
|
||||||
|
export BRANCH=$(Build.SourceBranchName)
|
||||||
|
make publish-image-aro-tag
|
||||||
|
displayName: ⚙️ Build and push tagged images to ACR
|
Загрузка…
Ссылка в новой задаче