Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
4bb5031
change to hosted pool
jimson-msft Jun 24, 2021
792b8e7
typo
jimson-msft Jun 24, 2021
1862962
typo
jimson-msft Jun 24, 2021
cf66b06
add step for installing dependencies for now
jimson-msft Jun 24, 2021
cd83f6e
fix
jimson-msft Jun 24, 2021
4e76e6f
fix
jimson-msft Jun 24, 2021
1a3036f
fix
jimson-msft Jun 24, 2021
d9e63b8
test
jimson-msft Jun 24, 2021
36e6a7a
remove sudo
jimson-msft Jun 24, 2021
d12dc0f
fix
jimson-msft Jun 24, 2021
872e724
use python version
jimson-msft Jun 25, 2021
8f801de
fix
jimson-msft Jun 25, 2021
99804a3
remove unused steps
jimson-msft Jun 25, 2021
8879326
log into ACR
jimson-msft Jun 25, 2021
67178d4
use migrated container registry resource
jimson-msft Jun 25, 2021
77cc153
comment out some
jimson-msft Jun 25, 2021
862720d
fix
jimson-msft Jun 25, 2021
a768ace
fix
jimson-msft Jun 25, 2021
0ed11aa
cut down time on runs
jimson-msft Jun 25, 2021
8973f8f
test pull
jimson-msft Jun 25, 2021
1a22d3e
fix
jimson-msft Jun 25, 2021
baf46ee
fix
jimson-msft Jun 25, 2021
9635290
try azure cli command
jimson-msft Jun 25, 2021
27d17e8
test
jimson-msft Jun 26, 2021
a054412
fix
jimson-msft Jun 26, 2021
27be188
container
jimson-msft Jun 28, 2021
69d208d
Update doclient-lite-docker.yml for Azure Pipelines
jimson-msft Jun 28, 2021
87dda7e
m
jimson-msft Jun 28, 2021
c0fcd4f
Update doclient-lite-docker.yml for Azure Pipelines
jimson-msft Jun 28, 2021
fda34b1
Update doclient-lite-docker.yml for Azure Pipelines
jimson-msft Jun 28, 2021
a90d32f
Update doclient-lite-docker.yml for Azure Pipelines
jimson-msft Jun 28, 2021
0872fcc
Update doclient-lite-docker.yml for Azure Pipelines
jimson-msft Jun 28, 2021
de8423c
Update doclient-lite-docker.yml for Azure Pipelines
jimson-msft Jun 28, 2021
285ee9b
m
jimson-msft Jun 28, 2021
19e8543
r
jimson-msft Jun 28, 2021
be17712
Update doclient-lite-docker.yml for Azure Pipelines
jimson-msft Jun 28, 2021
3e06b74
Merge branch 'user/jimson/test_hosted_pool' of https://github.com/mic…
jimson-msft Jun 28, 2021
d85272d
mfix
jimson-msft Jun 28, 2021
e31baaa
go back to trying to pull the docker image
jimson-msft Jun 28, 2021
41161c3
f
jimson-msft Jun 28, 2021
542ed43
f
jimson-msft Jun 28, 2021
3c13c9d
f
jimson-msft Jun 28, 2021
787a45a
mfix
jimson-msft Jun 28, 2021
cb5326e
f
jimson-msft Jun 28, 2021
db0657e
try
jimson-msft Jun 28, 2021
d83c177
f
jimson-msft Jun 28, 2021
7fa9573
f
jimson-msft Jun 28, 2021
f33257b
f
jimson-msft Jun 28, 2021
c363f6a
add repository name
jimson-msft Jun 29, 2021
362915a
just try docker pull
jimson-msft Jun 29, 2021
ec4f42a
f
jimson-msft Jun 29, 2021
1784e15
M'
jimson-msft Jun 29, 2021
b8178fd
m'
jimson-msft Jun 29, 2021
2886112
just try docker pull
jimson-msft Jun 29, 2021
f6af03f
test
jimson-msft Jun 29, 2021
308bd56
fix
jimson-msft Jun 29, 2021
b1cff07
m
jimson-msft Jun 29, 2021
20699ae
register qemu
jimson-msft Jun 29, 2021
48fa282
m
jimson-msft Jun 29, 2021
b2714e3
dockerfiles use new script
jimson-msft Jun 30, 2021
7ddfb1c
test our bootstrap script on agent
jimson-msft Jun 30, 2021
d4afb15
needs the chmod
jimson-msft Jun 30, 2021
c9c09a8
f
jimson-msft Jun 30, 2021
29e2fd9
f
jimson-msft Jun 30, 2021
cdc2466
some fixes
jimson-msft Jun 30, 2021
2fca88f
fix all yaml files
jimson-msft Jun 30, 2021
aca6f42
fix
jimson-msft Jun 30, 2021
80338d9
fix
jimson-msft Jun 30, 2021
4e3b718
f
jimson-msft Jun 30, 2021
82d8484
fix
jimson-msft Jun 30, 2021
01c2cd3
targetosArch
jimson-msft Jun 30, 2021
d7087f1
fix
jimson-msft Jun 30, 2021
bc04872
f
jimson-msft Jun 30, 2021
5232513
f
jimson-msft Jun 30, 2021
1d34435
f
jimson-msft Jun 30, 2021
6719b64
f
jimson-msft Jun 30, 2021
7635979
f
jimson-msft Jun 30, 2021
6e5813b
fix bootstrap
jimson-msft Jun 30, 2021
1c483ac
f
jimson-msft Jun 30, 2021
5d74f7d
f
jimson-msft Jun 30, 2021
5d5e496
fix
jimson-msft Jun 30, 2021
6046e21
fix
jimson-msft Jun 30, 2021
5532975
f
jimson-msft Jun 30, 2021
4f03a0c
fix
jimson-msft Jun 30, 2021
78fa6c5
install docker
jimson-msft Jun 30, 2021
f31e0e9
pull
jimson-msft Jun 30, 2021
f6a3b8a
fix
jimson-msft Jun 30, 2021
a7b2f22
f
jimson-msft Jun 30, 2021
91e86a9
fix
jimson-msft Jun 30, 2021
6749ee2
fix docker bootstrapping
jimson-msft Jun 30, 2021
33b03e7
'test'
jimson-msft Jun 30, 2021
ff435a4
remove groupadd
jimson-msft Jun 30, 2021
4fea39b
use rootless install
jimson-msft Jun 30, 2021
d1ce642
f
jimson-msft Jun 30, 2021
2de5915
f
jimson-msft Jun 30, 2021
5cbf2d8
f
jimson-msft Jun 30, 2021
76971b4
f
jimson-msft Jun 30, 2021
1c32518
fix
jimson-msft Jun 30, 2021
8c055fa
f
jimson-msft Jun 30, 2021
a48af7b
f
jimson-msft Jun 30, 2021
a27357e
try with custom image
jimson-msft Jul 1, 2021
611d166
try with custom image
jimson-msft Jul 1, 2021
9702333
f
jimson-msft Jul 1, 2021
25e775c
try to lower running permissions of docker
jimson-msft Jul 1, 2021
3d589e2
f
jimson-msft Jul 1, 2021
aa2cb38
f
jimson-msft Jul 1, 2021
6719756
f
jimson-msft Jul 1, 2021
86585c2
f
jimson-msft Jul 1, 2021
97b3d31
try to lower running permissions of docker
jimson-msft Jul 1, 2021
c06e945
m
jimson-msft Jul 1, 2021
1ed7e46
f
jimson-msft Jul 1, 2021
34b9f4c
remove newgrp
jimson-msft Jul 1, 2021
dd0d685
f
jimson-msft Jul 1, 2021
89b302d
f
jimson-msft Jul 1, 2021
42be6a2
fix release pipeline
jimson-msft Jul 1, 2021
98d3a3c
remove the docker build stuff
jimson-msft Jul 1, 2021
b6a3396
fix paths
jimson-msft Jul 1, 2021
deeae3e
resolve merge conflicts
jimson-msft Jul 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions azure-pipelines/build/doclient-lite-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,28 @@ schedules:
include:
- main

pool: dotestlab
# TODO(jimson): Provision a 1ES managed image with artifacts that have all our dependencies preinstalled
#pool: 1es_hosted_pool_ubuntu_1804

# The microsoft-hosted agents come with docker preinstalled, the caveat being that the bootstrap script needs to be called to provision everything else
pool:
vmImage: 'ubuntu-18.04'

jobs:
- template: templates/do-docker-jobs.yml
parameters:
targetOS: 'debian10'
targetOS: 'debian9'
targetArch: 'arm32'
dockerImageName: 'jimsonmsft/debian10-arm32:latest'
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: templates/do-docker-jobs.yml
parameters:
targetOS: 'debian9'
targetOS: 'debian10'
targetArch: 'arm32'
dockerImageName: 'jimsonmsft/debian9-arm32:latest'
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: templates/do-docker-jobs.yml
parameters:
targetOS: 'ubuntu1804'
targetOS: 'ubuntu1804' # azure pipelines does not support '.' in display names
targetArch: 'arm64'
dockerImageName: 'jimsonmsft/ubuntu18.04-arm64:latest'
stepsTemplate: 'doclient-lite-docker-steps.yml'
6 changes: 5 additions & 1 deletion azure-pipelines/build/doclient-lite-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,24 @@ pr:
exclude:
- azure-pipelines/*

pool: dotestlab
# TODO(jimson): This is a base Ubuntu 1804 Image right now, switch to an image that contains all our dependencies preinstalled
# The advantage to using this over the Microsoft-hosted agent is parallel execution of jobs (infinite # of vms can be spun up at execution time)
pool: 1es_hosted_pool_ubuntu_1804

jobs:
- job: Debug
steps:
- template: templates/doclient-lite-native-steps.yml
parameters:
targetOS: 'ubuntu1804'
targetOsArch: 'ubuntu1804-x64'
config: debug

- job: Release
steps:
- template: templates/doclient-lite-native-steps.yml
parameters:
targetOS: 'ubuntu1804'
targetOsArch: 'ubuntu1804-x64'
config: minsizerel
skipTests: true
10 changes: 6 additions & 4 deletions azure-pipelines/build/dopapt-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,28 @@ schedules:
include:
- main

pool: dotestlab
# TODO(jimson): Provision a 1ES managed image with artifacts that have all our dependencies preinstalled
#pool: 1es_hosted_pool_ubuntu_1804

# The microsoft-hosted agents come with docker preinstalled, the caveat being that the bootstrap script needs to be called to provision everything else
pool:
vmImage: 'ubuntu-18.04'

jobs:
- template: templates/do-docker-jobs.yml
parameters:
targetOS: 'debian10'
targetArch: 'arm32'
dockerImageName: 'jimsonmsft/debian10-arm32:latest'
stepsTemplate: 'dopapt-docker-steps.yml'

- template: templates/do-docker-jobs.yml
parameters:
targetOS: 'debian9'
targetArch: 'arm32'
dockerImageName: 'jimsonmsft/debian9-arm32:latest'
stepsTemplate: 'dopapt-docker-steps.yml'

- template: templates/do-docker-jobs.yml
parameters:
targetOS: 'ubuntu1804'
targetArch: 'arm64'
dockerImageName: 'jimsonmsft/ubuntu18.04-arm64:latest'
stepsTemplate: 'dopapt-docker-steps.yml'
6 changes: 5 additions & 1 deletion azure-pipelines/build/dopapt-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,23 @@ pr:
- 'azure-pipelines/*'
- 'plugins/linux-apt/scripts/configure-apt-method.sh'

pool: dotestlab
# TODO(jimson): This is a base Ubuntu 1804 Image right now, switch to an image that contains all our dependencies preinstalled
# The advantage to using this over the Microsoft-hosted agent is parallel execution of jobs (infinite # of vms can be spun up at execution time)
pool: 1es_hosted_pool_ubuntu_1804

jobs:
- job: Debug
steps:
- template: templates/dopapt-native-steps.yml
parameters:
targetOs: 'ubuntu1804'
targetOsArch: 'ubuntu1804-x64'
config: debug

- job: Release
steps:
- template: templates/dopapt-native-steps.yml
parameters:
targetOs: 'ubuntu1804'
targetOsArch: 'ubuntu1804-x64'
config: minsizerel
10 changes: 6 additions & 4 deletions azure-pipelines/build/dosdkcpp-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,28 @@ schedules:
include:
- main

pool: dotestlab
# TODO(jimson): Provision a 1ES managed image with artifacts that have all our dependencies preinstalled
#pool: 1es_hosted_pool_ubuntu_1804

# The microsoft-hosted agents come with docker preinstalled, the caveat being that the bootstrap script needs to be called to provision everything else
pool:
vmImage: 'ubuntu-18.04'

jobs:
- template: templates/do-docker-jobs.yml
parameters:
targetOS: 'debian10'
targetArch: 'arm32'
dockerImageName: 'jimsonmsft/debian10-arm32:latest'
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: templates/do-docker-jobs.yml
parameters:
targetOS: 'debian9'
targetArch: 'arm32'
dockerImageName: 'jimsonmsft/debian9-arm32:latest'
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: templates/do-docker-jobs.yml
parameters:
targetOS: 'ubuntu1804'
targetArch: 'arm64'
dockerImageName: 'jimsonmsft/ubuntu18.04-arm64:latest'
stepsTemplate: 'dosdkcpp-docker-steps.yml'
6 changes: 5 additions & 1 deletion azure-pipelines/build/dosdkcpp-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,24 @@ pr:
- azure-pipelines/*
- sdk-cpp/build/cleanup-install.sh

pool: dotestlab
# TODO(jimson): This is a base Ubuntu 1804 Image right now, switch to an image that contains all our dependencies preinstalled
# The advantage to using this over the Microsoft-hosted agent is parallel execution of jobs (infinite # of vms can be spun up at execution time)
pool: 1es_hosted_pool_ubuntu_1804

jobs:
- job: Debug
steps:
- template: templates/dosdkcpp-native-steps.yml
parameters:
targetOS: 'ubuntu1804'
targetOsArch: 'ubuntu1804-x64'
config: debug

- job: Release
steps:
- template: templates/dosdkcpp-native-steps.yml
parameters:
targetOS: 'ubuntu1804'
targetOsArch: 'ubuntu1804-x64'
config: minsizerel
skipTests: true
6 changes: 2 additions & 4 deletions azure-pipelines/build/templates/do-docker-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ parameters:
type: string
- name: targetArch # example: arm32
type: string
- name: dockerImageName # example: jimsonmsft/debian10-arm32:latest
type: string
- name: stepsTemplate # example: dopapt-docker-steps.yml
type: string

Expand All @@ -16,14 +14,14 @@ jobs:
steps:
- template: ${{parameters.stepsTemplate}}
parameters:
targetOS: ${{parameters.targetOS}}
targetOsArch: ${{parameters.targetOS}}-${{parameters.targetArch}}
dockerImageName: ${{parameters.dockerImageName}}
config: debug

- job: ${{parameters.targetOS}}_${{parameters.targetArch}}_release
steps:
- template: ${{parameters.stepsTemplate}}
parameters:
targetOS: ${{parameters.targetOS}}
targetOsArch: ${{parameters.targetOS}}-${{parameters.targetArch}}
dockerImageName: ${{parameters.dockerImageName}}
config: minsizerel
34 changes: 31 additions & 3 deletions azure-pipelines/build/templates/doclient-lite-docker-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,46 @@
# Consume this steps template in one or more jobs by passing in parameter values.

parameters:
- name: targetOsArch # example: debian10-arm32
- name: targetOS # example: ubuntu1804
type: string
- name: dockerImageName # example: jimsonmsft/debian10-arm32:latest
- name: targetOsArch # example: ubuntu1804-x64
type: string
- name: config # debug/release/minsizerel/relwithdebuginfo
type: string

steps:
- task: Docker@2
displayName: Login to ACR
inputs:
command: login
containerRegistry: doclientcontainerregistry
repository: $(parameters.targetOsArch)

- task: Docker@2
displayName: Pull latest build image
inputs:
command: pull
containerRegistry: doclientcontainerregistry
arguments: 'doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:latest'

# TODO(jimson): Once these are onboarded as an artifact to Image Factory, can remove the below two steps as well as the targetOS parameter
# Another alternative is to just do the build from within a docker container, and then run the tests on the host
- task: CmdLine@2
inputs:
script: 'chmod +x bootstrap.sh'
workingDirectory: '$(Build.SourcesDirectory)/build'
displayName: 'chmod bootstrap script'

- task: CmdLine@2
inputs:
script: 'sudo ./bootstrap.sh --platform ${{parameters.targetOS}} --install qemu'
workingDirectory: '$(Build.SourcesDirectory)/build'
displayName: 'Install & register QEMU'

- task: CmdLine@2
inputs:
# Unix Makefiles used in place of Ninja due to issues with 32-bit compatability on cross-arch builds
script: 'sudo docker run --rm --entrypoint=python3 -v $(Build.SourcesDirectory):/code -v /tmp/build-deliveryoptimization-agent-${{parameters.targetOsArch}}:/tmp/build-deliveryoptimization-agent ${{parameters.dockerImageName}} "/code/build/build.py" "--clean" "--package-for" "DEB" "--generator" "Unix Makefiles" "--config" "${{parameters.config}}" "--project" "agent"'
script: 'sudo docker run --rm --entrypoint=python3 -v $(Build.SourcesDirectory):/code -v /tmp/build-deliveryoptimization-agent-${{parameters.targetOsArch}}:/tmp/build-deliveryoptimization-agent doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:latest "/code/build/build.py" "--clean" "--package-for" "DEB" "--config" "${{parameters.config}}" "--project" "agent"'
displayName: 'Build client-lite ${{parameters.targetOsArch}}-${{parameters.config}}'

- task: CopyFiles@2
Expand Down
28 changes: 22 additions & 6 deletions azure-pipelines/build/templates/doclient-lite-native-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
# Consume this steps template in one or more jobs by passing in parameter values.

parameters:
- name: targetOsArch # example: ubuntu18.04-x64
- name: targetOS # example: ubuntu1804
type: string
- name: targetOsArch # example: ubuntu1804-x64
type: string
- name: config # debug/release
type: string
Expand All @@ -11,12 +13,26 @@ parameters:
default: false

steps:
# TODO(shishirb) Include --skip-tests build.py option when skipTests is true
- task: PythonScript@0
# TODO(jimson): Once these are onboarded as an artifact to Image Factory, can remove the below two steps
# Another alternative is to just do the build from within a docker container, and then run the tests on the host
- task: CmdLine@2
inputs:
script: 'chmod +x bootstrap.sh'
workingDirectory: '$(Build.SourcesDirectory)/build'
displayName: 'chmod bootstrap script'

- task: CmdLine@2
inputs:
script: 'sudo ./bootstrap.sh --platform ${{parameters.targetOS}}'
workingDirectory: '$(Build.SourcesDirectory)/build'
displayName: 'Install Dependencies'

# Have to use cmdline rather than built in python task, because the python env variable chooses python2
# There is a pipeline task which allows you to specify version, but that requires configuring of the agent tools directory
- task: CmdLine@2
inputs:
scriptSource: 'filePath'
scriptPath: 'build/build.py'
arguments: '--project agent --config ${{parameters.config}} --package-for DEB --clean'
script: 'python3 ./build.py --project agent --config ${{parameters.config}} --package-for DEB --clean'
workingDirectory: '$(Build.SourcesDirectory)/build'
displayName: 'Build agent ${{parameters.targetOsArch}}-${{parameters.config}}'

- task: Bash@3
Expand Down
41 changes: 37 additions & 4 deletions azure-pipelines/build/templates/dopapt-docker-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,52 @@
# Consume this steps template in one or more jobs by passing in parameter values.

parameters:
- name: targetOsArch # example: debian10-arm32
- name: targetOS # example: ubuntu1804
type: string
- name: dockerImageName # example: jimsonmsft/debian10-arm32:latest
- name: targetOsArch # example: ubuntu1804-x64
type: string
- name: config # debug/release
- name: config # debug/release/minsizerel/relwithdebuginfo
type: string

steps:
- checkout: self

# TODO(jimson): Once these are onboarded as an artifact to Image Factory, can remove all dependency install steps
- task: CmdLine@2
inputs:
script: 'sudo docker run --rm --entrypoint=/bin/bash -v $(Build.SourcesDirectory):/code -v /tmp/build-deliveryoptimization-plugin-apt-${{parameters.targetOsArch}}:/tmp/build-deliveryoptimization-plugin-apt ${{parameters.dockerImageName}} "/code/build/docker/docker-build-plugin.sh" "/code" "${{parameters.config}}"'
script: 'chmod +x bootstrap.sh'
workingDirectory: '$(Build.SourcesDirectory)/build'
displayName: 'chmod bootstrap script'

- task: CmdLine@2
inputs:
script: 'sudo ./bootstrap.sh --platform ${{parameters.targetOS}} --install containertools'
workingDirectory: '$(Build.SourcesDirectory)/build'
displayName: 'Install Docker'

- task: Docker@2
displayName: Login to ACR
inputs:
command: login
containerRegistry: doclientcontainerregistry
repository: $(parameters.targetOsArch)

- task: Docker@2
displayName: Pull latest build image
inputs:
command: pull
containerRegistry: doclientcontainerregistry
arguments: 'doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:latest'

- task: CmdLine@2
inputs:
script: 'sudo ./bootstrap.sh --platform ${{parameters.targetOS}} --install qemu'
workingDirectory: '$(Build.SourcesDirectory)/build'
displayName: 'Install & register QEMU'

- task: CmdLine@2
inputs:
script: 'sudo docker run --rm --entrypoint=/bin/bash -v $(Build.SourcesDirectory):/code -v /tmp/build-deliveryoptimization-plugin-apt-${{parameters.targetOsArch}}:/tmp/build-deliveryoptimization-plugin-apt doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:latest "/code/build/docker/docker-build-plugin.sh" "/code" "${{parameters.config}}"'
displayName: 'Build deliveryoptimization-plugin-apt ${{parameters.targetOsArch}}-${{parameters.config}}'

- task: CopyFiles@2
Expand Down
Loading