From e30af9c6cf6b4232be9565dac59b02bab0d0d498 Mon Sep 17 00:00:00 2001 From: Jimmy Song Date: Tue, 13 Jul 2021 14:04:53 -0700 Subject: [PATCH 1/5] test the new image --- azure-pipelines/build/doclient-lite-native.yml | 2 +- .../build/templates/doclient-lite-native-steps.yml | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/azure-pipelines/build/doclient-lite-native.yml b/azure-pipelines/build/doclient-lite-native.yml index ab86af44..bf3cc496 100644 --- a/azure-pipelines/build/doclient-lite-native.yml +++ b/azure-pipelines/build/doclient-lite-native.yml @@ -37,7 +37,7 @@ pr: exclude: - azure-pipelines/* -# TODO(jimson): This is a base Ubuntu 1804 Image right now, switch to an image that contains all our dependencies preinstalled +# This is a 1ES managed image built ontop of ubuntu1804, with our provisioning script called at image provisioning time. # 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 diff --git a/azure-pipelines/build/templates/doclient-lite-native-steps.yml b/azure-pipelines/build/templates/doclient-lite-native-steps.yml index bead0f45..2aaa298b 100644 --- a/azure-pipelines/build/templates/doclient-lite-native-steps.yml +++ b/azure-pipelines/build/templates/doclient-lite-native-steps.yml @@ -13,20 +13,6 @@ parameters: default: false steps: -# 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 From 1aaaa2f4747ab94a9c388c45e7712a7a28979d7c Mon Sep 17 00:00:00 2001 From: Jimmy Song Date: Tue, 13 Jul 2021 14:07:51 -0700 Subject: [PATCH 2/5] test docker --- azure-pipelines/build/doclient-lite-docker.yml | 8 +++----- .../build/templates/doclient-lite-docker-steps.yml | 14 -------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/azure-pipelines/build/doclient-lite-docker.yml b/azure-pipelines/build/doclient-lite-docker.yml index 05865b49..07c263ac 100644 --- a/azure-pipelines/build/doclient-lite-docker.yml +++ b/azure-pipelines/build/doclient-lite-docker.yml @@ -14,12 +14,10 @@ schedules: include: - main -# TODO(jimson): Provision a 1ES managed image with artifacts that have all our dependencies preinstalled -#pool: 1es_hosted_pool_ubuntu_1804 +# This is a 1ES managed image built ontop of ubuntu1804, with our provisioning script called at image provisioning time. +# 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 -# 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 diff --git a/azure-pipelines/build/templates/doclient-lite-docker-steps.yml b/azure-pipelines/build/templates/doclient-lite-docker-steps.yml index 23c8e461..5af28097 100644 --- a/azure-pipelines/build/templates/doclient-lite-docker-steps.yml +++ b/azure-pipelines/build/templates/doclient-lite-docker-steps.yml @@ -24,20 +24,6 @@ steps: 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 pipeline run 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 From 6345f24bac2af8ce40b3cf7c9083627c8d768f23 Mon Sep 17 00:00:00 2001 From: Jimmy Song Date: Tue, 13 Jul 2021 14:20:59 -0700 Subject: [PATCH 3/5] use 1es hosted pool for all pipelines now --- .../build/doclient-lite-docker.yml | 1 - azure-pipelines/build/dopapt-docker.yml | 9 ++-- azure-pipelines/build/dopapt-native.yml | 2 +- azure-pipelines/build/dosdkcpp-docker.yml | 9 ++-- azure-pipelines/build/dosdkcpp-native.yml | 2 +- .../templates/doclient-lite-native-steps.yml | 10 ++-- .../build/templates/dopapt-docker-steps.yml | 14 ------ .../build/templates/dopapt-native-steps.yml | 47 ++++--------------- .../build/templates/dosdkcpp-docker-steps.yml | 14 ------ .../build/templates/dosdkcpp-native-steps.yml | 40 ++++++---------- 10 files changed, 35 insertions(+), 113 deletions(-) diff --git a/azure-pipelines/build/doclient-lite-docker.yml b/azure-pipelines/build/doclient-lite-docker.yml index 07c263ac..f3fda0b0 100644 --- a/azure-pipelines/build/doclient-lite-docker.yml +++ b/azure-pipelines/build/doclient-lite-docker.yml @@ -18,7 +18,6 @@ schedules: # 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: - template: templates/do-docker-jobs.yml parameters: diff --git a/azure-pipelines/build/dopapt-docker.yml b/azure-pipelines/build/dopapt-docker.yml index 356600fd..062b13c4 100644 --- a/azure-pipelines/build/dopapt-docker.yml +++ b/azure-pipelines/build/dopapt-docker.yml @@ -14,12 +14,9 @@ schedules: include: - main -# 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' +# This is a 1ES managed image built ontop of ubuntu1804, with our provisioning script called at image provisioning time. +# 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: - template: templates/do-docker-jobs.yml diff --git a/azure-pipelines/build/dopapt-native.yml b/azure-pipelines/build/dopapt-native.yml index 35dab9c0..5abf70e1 100644 --- a/azure-pipelines/build/dopapt-native.yml +++ b/azure-pipelines/build/dopapt-native.yml @@ -39,7 +39,7 @@ pr: - 'azure-pipelines/*' - 'plugins/linux-apt/scripts/configure-apt-method.sh' -# TODO(jimson): This is a base Ubuntu 1804 Image right now, switch to an image that contains all our dependencies preinstalled +# This is a 1ES managed image built ontop of ubuntu1804, with our provisioning script called at image provisioning time. # 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 diff --git a/azure-pipelines/build/dosdkcpp-docker.yml b/azure-pipelines/build/dosdkcpp-docker.yml index 9afdf691..d2e00f2e 100644 --- a/azure-pipelines/build/dosdkcpp-docker.yml +++ b/azure-pipelines/build/dosdkcpp-docker.yml @@ -14,12 +14,9 @@ schedules: include: - main -# 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' +# This is a 1ES managed image built ontop of ubuntu1804, with our provisioning script called at image provisioning time. +# 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: - template: templates/do-docker-jobs.yml diff --git a/azure-pipelines/build/dosdkcpp-native.yml b/azure-pipelines/build/dosdkcpp-native.yml index c1d7578b..f9eb5c29 100644 --- a/azure-pipelines/build/dosdkcpp-native.yml +++ b/azure-pipelines/build/dosdkcpp-native.yml @@ -40,7 +40,7 @@ pr: - azure-pipelines/* - sdk-cpp/build/cleanup-install.sh -# TODO(jimson): This is a base Ubuntu 1804 Image right now, switch to an image that contains all our dependencies preinstalled +# This is a 1ES managed image built ontop of ubuntu1804, with our provisioning script called at image provisioning time. # 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 diff --git a/azure-pipelines/build/templates/doclient-lite-native-steps.yml b/azure-pipelines/build/templates/doclient-lite-native-steps.yml index 2aaa298b..a1e7a176 100644 --- a/azure-pipelines/build/templates/doclient-lite-native-steps.yml +++ b/azure-pipelines/build/templates/doclient-lite-native-steps.yml @@ -13,12 +13,12 @@ parameters: default: false steps: -# 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 +# TODO(shishirb) Include --skip-tests build.py option when skipTests is true +- task: PythonScript@0 inputs: - script: 'python3 ./build.py --project agent --config ${{parameters.config}} --package-for DEB --clean' - workingDirectory: '$(Build.SourcesDirectory)/build' + scriptSource: 'filePath' + scriptPath: 'build/build.py' + arguments: '--project agent --config ${{parameters.config}} --package-for DEB --clean' displayName: 'Build agent ${{parameters.targetOsArch}}-${{parameters.config}}' - task: Bash@3 diff --git a/azure-pipelines/build/templates/dopapt-docker-steps.yml b/azure-pipelines/build/templates/dopapt-docker-steps.yml index 386d15d8..ed3fb239 100644 --- a/azure-pipelines/build/templates/dopapt-docker-steps.yml +++ b/azure-pipelines/build/templates/dopapt-docker-steps.yml @@ -26,20 +26,6 @@ steps: 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 pipeline run 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: 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}}"' diff --git a/azure-pipelines/build/templates/dopapt-native-steps.yml b/azure-pipelines/build/templates/dopapt-native-steps.yml index 23e2ab24..80d79a91 100644 --- a/azure-pipelines/build/templates/dopapt-native-steps.yml +++ b/azure-pipelines/build/templates/dopapt-native-steps.yml @@ -12,36 +12,13 @@ parameters: steps: - checkout: self -# 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 +- task: PythonScript@0 inputs: - script: 'python3 ./build.py --project sdk --config ${{parameters.config}} --package-for DEB --clean' - workingDirectory: '$(Build.SourcesDirectory)/build' + scriptSource: 'filePath' + scriptPath: 'build/build.py' + arguments: '--project sdk --cmaketarget deliveryoptimization --config ${{parameters.config}} --package-for DEB --clean ' displayName: 'Build sdk ${{parameters.targetOsArch}}-${{parameters.config}}' -#TODO(jimson): why did this have --cmaketarget flag? -#- task: PythonScript@0 -# inputs: -# scriptSource: 'filePath' -# scriptPath: 'build/build.py' -# arguments: '--project sdk --cmaketarget deliveryoptimization --config ${{parameters.config}} --package-for DEB --clean ' -# displayName: 'Build sdk ${{parameters.targetOsArch}}-${{parameters.config}}' - - task: Bash@3 inputs: targetType: 'inline' @@ -49,21 +26,13 @@ steps: workingDirectory: '/tmp/build-deliveryoptimization-sdk/linux-${{parameters.config}}' displayName: 'Install libdeliveryoptimization' -# 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 +- task: PythonScript@0 inputs: - script: 'python3 ./build.py --project plugin-apt --config ${{parameters.config}} --package-for DEB --clean' - workingDirectory: '$(Build.SourcesDirectory)/build' + scriptSource: 'filePath' + scriptPath: 'build/build.py' + arguments: '--project plugin-apt --config ${{parameters.config}} --package-for DEB --clean' displayName: 'Build deliveryoptimization-plugin-apt ${{parameters.targetOsArch}}-${{parameters.config}}' -#- task: PythonScript@0 -# inputs: -# scriptSource: 'filePath' -# scriptPath: 'build/build.py' -# arguments: '--project plugin-apt --config ${{parameters.config}} --package-for DEB --clean' -# displayName: 'Build deliveryoptimization-plugin-apt ${{parameters.targetOsArch}}-${{parameters.config}}' - - task: Bash@3 condition: eq('${{parameters.config}}', 'minsizerel') inputs: diff --git a/azure-pipelines/build/templates/dosdkcpp-docker-steps.yml b/azure-pipelines/build/templates/dosdkcpp-docker-steps.yml index c23288ee..ef76d674 100644 --- a/azure-pipelines/build/templates/dosdkcpp-docker-steps.yml +++ b/azure-pipelines/build/templates/dosdkcpp-docker-steps.yml @@ -24,20 +24,6 @@ steps: 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 pipeline run 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 diff --git a/azure-pipelines/build/templates/dosdkcpp-native-steps.yml b/azure-pipelines/build/templates/dosdkcpp-native-steps.yml index e2a3a644..98d22952 100644 --- a/azure-pipelines/build/templates/dosdkcpp-native-steps.yml +++ b/azure-pipelines/build/templates/dosdkcpp-native-steps.yml @@ -13,27 +13,13 @@ parameters: default: false steps: -# 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 # TODO(shishirb) Include --skip-tests build.py option when skipTests is true -- task: CmdLine@2 +- task: PythonScript@0 + condition: eq('${{parameters.skipTests}}', false) inputs: - script: 'python3 ./build.py --project agent --cmaketarget deliveryoptimization-agent --config ${{parameters.config}} --package-for DEB --clean' - workingDirectory: '$(Build.SourcesDirectory)/build' + scriptSource: 'filePath' + scriptPath: 'build/build.py' + arguments: '--project agent --cmaketarget deliveryoptimization-agent --config ${{parameters.config}} --package-for DEB --clean' displayName: 'Build agent ${{parameters.targetOsArch}}-${{parameters.config}}' - task: CmdLine@2 @@ -43,11 +29,12 @@ steps: workingDirectory: '/tmp/build-deliveryoptimization-agent/linux-${{parameters.config}}' displayName: 'Install agent Debian package' -- task: CmdLine@2 +- task: PythonScript@0 inputs: - script: 'python3 ./build.py --project sdk --cmaketarget deliveryoptimization --config ${{parameters.config}} --package-for DEB --clean' - workingDirectory: '$(Build.SourcesDirectory)/build' - displayName: 'Build sdk ${{parameters.targetOsArch}}-${{parameters.config}}' + scriptSource: 'filePath' + scriptPath: 'build/build.py' + arguments: '--project sdk --cmaketarget deliveryoptimization --config ${{parameters.config}} --package-for DEB --clean' + displayName: 'Build sdk-cpp ${{parameters.targetOsArch}}-${{parameters.config}}' - task: Bash@3 condition: eq('${{parameters.config}}', 'minsizerel') @@ -64,11 +51,12 @@ steps: workingDirectory: '/tmp/build-deliveryoptimization-sdk/linux-${{parameters.config}}' displayName: 'Install libdeliveryoptimization Debian Package' -- task: CmdLine@2 +- task: PythonScript@0 condition: eq('${{parameters.skipTests}}', false) inputs: - script: 'python3 ./build.py --project sdk --cmaketarget deliveryoptimization-sdk-tests --config ${{parameters.config}}' - workingDirectory: '$(Build.SourcesDirectory)/build' + scriptSource: 'filePath' + scriptPath: 'build/build.py' + arguments: '--project sdk --cmaketarget deliveryoptimization-sdk-tests --config ${{parameters.config}}' displayName: 'Build sdk-cpp tests ${{parameters.targetOsArch}}-${{parameters.config}}' # Run all tests. These must run as root because docs is running as the 'do' user From 70c9b472a8820ff8398bb62ea10c74088a9ab6b3 Mon Sep 17 00:00:00 2001 From: Jimmy Song Date: Tue, 13 Jul 2021 14:31:28 -0700 Subject: [PATCH 4/5] revert change to python script --- .../templates/doclient-lite-native-steps.yml | 10 +++---- .../build/templates/dopapt-native-steps.yml | 16 ++++++------ .../build/templates/dosdkcpp-native-steps.yml | 26 +++++++++---------- 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/azure-pipelines/build/templates/doclient-lite-native-steps.yml b/azure-pipelines/build/templates/doclient-lite-native-steps.yml index a1e7a176..2aaa298b 100644 --- a/azure-pipelines/build/templates/doclient-lite-native-steps.yml +++ b/azure-pipelines/build/templates/doclient-lite-native-steps.yml @@ -13,12 +13,12 @@ parameters: default: false steps: -# TODO(shishirb) Include --skip-tests build.py option when skipTests is true -- task: PythonScript@0 +# 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 diff --git a/azure-pipelines/build/templates/dopapt-native-steps.yml b/azure-pipelines/build/templates/dopapt-native-steps.yml index 80d79a91..0a0f30c5 100644 --- a/azure-pipelines/build/templates/dopapt-native-steps.yml +++ b/azure-pipelines/build/templates/dopapt-native-steps.yml @@ -12,11 +12,10 @@ parameters: steps: - checkout: self -- task: PythonScript@0 +- task: CmdLine@2 inputs: - scriptSource: 'filePath' - scriptPath: 'build/build.py' - arguments: '--project sdk --cmaketarget deliveryoptimization --config ${{parameters.config}} --package-for DEB --clean ' + script: 'python3 ./build.py --project sdk --cmaketarget deliveryoptimization --config ${{parameters.config}} --package-for DEB --clean' + workingDirectory: '$(Build.SourcesDirectory)/build' displayName: 'Build sdk ${{parameters.targetOsArch}}-${{parameters.config}}' - task: Bash@3 @@ -26,11 +25,12 @@ steps: workingDirectory: '/tmp/build-deliveryoptimization-sdk/linux-${{parameters.config}}' displayName: 'Install libdeliveryoptimization' -- task: PythonScript@0 +# 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 plugin-apt --config ${{parameters.config}} --package-for DEB --clean' + script: 'python3 ./build.py --project plugin-apt --config ${{parameters.config}} --package-for DEB --clean' + workingDirectory: '$(Build.SourcesDirectory)/build' displayName: 'Build deliveryoptimization-plugin-apt ${{parameters.targetOsArch}}-${{parameters.config}}' - task: Bash@3 diff --git a/azure-pipelines/build/templates/dosdkcpp-native-steps.yml b/azure-pipelines/build/templates/dosdkcpp-native-steps.yml index 98d22952..becac6b0 100644 --- a/azure-pipelines/build/templates/dosdkcpp-native-steps.yml +++ b/azure-pipelines/build/templates/dosdkcpp-native-steps.yml @@ -13,13 +13,13 @@ parameters: default: false steps: +# 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 # TODO(shishirb) Include --skip-tests build.py option when skipTests is true -- task: PythonScript@0 - condition: eq('${{parameters.skipTests}}', false) +- task: CmdLine@2 inputs: - scriptSource: 'filePath' - scriptPath: 'build/build.py' - arguments: '--project agent --cmaketarget deliveryoptimization-agent --config ${{parameters.config}} --package-for DEB --clean' + script: 'python3 ./build.py --project agent --cmaketarget deliveryoptimization-agent --config ${{parameters.config}} --package-for DEB --clean' + workingDirectory: '$(Build.SourcesDirectory)/build' displayName: 'Build agent ${{parameters.targetOsArch}}-${{parameters.config}}' - task: CmdLine@2 @@ -29,12 +29,11 @@ steps: workingDirectory: '/tmp/build-deliveryoptimization-agent/linux-${{parameters.config}}' displayName: 'Install agent Debian package' -- task: PythonScript@0 +- task: CmdLine@2 inputs: - scriptSource: 'filePath' - scriptPath: 'build/build.py' - arguments: '--project sdk --cmaketarget deliveryoptimization --config ${{parameters.config}} --package-for DEB --clean' - displayName: 'Build sdk-cpp ${{parameters.targetOsArch}}-${{parameters.config}}' + script: 'python3 ./build.py --project sdk --cmaketarget deliveryoptimization --config ${{parameters.config}} --package-for DEB --clean' + workingDirectory: '$(Build.SourcesDirectory)/build' + displayName: 'Build sdk ${{parameters.targetOsArch}}-${{parameters.config}}' - task: Bash@3 condition: eq('${{parameters.config}}', 'minsizerel') @@ -51,12 +50,11 @@ steps: workingDirectory: '/tmp/build-deliveryoptimization-sdk/linux-${{parameters.config}}' displayName: 'Install libdeliveryoptimization Debian Package' -- task: PythonScript@0 +- task: CmdLine@2 condition: eq('${{parameters.skipTests}}', false) inputs: - scriptSource: 'filePath' - scriptPath: 'build/build.py' - arguments: '--project sdk --cmaketarget deliveryoptimization-sdk-tests --config ${{parameters.config}}' + script: 'python3 ./build.py --project sdk --cmaketarget deliveryoptimization-sdk-tests --config ${{parameters.config}}' + workingDirectory: '$(Build.SourcesDirectory)/build' displayName: 'Build sdk-cpp tests ${{parameters.targetOsArch}}-${{parameters.config}}' # Run all tests. These must run as root because docs is running as the 'do' user From 3d35aa528ec0448f0c8d7095ad79ebd5bf602f33 Mon Sep 17 00:00:00 2001 From: Jimmy Song Date: Tue, 13 Jul 2021 14:42:08 -0700 Subject: [PATCH 5/5] remove comment --- azure-pipelines/build/doclient-lite-docker.yml | 2 -- azure-pipelines/build/doclient-lite-native.yml | 2 -- azure-pipelines/build/dopapt-docker.yml | 2 -- azure-pipelines/build/dopapt-native.yml | 2 -- azure-pipelines/build/dosdkcpp-docker.yml | 2 -- azure-pipelines/build/dosdkcpp-native.yml | 2 -- 6 files changed, 12 deletions(-) diff --git a/azure-pipelines/build/doclient-lite-docker.yml b/azure-pipelines/build/doclient-lite-docker.yml index f3fda0b0..644cf4e4 100644 --- a/azure-pipelines/build/doclient-lite-docker.yml +++ b/azure-pipelines/build/doclient-lite-docker.yml @@ -14,8 +14,6 @@ schedules: include: - main -# This is a 1ES managed image built ontop of ubuntu1804, with our provisioning script called at image provisioning time. -# 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: diff --git a/azure-pipelines/build/doclient-lite-native.yml b/azure-pipelines/build/doclient-lite-native.yml index bf3cc496..2ada798d 100644 --- a/azure-pipelines/build/doclient-lite-native.yml +++ b/azure-pipelines/build/doclient-lite-native.yml @@ -37,8 +37,6 @@ pr: exclude: - azure-pipelines/* -# This is a 1ES managed image built ontop of ubuntu1804, with our provisioning script called at image provisioning time. -# 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: diff --git a/azure-pipelines/build/dopapt-docker.yml b/azure-pipelines/build/dopapt-docker.yml index 062b13c4..e3719195 100644 --- a/azure-pipelines/build/dopapt-docker.yml +++ b/azure-pipelines/build/dopapt-docker.yml @@ -14,8 +14,6 @@ schedules: include: - main -# This is a 1ES managed image built ontop of ubuntu1804, with our provisioning script called at image provisioning time. -# 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: diff --git a/azure-pipelines/build/dopapt-native.yml b/azure-pipelines/build/dopapt-native.yml index 5abf70e1..f4c1322c 100644 --- a/azure-pipelines/build/dopapt-native.yml +++ b/azure-pipelines/build/dopapt-native.yml @@ -39,8 +39,6 @@ pr: - 'azure-pipelines/*' - 'plugins/linux-apt/scripts/configure-apt-method.sh' -# This is a 1ES managed image built ontop of ubuntu1804, with our provisioning script called at image provisioning time. -# 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: diff --git a/azure-pipelines/build/dosdkcpp-docker.yml b/azure-pipelines/build/dosdkcpp-docker.yml index d2e00f2e..2ab06b50 100644 --- a/azure-pipelines/build/dosdkcpp-docker.yml +++ b/azure-pipelines/build/dosdkcpp-docker.yml @@ -14,8 +14,6 @@ schedules: include: - main -# This is a 1ES managed image built ontop of ubuntu1804, with our provisioning script called at image provisioning time. -# 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: diff --git a/azure-pipelines/build/dosdkcpp-native.yml b/azure-pipelines/build/dosdkcpp-native.yml index f9eb5c29..b38df86f 100644 --- a/azure-pipelines/build/dosdkcpp-native.yml +++ b/azure-pipelines/build/dosdkcpp-native.yml @@ -40,8 +40,6 @@ pr: - azure-pipelines/* - sdk-cpp/build/cleanup-install.sh -# This is a 1ES managed image built ontop of ubuntu1804, with our provisioning script called at image provisioning time. -# 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: