Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
feat(pipelines): lock release images in azure container registry
Browse files Browse the repository at this point in the history
  • Loading branch information
julie-ng committed Mar 2, 2020
1 parent 0d632ea commit 8c27622
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,19 @@ stages:
tagsAsMultilineString: |
$(image-tag)
# release: lock image
# - task: AzureCLI@2
# displayName: 'Lock release image, preventing delete'
# inputs:
# azureSubscription: $(registry-service-connection)
# scriptType: bash
# scriptLocation: inlineScript
# inlineScript: |
# az --version
# az acr repository update \
# --name $(registry-acr-name) --image $(image-name):$(image-tag) \
# --write-enabled false
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/release'), ne(variables['Build.Reason'], 'Schedule'))
# lock release images
- task: AzureCLI@2
displayName: 'Lock release image, preventing delete'
inputs:
azureSubscription: $(registry-service-connection)
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
az --version
az acr repository update \
--name $(registry-acr-name) --image $(image-name):$(image-tag) \
--write-enabled false
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/release'), ne(variables['Build.Reason'], 'Schedule'))


# --- Stage: deploy to Azure App Services ---
Expand Down

0 comments on commit 8c27622

Please sign in to comment.