diff --git a/azure-pipelines/build/linux/du/docker/doclient-lite-docker.yml b/azure-pipelines/build/linux/du/docker/doclient-lite-docker.yml index 38db4f67..cc2ce0db 100644 --- a/azure-pipelines/build/linux/du/docker/doclient-lite-docker.yml +++ b/azure-pipelines/build/linux/du/docker/doclient-lite-docker.yml @@ -33,13 +33,31 @@ jobs: - template: ../templates/do-docker-jobs.yml parameters: - targetOsArch: 'debian10_arm64' + targetOsArch: 'debian10_arm64' # azure pipelines does not support '.' in display names imageVersion: ${{variables.containerImageVersion}} stepsTemplate: 'doclient-lite-docker-steps.yml' - template: ../templates/do-docker-jobs.yml parameters: - targetOsArch: 'debian10_x64' + targetOsArch: 'debian10_x64' # azure pipelines does not support '.' in display names + imageVersion: ${{variables.containerImageVersion}} + stepsTemplate: 'doclient-lite-docker-steps.yml' + +- template: ../templates/do-docker-jobs.yml + parameters: + targetOsArch: 'debian11_arm32' # azure pipelines does not support '.' in display names + imageVersion: ${{variables.containerImageVersion}} + stepsTemplate: 'doclient-lite-docker-steps.yml' + +- template: ../templates/do-docker-jobs.yml + parameters: + targetOsArch: 'debian11_arm64' # azure pipelines does not support '.' in display names + imageVersion: ${{variables.containerImageVersion}} + stepsTemplate: 'doclient-lite-docker-steps.yml' + +- template: ../templates/do-docker-jobs.yml + parameters: + targetOsArch: 'debian11_x64' # azure pipelines does not support '.' in display names imageVersion: ${{variables.containerImageVersion}} stepsTemplate: 'doclient-lite-docker-steps.yml' diff --git a/azure-pipelines/build/linux/du/docker/dopapt-docker.yml b/azure-pipelines/build/linux/du/docker/dopapt-docker.yml index 10be67e9..f48bbf05 100644 --- a/azure-pipelines/build/linux/du/docker/dopapt-docker.yml +++ b/azure-pipelines/build/linux/du/docker/dopapt-docker.yml @@ -43,6 +43,24 @@ jobs: imageVersion: ${{variables.containerImageVersion}} stepsTemplate: 'dopapt-docker-steps.yml' +- template: ../templates/do-docker-jobs.yml + parameters: + targetOsArch: 'debian11_arm32' + imageVersion: ${{variables.containerImageVersion}} + stepsTemplate: 'dopapt-docker-steps.yml' + +- template: ../templates/do-docker-jobs.yml + parameters: + targetOsArch: 'debian11_arm64' + imageVersion: ${{variables.containerImageVersion}} + stepsTemplate: 'dopapt-docker-steps.yml' + +- template: ../templates/do-docker-jobs.yml + parameters: + targetOsArch: 'debian11_x64' + imageVersion: ${{variables.containerImageVersion}} + stepsTemplate: 'dopapt-docker-steps.yml' + - template: ../templates/do-docker-jobs.yml parameters: targetOsArch: 'ubuntu1804_arm64' diff --git a/azure-pipelines/build/linux/du/docker/dosdkcpp-docker.yml b/azure-pipelines/build/linux/du/docker/dosdkcpp-docker.yml index a8a2d44b..12e51b25 100644 --- a/azure-pipelines/build/linux/du/docker/dosdkcpp-docker.yml +++ b/azure-pipelines/build/linux/du/docker/dosdkcpp-docker.yml @@ -43,6 +43,24 @@ jobs: imageVersion: ${{variables.containerImageVersion}} stepsTemplate: 'dosdkcpp-docker-steps.yml' +- template: ../templates/do-docker-jobs.yml + parameters: + targetOsArch: 'debian11_arm32' + imageVersion: ${{variables.containerImageVersion}} + stepsTemplate: 'dosdkcpp-docker-steps.yml' + +- template: ../templates/do-docker-jobs.yml + parameters: + targetOsArch: 'debian11_arm64' + imageVersion: ${{variables.containerImageVersion}} + stepsTemplate: 'dosdkcpp-docker-steps.yml' + +- template: ../templates/do-docker-jobs.yml + parameters: + targetOsArch: 'debian11_x64' + imageVersion: ${{variables.containerImageVersion}} + stepsTemplate: 'dosdkcpp-docker-steps.yml' + - template: ../templates/do-docker-jobs.yml parameters: targetOsArch: 'ubuntu1804_arm64' diff --git a/azure-pipelines/build/linux/du/templates/doclient-lite-docker-steps.yml b/azure-pipelines/build/linux/du/templates/doclient-lite-docker-steps.yml index f03bf8c1..dac13467 100644 --- a/azure-pipelines/build/linux/du/templates/doclient-lite-docker-steps.yml +++ b/azure-pipelines/build/linux/du/templates/doclient-lite-docker-steps.yml @@ -14,14 +14,14 @@ steps: displayName: Login to ACR inputs: command: login - containerRegistry: doclientcontainerregistry + containerRegistry: doclient-dockercontainerregistry-buildpipeline # name of the service connection that connect the pipeline to the ACR repository: $(parameters.targetOsArch) - task: Docker@2 displayName: Pull latest build image inputs: command: pull - containerRegistry: doclientcontainerregistry + containerRegistry: doclient-dockercontainerregistry-buildpipeline # name of the service connection that connect the pipeline to the ACR arguments: 'doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:${{parameters.imageVersion}}' - task: CmdLine@2 diff --git a/azure-pipelines/build/linux/du/templates/dopapt-docker-steps.yml b/azure-pipelines/build/linux/du/templates/dopapt-docker-steps.yml index be74d4a3..6be79d12 100644 --- a/azure-pipelines/build/linux/du/templates/dopapt-docker-steps.yml +++ b/azure-pipelines/build/linux/du/templates/dopapt-docker-steps.yml @@ -14,14 +14,14 @@ steps: displayName: Login to ACR inputs: command: login - containerRegistry: doclientcontainerregistry + containerRegistry: doclient-dockercontainerregistry-buildpipeline # name of the service connection that connect the pipeline to the ACR repository: $(parameters.targetOsArch) - task: Docker@2 displayName: Pull latest build image inputs: command: pull - containerRegistry: doclientcontainerregistry + containerRegistry: doclient-dockercontainerregistry-buildpipeline # name of the service connection that connect the pipeline to the ACR arguments: 'doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:${{parameters.imageVersion}}' - task: CmdLine@2 diff --git a/azure-pipelines/build/linux/du/templates/dosdkcpp-docker-steps.yml b/azure-pipelines/build/linux/du/templates/dosdkcpp-docker-steps.yml index 80f4f309..583e426f 100644 --- a/azure-pipelines/build/linux/du/templates/dosdkcpp-docker-steps.yml +++ b/azure-pipelines/build/linux/du/templates/dosdkcpp-docker-steps.yml @@ -14,14 +14,14 @@ steps: displayName: Login to ACR inputs: command: login - containerRegistry: doclientcontainerregistry + containerRegistry: doclient-dockercontainerregistry-buildpipeline # name of the service connection that connect the pipeline to the ACR repository: $(parameters.targetOsArch) - task: Docker@2 displayName: Pull latest build image inputs: command: pull - containerRegistry: doclientcontainerregistry + containerRegistry: doclient-dockercontainerregistry-buildpipeline # name of the service connection that connect the pipeline to the ACR arguments: 'doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:${{parameters.imageVersion}}' - task: CmdLine@2 diff --git a/azure-pipelines/publishing/github-release.yml b/azure-pipelines/publishing/github-release.yml index d065e4eb..65872e5a 100644 --- a/azure-pipelines/publishing/github-release.yml +++ b/azure-pipelines/publishing/github-release.yml @@ -80,6 +80,18 @@ stages: parameters: targetOsArch: 'debian10_x64' imageVersion: ${{variables.containerImageVersion}} + - template: templates/release-docker-build-steps.yml + parameters: + targetOsArch: 'debian11_arm32' + imageVersion: ${{variables.containerImageVersion}} + - template: templates/release-docker-build-steps.yml + parameters: + targetOsArch: 'debian11_arm64' + imageVersion: ${{variables.containerImageVersion}} + - template: templates/release-docker-build-steps.yml + parameters: + targetOsArch: 'debian11_x64' + imageVersion: ${{variables.containerImageVersion}} - stage: release condition: succeeded() diff --git a/build/docker/debian11/amd64/Dockerfile b/build/docker/debian11/amd64/Dockerfile new file mode 100644 index 00000000..b00d97f0 --- /dev/null +++ b/build/docker/debian11/amd64/Dockerfile @@ -0,0 +1,39 @@ +# Dockerfile for building DO client components for Debian 11 amd64 +# First, install the docker extension for VSCode. Then you can right-click on this file +# and choose Build Image. Give it a name and it will build the image. +# +# Alternatively, use the command line: +# Copy the build script to the build directory: +# cp /build/scripts/bootstrap.sh /build/docker/debian11/amd64 +# +# After running the above, you can build the image by running in the current dockerfile directory: +# sudo docker build -t debian11_amd64 . --no-cache --network=host +# +# Open interactive terminal into the image in a container: +# docker run -ti --rm --entrypoint=/bin/bash -v :/code -v :/build +# Example: +# sudo docker run -ti --rm --entrypoint=/bin/bash -v ~/code/do-client/:/code debian11_amd64 + +FROM mcr.microsoft.com/mirror/docker/library/debian:buster@sha256:3b6053ca925336c804e2d3f080af177efcdc9f51198a627569bfc7c7e730ef7e + +SHELL [ "/bin/bash", "-c"] + +COPY bootstrap.sh /tmp/bootstrap.sh + +WORKDIR /tmp/ + +RUN chmod +x bootstrap.sh +RUN ./bootstrap.sh --install build + + +VOLUME /code +WORKDIR /code + +ENTRYPOINT [ "/bin/bash", "-c" ] + +# We specify an empty command so that we can pass options to the ENTRYPOINT command. +# This is a bit of a Dockerfile quirk where if the ENTRYPOINT value is defined, +# then CMD becomes the default options passed to ENTRYPOINT. +# In this case we don't have any desired default arguments. +# However, we have to specify CMD to enable passing of command line parameters to ENTRYPOINT in the first place. +CMD [ ] diff --git a/build/docker/debian11/arm32/Dockerfile b/build/docker/debian11/arm32/Dockerfile new file mode 100644 index 00000000..2772a437 --- /dev/null +++ b/build/docker/debian11/arm32/Dockerfile @@ -0,0 +1,45 @@ +# Dockerfile for building DO client components for Debian 11 arm32 +# First, install the docker extension for VSCode. Then you can right-click on this file +# and choose Build Image. Give it a name and it will build the image. +# +# Open interactive terminal into the image in a container: +# docker run -ti --rm --entrypoint=/bin/bash -v :/code -v :/build +# Example: +# docker run -ti --rm --entrypoint=/bin/bash -v D:\do-client-lite:/code -v D:\temp\build_client_lite\arm-linux-debug:/build custom-debian11-arm32 + +FROM mcr.microsoft.com/mirror/docker/library/debian:buster@sha256:819b11bd0ade30fbc72f4b83593d0d126b2f3329b053495833219213fe37714d + +SHELL [ "/bin/bash", "-c"] + +# QEMU is a Linux emulator which enables cross-arch support in docker +# In order to build this image on a Linux host, need to install QEMU: +# +# sudo apt-get install qemu-user +# update-binfmts --display +# sudo apt install qemu binfmt-support qemu-user-static +# cp /usr/bin/qemu-arm-static /build/docker/debian11/arm32 +# +# Then copy the build script to the build directory +# cp /build/scripts/bootstrap.sh /build/docker/debian11/arm32 +# +# After running the above, you can build the image by running in the current dockerfile directory +# sudo docker build -t . --no-cache --network=host + +COPY qemu-arm-static /usr/bin/qemu-arm-static +COPY bootstrap.sh /tmp/bootstrap.sh + +WORKDIR /tmp/ +RUN chmod +x bootstrap.sh +RUN ./bootstrap.sh --install build + +VOLUME /code +WORKDIR /code + +ENTRYPOINT [ "/bin/bash", "-c" ] + +# We specify an empty command so that we can pass options to the ENTRYPOINT command. +# This is a bit of a Dockerfile quirk where if the ENTRYPOINT value is defined, +# then CMD becomes the default options passed to ENTRYPOINT. +# In this case we don't have any desired default arguments. +# However, we have to specify CMD to enable passing of command line parameters to ENTRYPOINT in the first place. +CMD [ ] diff --git a/build/docker/debian11/arm64/Dockerfile b/build/docker/debian11/arm64/Dockerfile new file mode 100644 index 00000000..2511a64c --- /dev/null +++ b/build/docker/debian11/arm64/Dockerfile @@ -0,0 +1,44 @@ +# Dockerfile for building DO client components for Debian 11 arm64 +# First, install the docker extension for VSCode. Then you can right-click on this file +# and choose Build Image. Give it a name and it will build the image. +# +# Open interactive terminal into the image in a container: +# docker run -ti --rm --entrypoint=/bin/bash -v :/code -v :/build +# Example: +# docker run -ti --rm --entrypoint=/bin/bash -v D:\do-client-lite:/code -v D:\temp\build_client_lite\arm-linux-debug:/build custom-debian11-arm64 + +FROM mcr.microsoft.com/mirror/docker/library/debian:buster@sha256:de3c0d12dd75f1a47595ff0ce78f2d30d6ca95c3ad66af06c8815d1f9b8e208d + +SHELL [ "/bin/bash", "-c"] + +# QEMU is a Linux emulator which enables cross-arch support in docker +# In order to build this image on a Linux host, need to install QEMU: +# +# sudo apt-get install qemu-user +# update-binfmts --display +# sudo apt install qemu binfmt-support qemu-user-static +# cp /usr/bin/qemu-arm-static /build/docker/debian11/arm64 +# +# Then copy the build script to the build directory +# cp /build/scripts/bootstrap.sh /build/docker/debian11/arm64 +# After running the above, you can build the image by running in the current dockerfile directory +# sudo docker build -t debian11_arm64 . --no-cache --network=host + +COPY qemu-arm-static /usr/bin/qemu-arm-static +COPY bootstrap.sh /tmp/bootstrap.sh + +WORKDIR /tmp/ +RUN chmod +x bootstrap.sh +RUN ./bootstrap.sh --install build + +VOLUME /code +WORKDIR /code + +ENTRYPOINT [ "/bin/bash", "-c" ] + +# We specify an empty command so that we can pass options to the ENTRYPOINT command. +# This is a bit of a Dockerfile quirk where if the ENTRYPOINT value is defined, +# then CMD becomes the default options passed to ENTRYPOINT. +# In this case we don't have any desired default arguments. +# However, we have to specify CMD to enable passing of command line parameters to ENTRYPOINT in the first place. +CMD [ ] \ No newline at end of file diff --git a/build/scripts/bootstrap.sh b/build/scripts/bootstrap.sh index f9453bd5..c86e5ba9 100755 --- a/build/scripts/bootstrap.sh +++ b/build/scripts/bootstrap.sh @@ -78,11 +78,11 @@ function installBuildDependencies mkdir /tmp/gtest pushd /tmp/gtest - if [[ ($DISTRO == "ubuntu" && ($VER == "20.04" || $VER == "22.04")) || ($DISTRO == "debian" && $VER == "10") ]]; + if [[ ($DISTRO == "ubuntu" && ($VER == "20.04" || $VER == "22.04")) || ($DISTRO == "debian" && ($VER == "10" || $VER == "11")) ]]; then if [[ $VER == "22.04" ]]; then release="v1.13.0"; else release="release-1.10.0"; fi; - # The latest native-version of gtest on ubuntu2004 and debian10 currently has a bug where + # The latest native-version of gtest on the latest versions of ubuntu and debian currently has a bug where # CMakeLists doesn't declare an install target, causing 'make install' to fail. # Clone from source and use release-1.10.0 instead, since gtest is a source package anyways. git clone https://github.com/google/googletest.git .