Skip to content

Commit

Permalink
Overhaul the pipleine to official
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaozhiche320 authored Feb 4, 2025
1 parent 55b1f47 commit ce76e30
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .pipelines/EV2Specs/scopeBindings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
{
"find": "__IMAGE_NAME_SPACE__",
"replaceWith": "xiaozhiche320/retina"
"replaceWith": "public/retina"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/EV2Specs/test.rolloutSpec.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"notification": {
"email": {
"to": "yilinwang@microsoft.com",
"to": "acn@microsoft.com",
"options": {
"when": [
"onError",
Expand Down
8 changes: 3 additions & 5 deletions .pipelines/Shell/Run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
# Azure Container Registry URL
# Prod ACR_URL="acnprod.azurecr.io/public/containernetworking"
ACR_URL="$PROD_CONTAINER_REGISTRY/$IMAGE_NAMESPACE"
IMAGE_NAME="multi_arch_image.tar"

Expand Down Expand Up @@ -55,9 +54,9 @@ extract_image_details() {
if [[ $name == *"-"* ]]; then
name="${name%-*}"
fi


# Handle the case for Windows image names/tags
if [[ $name_tag == *"windows"* ]]; then
# Handle the case for Windows image names/tags
name="${name_tag%-*-*-*-*}"
tag="${name_tag#*-*-}"
fi
Expand All @@ -78,7 +77,6 @@ find . -type f -name "*.tar" | while read -r tarball; do

# Check if a manifest for this image name already exists
if [[ ! -f "./manifests/$image_name.txt" ]]; then
# If not, create a new file for this image name
touch "./manifests/$image_name.txt"
fi

Expand All @@ -92,7 +90,7 @@ find ./manifests -type f -name "*.txt" | while read -r manifest_file; do

# Extract the git SHA tag by removing architecture
git_sha_tag="${image_details_array[0]#*:}"
git_sha_tag="${git_sha_tag%-*-*}" # Remove the platform suffix (e.g., -linux-amd64)
git_sha_tag="${git_sha_tag%-*-*}"

# Extract the image name from the manifest file name
image_name=$(basename "$manifest_file" .txt)
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/retina-oss-build-stage.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
- name: retinaOSSRepoName #not sure if really need but put for now, YEAH NEED BUT pass this variable for githuboss in 'main'
- name: retinaOSSRepoName
type: string
- name: retinaEnterpriseRepoName
type: string
Expand Down
54 changes: 26 additions & 28 deletions .pipelines/retina-oss-release-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ stages:
inputs:
instructions: Confirm to continue. This will timeout in 24 hours and will reject the rest of the pipeline if not approved.
onTimeout: 'reject'
# approvers: "[TEAM FOUNDATION]\\Retina"
approvers: "[email protected]"
allowApproversToApproveTheirOwnRuns: true
approvers: "[TEAM FOUNDATION]\\Chandan's Extended Team"

# Prepare Image Artifact
- stage: build
Expand Down Expand Up @@ -75,28 +73,28 @@ stages:
Select: regions(*)

# Prod Stage
# - stage: "Prod_Release"
# dependsOn: build
# condition: succeeded()
# displayName: "Prod: Push Retina OSS images to ACR"
# variables:
# ob_release_environment: Production
# jobs:
# - job: ReleaseJob
# pool:
# type: release
# variables:
# retryCountOnMonitoringTaskFailure: 3
# steps:
# - download: current
# - task: vsrm-ev2.ev2-rollout.ev2-rollout-task.Ev2RARollout@2
# displayName: "Start Ev2 Rollout"
# inputs:
# EndpointProviderType: ApprovalService
# ApprovalServiceEnvironment: Production
# TaskAction: RegisterAndRollout
# SkipRegistrationIfExists: true
# ServiceRootPath: '$(Pipeline.Workspace)'
# RolloutSpecPath: '$(Pipeline.Workspace)/drop_build_restore/EV2Specs/prod.rolloutSpec.json'
# StageMapName: 'Microsoft.Azure.SDP.Standard'
# Select: regions(*)
- stage: "Prod_Release"
dependsOn: build
condition: succeeded()
displayName: "Prod: Push Retina OSS images to ACR"
variables:
ob_release_environment: Production
jobs:
- job: ReleaseJob
pool:
type: release
variables:
retryCountOnMonitoringTaskFailure: 3
steps:
- download: current
- task: vsrm-ev2.ev2-rollout.ev2-rollout-task.Ev2RARollout@2
displayName: "Start Ev2 Rollout"
inputs:
EndpointProviderType: ApprovalService
ApprovalServiceEnvironment: Production
TaskAction: RegisterAndRollout
SkipRegistrationIfExists: true
ServiceRootPath: '$(Pipeline.Workspace)'
RolloutSpecPath: '$(Pipeline.Workspace)/drop_build_restore/EV2Specs/prod.rolloutSpec.json'
StageMapName: 'Microsoft.Azure.SDP.Standard'
Select: regions(*)

0 comments on commit ce76e30

Please sign in to comment.