Skip to content

Commit

Permalink
ci: Change ACR Service Connection (#2727)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpayne3506 authored May 7, 2024
1 parent 893b6e6 commit be88049
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 28 deletions.
20 changes: 12 additions & 8 deletions .pipelines/cni/cilium/nightly-release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ stages:
make docker-operator-generic-image
name: BuildCiliumImage
displayName: "Build Cilium Image"
- task: Docker@2
displayName: Login
- task: AzureCLI@1
displayName: "Login"
inputs:
containerRegistry: $(CONTAINER_REGISTRY)
command: "login"
azureSubscription: $(ACR_ARM_SERVICE_CONNECTION)
scriptLocation: "inlineScript"
inlineScript: |
az acr login -n $(ACR)
- task: AzureCLI@1
inputs:
azureSubscription: $(TEST_SUB_SERVICE_CONNECTION)
Expand All @@ -52,11 +54,13 @@ stages:
docker push $(ACR).azurecr.io/cilium/operator-generic:$(DOCKER_IMAGE_TAG)
name: "PushCiliumImage"
displayName: "Push Cilium Image"
- task: Docker@2
displayName: Logout
- task: AzureCLI@1
displayName: "Logout"
inputs:
containerRegistry: $(CONTAINER_REGISTRY)
command: "logout"
azureSubscription: $(ACR_ARM_SERVICE_CONNECTION)
scriptLocation: "inlineScript"
inlineScript: |
docker logout
- stage: cilium_nightly
displayName: E2E - Cilium Nightly
Expand Down
22 changes: 12 additions & 10 deletions .pipelines/containers/container-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ parameters:
os_version: ""

steps:
- task: Docker@2
displayName: Login
- task: AzureCLI@1
displayName: "Login"
inputs:
containerRegistry: $(ACR_SERVICE_CONNECTION)
command: 'login'
addPipelineData: false
azureSubscription: $(ACR_ARM_SERVICE_CONNECTION)
scriptLocation: "inlineScript"
inlineScript: |
az acr login -n $(ACR)
- script: |
set -e
Expand All @@ -20,9 +21,10 @@ steps:
displayName: Image Build
retryCountOnTaskFailure: 3

- task: Docker@2
displayName: Logout
- task: AzureCLI@1
displayName: "Logout"
inputs:
containerRegistry: $(ACR_SERVICE_CONNECTION)
command: 'logout'
addPipelineData: false
azureSubscription: $(ACR_ARM_SERVICE_CONNECTION)
scriptLocation: "inlineScript"
inlineScript: |
docker logout
23 changes: 13 additions & 10 deletions .pipelines/containers/manifest-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ parameters:
os_versions: ""

steps:
- task: Docker@2
displayName: Login

- task: AzureCLI@1
displayName: "Login"
inputs:
containerRegistry: $(ACR_SERVICE_CONNECTION)
command: "login"
addPipelineData: false
azureSubscription: $(ACR_ARM_SERVICE_CONNECTION)
scriptLocation: "inlineScript"
inlineScript: |
az acr login -n $(ACR)
- script: |
set -e
Expand All @@ -34,12 +36,13 @@ steps:
displayName: Manifest Push
retryCountOnTaskFailure: 3
- task: Docker@2
displayName: Logout
- task: AzureCLI@1
displayName: "Logout"
inputs:
containerRegistry: $(ACR_SERVICE_CONNECTION)
command: "logout"
addPipelineData: false
azureSubscription: $(ACR_ARM_SERVICE_CONNECTION)
scriptLocation: "inlineScript"
inlineScript: |
docker logout
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: "Add SBOM Generator tool"
Expand Down

0 comments on commit be88049

Please sign in to comment.