Skip to content

Commit 58a1c94

Browse files
authored
Migrate all release pipelines to governed release yaml (#1443)
* add converted governed release for arc canary * Update ci-arc-k8s-extension-canary-release.yaml for Azure Pipelines * Update ci-arc-k8s-extension-canary-release.yaml for Azure Pipelines * Update ci-arc-k8s-extension-canary-release.yaml for Azure Pipelines * Update ci-arc-k8s-extension-canary-release.yaml for Azure Pipelines * Update ci-arc-k8s-extension-canary-release.yaml for Azure Pipelines * migrate governed pipelines
1 parent 05c46f5 commit 58a1c94

File tree

3 files changed

+481
-11
lines changed

3 files changed

+481
-11
lines changed
Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
trigger: none
2+
name: $(Date:yyyyMMdd).$(Rev:r)
3+
variables:
4+
- name: ACRName
5+
value: $(VAR_ACR_NAME)
6+
- name: AgentImageTagSuffix
7+
value: $(VAR_AGENT_IMAGE_TAG_SUFFIX)
8+
- name: AgentRelease
9+
value: $(VAR_AGENT_RELEASE)
10+
- name: AKSEngineCluster
11+
value: $(VAR_AKS_ENGINE_CLUSTER)
12+
- name: AKSEngineClusterKubeConfigSecretName
13+
value: $(VAR_AKS_ENGINE_CLUSTER_KUBECONFIG_SECRET_NAME)
14+
- name: AKSScaleClusterKubeConfigSecretName
15+
value: $(VAR_AKS_SCALE_CLUSTER_KUBECONFIG_SECRET_NAME)
16+
- name: AKSScaleClusterRegion
17+
value: $(VAR_AKS_SCALE_CLUSTER_REGION)
18+
- name: AKSScaleClusterResourceId
19+
value: $(VAR_AKS_SCALE_CLUSTER_RESOURCE_ID)
20+
- name: CDPXLinuxACR
21+
value: $(VAR_CDPX_LINUX_ACR)
22+
- name: CDPXLinuxRegistry
23+
value: $(VAR_CDPX_LINUX_REGISTRY)
24+
- name: CDPXLinuxRepoName
25+
value: $(VAR_CDPX_LINUX_REPO_NAME)
26+
- name: CDPXLinuxTag
27+
value: $(VAR_CDPX_LINUX_TAG)
28+
- name: CDPXWindowsACR
29+
value: $(VAR_CDPX_WINDOWS_ACR)
30+
- name: CDPXWindowsRegistry
31+
value: $(VAR_CDPX_WINDOWS_REGISTRY)
32+
- name: CDPXWindowsRepoName
33+
value: $(VAR_CDPX_WINDOWS_REPO_NAME)
34+
- name: CDPXWindowsTag
35+
value: $(VAR_CDPX_WINDOWS_TAG)
36+
- name: CIKV
37+
value: $(VAR_CIKV)
38+
- name: CIRelease
39+
value: $(VAR_CI_RELEASE)
40+
- name: ClusterRegion
41+
value: $(VAR_CLUSTER_REGION)
42+
- name: ClusterResourceId
43+
value: $(VAR_CLUSTER_RESOURCE_ID)
44+
- name: ManagedIdentity
45+
value: $(VAR_MANAGED_IDENTITY)
46+
- name: OverrideTag
47+
value: $(VAR_OVERRIDE_TAG)
48+
- name: ServiceTreeGuid
49+
value: $(VAR_SERVICE_TREE_GUID)
50+
- name: UserAssignedIdentityClientId
51+
value: $(VAR_USER_ASSIGNED_IDENTITY_CLIENT_ID)
52+
- name: WorkspaceResourceId
53+
value: $(VAR_WORKSPACE_RESOURCE_ID)
54+
resources:
55+
pipelines:
56+
- pipeline: '_ci-aks-prod-release'
57+
project: 'microsoft'
58+
source: 'CDPX\docker-provider\ci-aks-prod-release'
59+
repositories:
60+
- repository: 1ESPipelineTemplates
61+
type: git
62+
name: 1ESPipelineTemplates/1ESPipelineTemplates
63+
ref: refs/tags/release
64+
extends:
65+
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
66+
parameters:
67+
pool:
68+
name: Azure-Pipelines-Windows-CI-Test-EO
69+
os: windows
70+
serviceTreeId: 3170cdd2-19f0-4027-912b-1027311691a2
71+
customBuildTags:
72+
- ES365AIMigrationTooling-Release
73+
stages:
74+
- stage: Stage_1
75+
displayName: 'Note: Use Build with Telemetry Tag defined'
76+
trigger: manual
77+
jobs:
78+
- job: Job_1
79+
displayName: Agent job
80+
condition: succeeded()
81+
timeoutInMinutes: 0
82+
templateContext:
83+
inputs:
84+
- input: pipelineArtifact
85+
pipeline: '_ContainerInsights-MultiArch-MergedBranches'
86+
artifactName: 'drop'
87+
targetPath: '$(Pipeline.Workspace)/drop'
88+
- input: pipelineArtifact
89+
pipeline: '_ContainerInsights-MultiArch-MergedBranches'
90+
artifactName: 'windows-drop'
91+
targetPath: '$(Pipeline.Workspace)/windows-drop'
92+
- input: pipelineArtifact
93+
pipeline: '_ContainerInsights-MultiArch-MergedBranches'
94+
artifactName: 'linux-drop'
95+
targetPath: '$(Pipeline.Workspace)/linux-drop'
96+
steps:
97+
- task: Bash@3
98+
displayName: Bash Script
99+
inputs:
100+
targetType: inline
101+
script: |
102+
echo 'Check that the build image you use has the telemetry tag defined'
103+
- stage: Stage_2
104+
displayName: Push Linux and Windows Agent
105+
dependsOn: []
106+
templateContext:
107+
cloud: Public
108+
isProduction: false
109+
jobs:
110+
- job: Ev2_rollout
111+
displayName: Agent job - Ev2
112+
condition: succeeded()
113+
timeoutInMinutes: 0
114+
templateContext:
115+
type: releaseJob
116+
workflow: ev2-classic
117+
inputs:
118+
- input: pipelineArtifact
119+
pipeline: '_ContainerInsights-MultiArch-MergedBranches'
120+
artifactName: 'drop'
121+
- input: pipelineArtifact
122+
pipeline: '_ContainerInsights-MultiArch-MergedBranches'
123+
artifactName: 'windows-drop'
124+
- input: pipelineArtifact
125+
pipeline: '_ContainerInsights-MultiArch-MergedBranches'
126+
artifactName: 'linux-drop'
127+
ev2:
128+
useServerMonitorTask: true
129+
serviceConnection: ci-ev2-ame
130+
serviceRootPath: $(Pipeline.Workspace)/ev2Artifact/drop/build/mergebranch-multiarch-agent-deployment/ServiceGroupRoot
131+
rolloutSpecPath: $(Pipeline.Workspace)/ev2Artifact/drop/build/mergebranch-multiarch-agent-deployment/ServiceGroupRoot/RolloutSpecs/RolloutSpecs.json
132+
inlineRolloutSpec: '{ "$schema": "https://ev2schema.azure.net/schemas/2020-01-01/rolloutSpecification.json", "ContentVersion": "1.0.0.0", "RolloutMetadata": { "ServiceModelPath": "ServiceModels//Public.ServiceModel.json", "ScopeBindingsPath": "ScopeBindings//Public.ScopeBindings.json", "Name": "ContainerInsightsAgent", "RolloutType": "Major", "BuildSource": { "Parameters": { "VersionFile": "buildver.txt" } }, "Notification": { "Email": { "To": "[email protected]" } } }, "OrchestratedSteps": [ { "name": "PushLinuxAgent", "targetType": "ServiceResource", "targetName": "PushLinuxAgent", "actions": [ "Shell/PushAgentToACR" ], "dependsOn": [ ] }, { "name": "PushWindowsAgent", "targetType": "ServiceResource", "targetName": "PushWindowsAgent", "actions": [ "Shell/PushAgentToACR" ], "dependsOn": [ ] } ] }'
133+
inlineScopeBindingOverrides: '{ "$schema": "https://ev2schema.azure.net/schemas/2020-01-01/scopeBindings.json", "contentVersion": "0.0.0.1", "scopeBindings": [ { "scopeTagName": "Global", "bindings": [ { "find": "__ACR_NAME__", "replaceWith": "$(ACRName)" }, { "find": "__AGENT_RELEASE__", "replaceWith": "$(AgentRelease)" }, { "find": "__AGENT_IMAGE_TAG_SUFFIX__", "replaceWith": "$(AgentImageTagSuffix)" }, { "find": "__MANAGED_IDENTITY__", "replaceWith": "$(ManagedIdentity)" }, { "find": "__CDPX_LINUX_TAG__", "replaceWith": "$(CDPXLinuxTag)" }, { "find": "__CDPX_WINDOWS_TAG__", "replaceWith": "$(CDPXWindowsTag)" }, { "find": "__OVERRIDE_TAG__", "replaceWith": "$(OverrideTag)" } ] } ] }'
134+
- stage: Stage_3
135+
displayName: Deploy
136+
trigger: manual
137+
jobs:
138+
- job: Job_1
139+
displayName: Agent job
140+
condition: succeeded()
141+
timeoutInMinutes: 0
142+
templateContext:
143+
type: releaseJob
144+
isProduction: true
145+
inputs:
146+
- input: pipelineArtifact
147+
pipeline: '_ContainerInsights-MultiArch-MergedBranches'
148+
artifactName: 'drop'
149+
targetPath: '$(Pipeline.Workspace)/drop'
150+
- input: pipelineArtifact
151+
pipeline: '_ContainerInsights-MultiArch-MergedBranches'
152+
artifactName: 'windows-drop'
153+
targetPath: '$(Pipeline.Workspace)/windows-drop'
154+
- input: pipelineArtifact
155+
pipeline: '_ContainerInsights-MultiArch-MergedBranches'
156+
artifactName: 'linux-drop'
157+
targetPath: '$(Pipeline.Workspace)/linux-drop'
158+
steps:
159+
- task: AzureCLI@2
160+
displayName: Get Workspace ID and Key
161+
inputs:
162+
connectedServiceNameARM: ContainerInsights_Build_Subscription (9b96ebbd-c57a-42d1-bbe9-b69296e4c7fb)
163+
scriptType: bash
164+
scriptPath: $(Pipeline.Workspace)/ev2Artifact/drop/build/get-workspace-id-and-key.sh
165+
scriptArguments: WorkspaceResourceId=$(WorkspaceResourceId)
166+
cwd: $(Pipeline.Workspace)/ev2Artifact/drop/build
167+
- task: Bash@3
168+
displayName: Update Cluster ResourceId, Region, Image, WSID and WSKEY
169+
inputs:
170+
filePath: $(Pipeline.Workspace)/ev2Artifact/drop/build/update-place-holders-in-yaml.sh
171+
arguments: ClusterResourceId=$(ClusterResourceId) ClusterRegion=$(ClusterRegion) CIRelease=$(CIRelease) CIImageTagSuffix=$(AgentImageTagSuffix)
172+
workingDirectory: $(Pipeline.Workspace)/ev2Artifact/drop/build
173+
- task: Kubernetes@1
174+
displayName: kubectl apply
175+
inputs:
176+
connectionType: Azure Resource Manager
177+
azureSubscriptionEndpoint: ContainerInsights_Build_Subscription (9b96ebbd-c57a-42d1-bbe9-b69296e4c7fb)
178+
azureResourceGroup: ciprod-rc-aks16-weu-rg
179+
kubernetesCluster: ciprod-rc-aks16-weu
180+
useClusterAdmin: true
181+
namespace: kube-system
182+
command: apply
183+
arguments: -f ama-logs.yaml
184+
cwd: $(Pipeline.Workspace)/ev2Artifact/drop/build
185+
- task: HelmInstaller@0
186+
displayName: Install Helm 3.2.1
187+
inputs:
188+
helmVersion: 3.2.1
189+
checkLatestHelmVersion: false
190+
- task: AzureCLI@2
191+
displayName: Download Kubeconfig for AKS-Engine
192+
inputs:
193+
connectedServiceNameARM: ContainerInsights_Build_Subscription (9b96ebbd-c57a-42d1-bbe9-b69296e4c7fb)
194+
scriptType: bash
195+
scriptPath: $(Pipeline.Workspace)/ev2Artifact/drop/build/get-kube-config-from-kv.sh
196+
scriptArguments: KV=$(CIKV) KVSECRETNAMEKUBECONFIG=$(AKSEngineClusterKubeConfigSecretName)
197+
- task: Bash@3
198+
displayName: Install chart to aks-engine cluster
199+
inputs:
200+
filePath: $(Pipeline.Workspace)/ev2Artifact/drop/build/install-chart-to-aks-engine-cluster.sh
201+
arguments: ClusterName=$(AKSEngineCluster) CIRelease=$(CIRelease) CIImageTagSuffix=$(AgentImageTagSuffix)
202+
workingDirectory: $(Pipeline.Workspace)/ev2Artifact/drop/build
203+
- stage: Stage_4
204+
displayName: Deploy2ScaleCluster
205+
dependsOn: Stage_3
206+
jobs:
207+
- job: Job_1
208+
displayName: Agent job
209+
condition: succeeded()
210+
timeoutInMinutes: 0
211+
templateContext:
212+
inputs:
213+
- input: pipelineArtifact
214+
pipeline: '_ContainerInsights-MultiArch-MergedBranches'
215+
artifactName: 'drop'
216+
targetPath: '$(Pipeline.Workspace)/drop'
217+
- input: pipelineArtifact
218+
pipeline: '_ContainerInsights-MultiArch-MergedBranches'
219+
artifactName: 'windows-drop'
220+
targetPath: '$(Pipeline.Workspace)/windows-drop'
221+
- input: pipelineArtifact
222+
pipeline: '_ContainerInsights-MultiArch-MergedBranches'
223+
artifactName: 'linux-drop'
224+
targetPath: '$(Pipeline.Workspace)/linux-drop'

.pipelines/ci-arc-k8s-extension-canary-release.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ trigger: none
22
name: $(Date:yyyyMMdd).$(Rev:r)
33
variables:
44
- name: ACRName
5-
value: containerinsights.azurecr.io
5+
value: $(VAR_ACR_NAME)
66
- name: ADMIN_SUBSCRIPTION_ID
77
value: $(VAR_ADMIN_SUBSCRIPTION_ID)
88
- name: CHART_VERSION
@@ -34,7 +34,7 @@ resources:
3434
pipelines:
3535
- pipeline: '_ci-arc-k8s-extension-canary-release'
3636
project: 'microsoft'
37-
source: 'CDPX\docker-provider\ContainerInsights-MultiArch-MergedBranches'
37+
source: 'CDPX\docker-provider\ci-arc-k8s-extension-canary-release'
3838
repositories:
3939
- repository: 1ESPipelineTemplates
4040
type: git
@@ -116,8 +116,8 @@ stages:
116116
inputs:
117117
environment: $(ev2Environment)
118118
servicetreeguid: $(VAR_SERVICE_TREE_GUID)
119-
- job: Ev2_ev2_rollout
120-
displayName: Agent job - Ev2 Ev2 Rollout
119+
- job: Ev2_rollout
120+
displayName: Agent job - Ev2
121121
timeoutInMinutes: '0'
122122
condition: succeeded()
123123
dependsOn:
@@ -195,7 +195,7 @@ stages:
195195
env:
196196
SBOMVALIDATOR_TEMPIGNOREMISSING: true
197197
inputs:
198-
BuildDropPath: $(Pipeline.Workspace)/ev2Artifact/drop/linux
198+
BuildDropPath: $(Pipeline.Workspace)/ev2Artifact/linux-drop
199199
OutputPath: $(Agent.TempDirectory)/sbom_validation_results.json
200200
ValidateSignature: True
201201
Verbosity: 'Verbose'
@@ -271,7 +271,7 @@ stages:
271271
target:
272272
container: host
273273
displayName: Ev2 Classic - Deploy
274-
- job: Ev2_ev2_monitoring
274+
- job: Ev2_monitoring
275275
variables:
276276
- name: OneESPT
277277
value: true
@@ -293,7 +293,7 @@ stages:
293293
pool:
294294
name: server
295295
dependsOn:
296-
- Ev2_ev2_rollout
296+
- Ev2_rollout
297297
timeoutInMinutes: '0'
298298
steps:
299299
- task: vsrm-ev2.vss-server-ev2.1950188C-A844-4040-A014-A326BC8332D3.Ev2Agentless@1
@@ -376,7 +376,7 @@ stages:
376376
inputs:
377377
environment: $(ev2Environment)
378378
servicetreeguid: $(VAR_SERVICE_TREE_GUID)
379-
- job: Ev2_ev2_rollout
379+
- job: Ev2_rollout
380380
displayName: Agent job - Ev2 Ev2 Rollout
381381
timeoutInMinutes: '0'
382382
condition: succeeded()
@@ -455,7 +455,7 @@ stages:
455455
env:
456456
SBOMVALIDATOR_TEMPIGNOREMISSING: true
457457
inputs:
458-
BuildDropPath: $(Pipeline.Workspace)/ev2Artifact/drop/linux
458+
BuildDropPath: $(Pipeline.Workspace)/ev2Artifact/linux-drop
459459
OutputPath: $(Agent.TempDirectory)/sbom_validation_results.json
460460
ValidateSignature: True
461461
Verbosity: 'Verbose'
@@ -531,7 +531,7 @@ stages:
531531
target:
532532
container: host
533533
displayName: Ev2 Classic - Deploy
534-
- job: Ev2_ev2_monitoring
534+
- job: Ev2_monitoring
535535
variables:
536536
- name: OneESPT
537537
value: true
@@ -553,7 +553,7 @@ stages:
553553
pool:
554554
name: server
555555
dependsOn:
556-
- Ev2_ev2_rollout
556+
- Ev2_rollout
557557
timeoutInMinutes: '0'
558558
steps:
559559
- task: vsrm-ev2.vss-server-ev2.1950188C-A844-4040-A014-A326BC8332D3.Ev2Agentless@1

0 commit comments

Comments
 (0)