From 13e9a1125aa5002e93c86b96e881eb5aa72ead72 Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Thu, 14 Oct 2021 12:38:42 -0400 Subject: [PATCH] Publish stress watcher image in CI. Run docker build on PR --- eng/containers/ci.yml | 20 ++++++++++++++++++- .../templates/stresswatcher.yaml | 2 +- .../stress-infrastructure/values.yaml | 1 - 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/eng/containers/ci.yml b/eng/containers/ci.yml index 73f50d2b920..aa5ef61480c 100644 --- a/eng/containers/ci.yml +++ b/eng/containers/ci.yml @@ -22,6 +22,12 @@ parameters: dockerFile: 'tools/test-proxy/docker/dockerfile-win' stableTags: - 'latest' + - name: stress_watcher + pool: 'ubuntu-20.04' + dockerRepo: 'stress/watcher' + dockerFile: 'tools/stress-cluster/services/Stress.Watcher/Dockerfile' + stableTags: + - 'latest' trigger: branches: @@ -32,8 +38,18 @@ trigger: - eng/containers/ - tools/test-proxy/docker/ - tools/keyvault-mock-attestation/Dockerfile + - tools/stress-cluster/services/Stress.Watcher/Dockerfile -pr: none +pr: + branches: + include: + - main + paths: + include: + - eng/containers/ + - tools/test-proxy/docker/ + - tools/keyvault-mock-attestation/Dockerfile + - tools/stress-cluster/services/Stress.Watcher/Dockerfile variables: - name: containerRegistry @@ -64,6 +80,7 @@ jobs: - task: Docker@2 displayName: Push ${{ config.name }}:$(imageTag) + condition: ne(variables['Build.Reason'], 'PullRequest') inputs: containerRegistry: $(containerRegistry) repository: ${{ config.dockerRepo }} @@ -81,6 +98,7 @@ jobs: - task: Docker@2 displayName: Push ${{ config.name }}:${{ stableTag }} + condition: ne(variables['Build.Reason'], 'PullRequest') inputs: containerRegistry: $(containerRegistry) repository: ${{ config.dockerRepo }} diff --git a/tools/stress-cluster/cluster/kubernetes/stress-infrastructure/templates/stresswatcher.yaml b/tools/stress-cluster/cluster/kubernetes/stress-infrastructure/templates/stresswatcher.yaml index ad835284e09..45898c9b300 100644 --- a/tools/stress-cluster/cluster/kubernetes/stress-infrastructure/templates/stresswatcher.yaml +++ b/tools/stress-cluster/cluster/kubernetes/stress-infrastructure/templates/stresswatcher.yaml @@ -18,7 +18,7 @@ spec: spec: containers: - name: stresswatcher - image: stress{{ .Values.repository }}registry.azurecr.io/services/stresswatcher:{{ .Values.tag }} + image: azsdkengsys.azurecr.io/stress/watcher:{{ .Values.tag }} command: ["dotnet", "Stress.Watcher.dll"] --- apiVersion: rbac.authorization.k8s.io/v1 diff --git a/tools/stress-cluster/cluster/kubernetes/stress-infrastructure/values.yaml b/tools/stress-cluster/cluster/kubernetes/stress-infrastructure/values.yaml index 4a0be5627f4..c555c215043 100644 --- a/tools/stress-cluster/cluster/kubernetes/stress-infrastructure/values.yaml +++ b/tools/stress-cluster/cluster/kubernetes/stress-infrastructure/values.yaml @@ -1,4 +1,3 @@ -repository: test tag: latest chaos-mesh: