-
Notifications
You must be signed in to change notification settings - Fork 115
build multi-arch images #704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
91 commits
Select commit
Hold shift + click to select a range
d398b08
build multi-arch images
3f147aa
add test pipeline yaml
dd18771
use 1es pool
57c2d67
try to build
afd8a3e
test push
696a25e
login to acr
a5f3d8d
add script type
e637545
try pushing to ame acr
4008694
fix variables
368bcb2
fix tag
c1e40f9
fix tag 2
9973279
change pipelines
27e7340
remove extra file
1c91492
missing changes
c79382a
save metadata
565b00b
update pipelines
8384005
revert official mdsd arm64 build
4f22ef6
add build_arg image_tag
b6d3a8b
use new arm64 version
2200280
update arm build
eb31afd
update amd build
e823679
update arm build
fb05171
use new amd64 master build for mdsd
2d5bf72
update golang to 1.15 in dockerfile
a06ec6c
use releases url
f0a6564
build multi-arch images
808ea62
add test pipeline yaml
ef5c766
use 1es pool
087f738
try to build
6966482
test push
2fe0998
login to acr
129ac87
add script type
50687a9
try pushing to ame acr
e54222d
fix variables
1ceddab
fix tag
e9269c4
fix tag 2
4598d87
change pipelines
26128fa
remove extra file
a0e8fa9
missing changes
a741a46
save metadata
d35d5c4
update pipelines
27000a6
revert official mdsd arm64 build
43fb6a5
add build_arg image_tag
b3aee21
use new arm64 version
ffee912
update arm build
8bf832a
update amd build
4449bda
update arm build
4c0bd4c
use new amd64 master build for mdsd
21604ad
update golang to 1.15 in dockerfile
748dcf7
use releases url
614d90c
build multi-arch images
a1d870a
add test pipeline yaml
6429422
use 1es pool
a3c758e
try to build
3a9c1b3
test push
9c115c0
login to acr
73692e3
add script type
4d35ddb
try pushing to ame acr
28517c0
fix variables
4d4d3c1
fix tag
abfee42
fix tag 2
98abd5d
change pipelines
606523e
remove extra file
3747974
missing changes
ab986f1
save metadata
e866fdc
update pipelines
6378122
revert official mdsd arm64 build
880becb
add build_arg image_tag
3d64a2b
use new arm64 version
82d7e52
update arm build
c585b60
update amd build
433be78
update arm build
0e635ac
use new amd64 master build for mdsd
39abea7
update golang to 1.15 in dockerfile
ce9d404
use releases url
2c29e1c
files for ev2 release
5bad5d8
change copy file paths
e78f71b
change prod repo name
4d28ee2
capture artifacts.tar.gz
804e651
avoid unnecessary alerts while testing
bffc30d
update tag
2c6053f
use mdsd arm64 master build
c469eba
Merge branch 'user/amagraw/test-arm64' of github.com:microsoft/Docker…
61869b6
Merge branch 'user/amagraw/test-arm64-release' into user/amagraw/test…
f12ffe0
address PR comments
96a6386
copy additional files
5d3f7a2
remove sources folder
6e7cfd4
update globs
97a4661
use multiple copy tasks
cb8445f
fix typo
e8bd368
Merge branch 'ci_dev' into user/amagraw/test-arm64
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| # Starter pipeline | ||
| # Start with a minimal pipeline that you can customize to build and deploy your code. | ||
| # Add steps that build, run tests, deploy, and more: | ||
| # https://aka.ms/yaml | ||
|
|
||
| trigger: | ||
| - ci_dev | ||
|
|
||
| pool: | ||
| name: Azure-Pipelines-CI-Test-EO | ||
|
|
||
| variables: | ||
| armServiceConnectionName: 'ci-1es-acr-connection' | ||
| subscription: '9b96ebbd-c57a-42d1-bbe9-b69296e4c7fb' | ||
| containerRegistry: 'containerinsightsprod' | ||
| repoImageName: '${{ variables.containerRegistry }}.azurecr.io/public/azuremonitor/containerinsights/cidev' | ||
|
|
||
| steps: | ||
| - bash: | | ||
| commit=$(git rev-parse --short HEAD) | ||
| echo "##vso[task.setvariable variable=commit;]$commit" | ||
|
|
||
| datetime=$(date +'%Y%m%d%s') | ||
| echo "##vso[task.setvariable variable=datetime;]$datetime" | ||
|
|
||
| cd deployment/multiarch-agent-deployment/ServiceGroupRoot/Scripts | ||
| tar -czvf ../artifacts.tar.gz pushAgentToAcr.sh | ||
|
|
||
| - task: CopyFiles@2 | ||
| displayName: "Copy ev2 deployment artifacts" | ||
| inputs: | ||
| SourceFolder: "$(Build.SourcesDirectory)/deployment" | ||
| Contents: | | ||
| **/* | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/build' | ||
|
|
||
| - task: CopyFiles@2 | ||
| displayName: "Copy ev2 deployment scripts" | ||
pfrcks marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| inputs: | ||
| SourceFolder: "$(Build.SourcesDirectory)/.pipelines" | ||
| Contents: | | ||
| *.sh | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/build' | ||
|
|
||
| - task: CopyFiles@2 | ||
| displayName: "Copy ev2 deployment scripts" | ||
| inputs: | ||
| SourceFolder: "$(Build.SourcesDirectory)/kubernetes" | ||
| Contents: | | ||
| *.yaml | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/build' | ||
|
|
||
| - task: CopyFiles@2 | ||
| displayName: "Copy ev2 deployment scripts" | ||
| inputs: | ||
| SourceFolder: "$(Build.SourcesDirectory)/charts" | ||
| Contents: | | ||
| **/* | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/build' | ||
|
|
||
| - task: CopyFiles@2 | ||
| displayName: "Copy ev2 deployment scripts" | ||
| inputs: | ||
| SourceFolder: "$(Build.SourcesDirectory)/test/e2e" | ||
| Contents: | | ||
| *.yaml | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/build' | ||
|
|
||
| - task: AzureCLI@2 | ||
| inputs: | ||
| azureSubscription: ${{ variables.armServiceConnectionName }} | ||
| scriptType: bash | ||
| scriptLocation: inlineScript | ||
| inlineScript: | | ||
|
|
||
| sudo apt-get update && sudo apt-get -y install qemu binfmt-support qemu-user-static | ||
| docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | ||
|
|
||
| docker buildx create --name testbuilder | ||
| docker buildx use testbuilder | ||
|
|
||
| az --version | ||
| az account show | ||
| az account set -s ${{ variables.subscription }} | ||
| az acr login -n ${{ variables.containerRegistry }} | ||
|
|
||
| docker buildx build --platform linux/amd64,linux/arm64 --tag ${{ variables.repoImageName }}:$(datetime)-$(commit) -f kubernetes/linux/Dockerfile.multiarch --metadata-file $(Build.ArtifactStagingDirectory)/metadata.json --build-arg IMAGE_TAG=$(datetime)-$(commit) --push . | ||
|
|
||
| docker pull ${{ variables.repoImageName }}:$(datetime)-$(commit) | ||
|
|
||
| - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 | ||
| displayName: 'Generation Task' | ||
| inputs: | ||
| BuildDropPath: '$(Build.ArtifactStagingDirectory)' | ||
| DockerImagesToScan: 'golang:1.14, ubuntu:18.04, ${{ variables.repoImageName }}:$(datetime)-$(commit)' | ||
|
|
||
| - task: PublishBuildArtifacts@1 | ||
| inputs: | ||
| pathToPublish: '$(Build.ArtifactStagingDirectory)' | ||
| artifactName: drop | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| # Starter pipeline | ||
| # Start with a minimal pipeline that you can customize to build and deploy your code. | ||
| # Add steps that build, run tests, deploy, and more: | ||
| # https://aka.ms/yaml | ||
|
|
||
| trigger: | ||
| - ci_prod | ||
|
|
||
| pool: | ||
| name: Azure-Pipelines-CI-Prod-EO | ||
|
|
||
| variables: | ||
| armServiceConnectionName: 'ci-1es-acr-connection-prod' | ||
| subscription: '30c56c3a-54da-46ea-b004-06eb33432687' | ||
| containerRegistry: 'containerinsightsbuild' | ||
| repoImageName: '${{ variables.containerRegistry }}.azurecr.io/official/linux' | ||
|
|
||
| steps: | ||
| - bash: | | ||
| commit=$(git rev-parse --short HEAD) | ||
| echo "##vso[task.setvariable variable=commit;]$commit" | ||
|
|
||
| datetime=$(date +'%Y%m%d%s') | ||
| echo "##vso[task.setvariable variable=datetime;]$datetime" | ||
|
|
||
| cd deployment/multiarch-agent-deployment/ServiceGroupRoot/Scripts | ||
| tar -czvf ../artifacts.tar.gz pushAgentToAcr.sh | ||
|
|
||
| - task: CopyFiles@2 | ||
| displayName: "Copy ev2 deployment artifacts" | ||
| inputs: | ||
| SourceFolder: "$(Build.SourcesDirectory)/deployment" | ||
| Contents: | | ||
| **/* | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/build' | ||
|
|
||
| - task: CopyFiles@2 | ||
| displayName: "Copy ev2 deployment scripts" | ||
| inputs: | ||
| SourceFolder: "$(Build.SourcesDirectory)/.pipelines" | ||
| Contents: | | ||
| **/*.sh | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/build' | ||
|
|
||
| - task: CopyFiles@2 | ||
| displayName: "Copy ev2 deployment scripts" | ||
| inputs: | ||
| SourceFolder: "$(Build.SourcesDirectory)/kubernetes" | ||
| Contents: | | ||
| *.yaml | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/build' | ||
|
|
||
| - task: CopyFiles@2 | ||
| displayName: "Copy ev2 deployment scripts" | ||
| inputs: | ||
| SourceFolder: "$(Build.SourcesDirectory)/charts" | ||
| Contents: | | ||
| **/* | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/build' | ||
|
|
||
| - task: CopyFiles@2 | ||
| displayName: "Copy ev2 deployment scripts" | ||
| inputs: | ||
| SourceFolder: "$(Build.SourcesDirectory)/test/e2e" | ||
| Contents: | | ||
| *.yaml | ||
| TargetFolder: '$(Build.ArtifactStagingDirectory)/build' | ||
|
|
||
| - task: AzureCLI@2 | ||
| inputs: | ||
| azureSubscription: ${{ variables.armServiceConnectionName }} | ||
| scriptType: bash | ||
| scriptLocation: inlineScript | ||
| inlineScript: | | ||
|
|
||
| sudo apt-get update && sudo apt-get -y install qemu binfmt-support qemu-user-static | ||
| docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | ||
|
|
||
| docker buildx create --name testbuilder | ||
| docker buildx use testbuilder | ||
|
|
||
| az --version | ||
| az account show | ||
| az account set -s ${{ variables.subscription }} | ||
| az acr login -n ${{ variables.containerRegistry }} | ||
|
|
||
| docker buildx build --platform linux/amd64,linux/arm64 --tag ${{ variables.repoImageName }}:ciprod-$(datetime)-$(commit) -f kubernetes/linux/Dockerfile.multiarch --metadata-file $(Build.ArtifactStagingDirectory)/metadata.json --build-arg IMAGE_TAG=ciprod-$(datetime)-$(commit) --push . | ||
|
|
||
| docker pull ${{ variables.repoImageName }}:ciprod-$(datetime)-$(commit) | ||
|
|
||
| - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 | ||
| displayName: 'Generation Task' | ||
| inputs: | ||
| BuildDropPath: '$(Build.ArtifactStagingDirectory)' | ||
| DockerImagesToScan: 'golang:1.14, ubuntu:18.04, ${{ variables.repoImageName }}:ciprod-$(datetime)-$(commit)' | ||
|
|
||
| - task: PublishBuildArtifacts@1 | ||
| inputs: | ||
| pathToPublish: '$(Build.ArtifactStagingDirectory)' | ||
| artifactName: drop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...arch-agent-deployment/ServiceGroupRoot/Parameters/ContainerInsights.Linux.Parameters.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| { | ||
| "$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_NAME", | ||
| "value": "__ACR_NAME__" | ||
| }, | ||
| { | ||
| "name": "AGENT_RELEASE", | ||
| "value": "__AGENT_RELEASE__" | ||
| }, | ||
| { | ||
| "name": "AGENT_IMAGE_TAG_SUFFIX", | ||
| "value": "__AGENT_IMAGE_TAG_SUFFIX__" | ||
| }, | ||
| { | ||
| "name": "AGENT_IMAGE_FULL_PATH", | ||
| "value": "public/azuremonitor/containerinsights/__AGENT_RELEASE__:__AGENT_RELEASE____AGENT_IMAGE_TAG_SUFFIX__" | ||
| }, | ||
| { | ||
| "name": "CDPX_REGISTRY", | ||
| "value": "__CDPX_LINUX_REGISTRY__" | ||
| }, | ||
| { | ||
| "name": "CDPX_REPO_NAME", | ||
| "value": "__CDPX_LINUX_REPO_NAME__" | ||
| }, | ||
| { | ||
| "name": "CDPX_TAG", | ||
| "value": "__CDPX_LINUX_TAG__" | ||
| } | ||
| ], | ||
| "identity": { | ||
| "type": "userAssigned", | ||
| "userAssignedIdentities": [ | ||
| "__MANAGED_IDENTITY__" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } |
29 changes: 29 additions & 0 deletions
29
deployment/multiarch-agent-deployment/ServiceGroupRoot/RolloutSpecs/RolloutSpecs.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| { | ||
| "$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": "omscontainers@microsoft.com" | ||
| } | ||
| } | ||
| }, | ||
| "OrchestratedSteps": [ | ||
| { | ||
| "name": "PushLinuxAgent", | ||
| "targetType": "ServiceResource", | ||
| "targetName": "PushLinuxAgent", | ||
| "actions": [ "Shell/PushAgentToACR" ], | ||
| "dependsOn": [ ] | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.