From a80cff04fe4a7a187fadafd87714595c2a85d777 Mon Sep 17 00:00:00 2001 From: bragi92 Date: Wed, 27 Mar 2024 17:25:50 -0700 Subject: [PATCH] build: push ccp linux image to prod mcr (#805) --- ...ometheusCollector.LinuxCCP.Parameters.json | 64 +++++++++++++++++++ .../RolloutSpecs/RolloutSpecs.json | 12 +++- .../ScopeBindings/Public.ScopeBindings.json | 4 ++ .../ServiceModels/Public.ServiceModel.json | 5 ++ 4 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 .pipelines/deployment/ServiceGroupRoot/Parameters/PrometheusCollector.LinuxCCP.Parameters.json diff --git a/.pipelines/deployment/ServiceGroupRoot/Parameters/PrometheusCollector.LinuxCCP.Parameters.json b/.pipelines/deployment/ServiceGroupRoot/Parameters/PrometheusCollector.LinuxCCP.Parameters.json new file mode 100644 index 000000000..61f312712 --- /dev/null +++ b/.pipelines/deployment/ServiceGroupRoot/Parameters/PrometheusCollector.LinuxCCP.Parameters.json @@ -0,0 +1,64 @@ +{ + "$schema": "http://schema.express.azure.com/schemas/2015-01-01-alpha/RolloutParameters.json", + "contentVersion": "1.0.0.0", + "wait": [ + { + "name": "waitSdpBakeTime", + "properties": { + "duration": "PT24H" + } + } + ], + "shellExtensions": [ + { + "name": "PushAgentToACR", + "type": "ShellExtensionType", + "properties": { + "maxexecutiontime": "PT1H" + }, + "package": { + "reference": { + "path": "artifacts.tar.gz" + } + }, + "launch": { + "command": [ + "/bin/bash", + "pushAgentToAcr.sh" + ], + "environmentVariables": [ + { + "name": "ACR_REGISTRY", + "value": "__ACR_REGISTRY__" + }, + { + "name": "PROD_ACR_REPOSITORY", + "value": "__PROD_ACR_AGENT_REPOSITORY__" + }, + { + "name": "MCR_REGISTRY", + "value": "__MCR_REGISTRY__" + }, + { + "name": "PROD_MCR_REPOSITORY", + "value": "__PROD_MCR_AGENT_REPOSITORY__" + }, + { + "name": "DEV_MCR_REPOSITORY", + "value": "__DEV_MCR_AGENT_REPOSITORY__" + }, + { + "name": "IMAGE_TAG", + "value": "__LINUX_CCP_TAG__" + } + ], + "identity": { + "type": "userAssigned", + "userAssignedIdentities": [ + "__MANAGED_IDENTITY__" + ] + } + } + } + ] +} \ No newline at end of file diff --git a/.pipelines/deployment/ServiceGroupRoot/RolloutSpecs/RolloutSpecs.json b/.pipelines/deployment/ServiceGroupRoot/RolloutSpecs/RolloutSpecs.json index 36c217b30..ba2b6c2c2 100644 --- a/.pipelines/deployment/ServiceGroupRoot/RolloutSpecs/RolloutSpecs.json +++ b/.pipelines/deployment/ServiceGroupRoot/RolloutSpecs/RolloutSpecs.json @@ -13,7 +13,7 @@ }, "Notification": { "Email": { - "To": "omscontainers@microsoft.com" + "To": "ciprometheus@microsoft.com" } } }, @@ -27,6 +27,15 @@ ], "dependsOn": [] }, + { + "name": "PushCCPLinuxAgent", + "targetType": "ServiceResource", + "targetName": "PushCCPLinuxAgent", + "actions": [ + "Shell/PushAgentToACR" + ], + "dependsOn": [] + }, { "name": "PushWindowsAgent", "targetType": "ServiceResource", @@ -81,6 +90,7 @@ ], "dependsOn": [ "PushLinuxAgent", + "PushCCPLinuxAgent", "PushWindowsAgent", "PushKSMChart", "PushNEChart" diff --git a/.pipelines/deployment/ServiceGroupRoot/ScopeBindings/Public.ScopeBindings.json b/.pipelines/deployment/ServiceGroupRoot/ScopeBindings/Public.ScopeBindings.json index fecd93384..510003c94 100644 --- a/.pipelines/deployment/ServiceGroupRoot/ScopeBindings/Public.ScopeBindings.json +++ b/.pipelines/deployment/ServiceGroupRoot/ScopeBindings/Public.ScopeBindings.json @@ -49,6 +49,10 @@ "find": "__LINUX_TAG__", "replaceWith": "$(LinuxTag)" }, + { + "find": "__LINUX_CCP_TAG__", + "replaceWith": "$(LinuxCCPTag)" + }, { "find": "__WINDOWS_TAG__", "replaceWith": "$(WindowsTag)" diff --git a/.pipelines/deployment/ServiceGroupRoot/ServiceModels/Public.ServiceModel.json b/.pipelines/deployment/ServiceGroupRoot/ServiceModels/Public.ServiceModel.json index f445997d1..b56822d9b 100644 --- a/.pipelines/deployment/ServiceGroupRoot/ServiceModels/Public.ServiceModel.json +++ b/.pipelines/deployment/ServiceGroupRoot/ServiceModels/Public.ServiceModel.json @@ -45,6 +45,11 @@ "InstanceOf": "ShellExtension", "RolloutParametersPath": "Parameters\\PrometheusCollector.Linux.Parameters.json" }, + { + "Name": "PushLinuxCCPAgent", + "InstanceOf": "ShellExtension", + "RolloutParametersPath": "Parameters\\PrometheusCollector.LinuxCCP.Parameters.json" + }, { "Name": "PushWindowsAgent", "InstanceOf": "ShellExtension",