From 0cbb38f190671bc08f69a796170023f5e49964eb Mon Sep 17 00:00:00 2001 From: Cade Call Date: Tue, 31 Mar 2020 18:47:41 -0600 Subject: [PATCH 01/21] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 59 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000000..33907bb4b72 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,59 @@ +# Docker +# Build a Docker image +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: +- none + +resources: +- repo: self + +variables: + tag: '$(Build.BuildId)' + +stages: +- stage: Build + displayName: Build image + jobs: + - job: Build + displayName: Build + pool: + vmImage: 'ubuntu-latest' + steps: + - task: Docker@2 + displayName: Build amd64 images + inputs: + containerRegistry: 'dockerhub_cadecall' + repository: 'ravenproject/ravencore-api' + command: 'buildAndPush' + Dockerfile: '**/Dockerfile.amd64' + tags: 'amd64-$(tag)' + + - task: Bash@3 + inputs: + targetType: 'inline' + script: | + sudo apt-get -y remove docker docker-engine docker.io containerd runc + sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common + + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + + sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + sudo apt-get update + sudo apt-get -y install docker-ce docker-ce-cli containerd.io + + export DOCKER_BUILDKIT=1 + + docker build --platform=local -o . git://github.com/docker/buildx + mkdir -p ~/.docker/cli-plugins + mv buildx ~/.docker/cli-plugins/docker-buildx + docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 + cat /proc/sys/fs/binfmt_misc/qemu-aarch64 + - task: Docker@2 + displayName: Build arm32v7 images + inputs: + containerRegistry: 'dockerhub_cadecall' + repository: 'ravenproject/ravencore-api' + command: 'buildAndPush' + Dockerfile: '**/Dockerfile.arm32v7' + tags: 'arm32v7-$(Build.BuildId)' \ No newline at end of file From 135fb409e5fa3d1fc6935fd0d613ea2181aefb17 Mon Sep 17 00:00:00 2001 From: Cade Call Date: Tue, 31 Mar 2020 19:31:29 -0600 Subject: [PATCH 02/21] fixed testnet activation numbers --- Dockerfile.amd64 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index 74d2f0fef0b..1a0f4e2efa8 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -23,4 +23,6 @@ RUN npm install COPY run.sh . +RUN sed -i 's/1569945600/1567533600/g' node_modules/ravencore-lib/lib/block/blockheader.js; sed -i 's/3585159200/1585159200/g' node_modules/ravencore-lib/lib/block/blockheader.js + CMD ["/app/run.sh"] From 448c9e8a884299150c0fff5111290577b6591ad9 Mon Sep 17 00:00:00 2001 From: Cade Call Date: Wed, 1 Apr 2020 09:20:57 -0600 Subject: [PATCH 03/21] Fixed docker tags --- azure-pipelines.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33907bb4b72..599d8545432 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,7 @@ resources: - repo: self variables: - tag: '$(Build.BuildId)' + tag: '$(Build.BuildNumber)' stages: - stage: Build @@ -31,6 +31,7 @@ stages: - task: Bash@3 inputs: + displayName: Setup OS requirements targetType: 'inline' script: | sudo apt-get -y remove docker docker-engine docker.io containerd runc @@ -56,4 +57,4 @@ stages: repository: 'ravenproject/ravencore-api' command: 'buildAndPush' Dockerfile: '**/Dockerfile.arm32v7' - tags: 'arm32v7-$(Build.BuildId)' \ No newline at end of file + tags: 'arm32v7-$(tag)' \ No newline at end of file From 255fecd03e4a5ba0799428c919bc7e21f7c6f7ee Mon Sep 17 00:00:00 2001 From: Cade Call Date: Wed, 1 Apr 2020 09:37:49 -0600 Subject: [PATCH 04/21] added fix for testnet to arm build --- Dockerfile.arm32v7 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index b3f88ceba26..18d68abf025 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -16,4 +16,6 @@ RUN npm install COPY run.sh . +RUN sed -i 's/1569945600/1567533600/g' node_modules/ravencore-lib/lib/block/blockheader.js; sed -i 's/3585159200/1585159200/g' node_modules/ravencore-lib/lib/block/blockheader.js + CMD ["/app/run.sh"] From abf4e156ed0a42daa7a940f342ec38515b42acf5 Mon Sep 17 00:00:00 2001 From: Cade Call Date: Wed, 6 May 2020 09:28:15 -0600 Subject: [PATCH 05/21] mainnet kawpow fix --- Dockerfile.amd64 | 2 -- Dockerfile.arm32v7 | 2 -- run.sh | 4 ++++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index 1a0f4e2efa8..74d2f0fef0b 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -23,6 +23,4 @@ RUN npm install COPY run.sh . -RUN sed -i 's/1569945600/1567533600/g' node_modules/ravencore-lib/lib/block/blockheader.js; sed -i 's/3585159200/1585159200/g' node_modules/ravencore-lib/lib/block/blockheader.js - CMD ["/app/run.sh"] diff --git a/Dockerfile.arm32v7 b/Dockerfile.arm32v7 index 18d68abf025..b3f88ceba26 100644 --- a/Dockerfile.arm32v7 +++ b/Dockerfile.arm32v7 @@ -16,6 +16,4 @@ RUN npm install COPY run.sh . -RUN sed -i 's/1569945600/1567533600/g' node_modules/ravencore-lib/lib/block/blockheader.js; sed -i 's/3585159200/1585159200/g' node_modules/ravencore-lib/lib/block/blockheader.js - CMD ["/app/run.sh"] diff --git a/run.sh b/run.sh index 930d3de6e2c..7574d376a33 100755 --- a/run.sh +++ b/run.sh @@ -6,6 +6,10 @@ else network="testnet" fi +if [[ ${network} == "testnet" ]]; then + sed -i 's/1569945600/1567533600/g' node_modules/ravencore-lib/lib/block/blockheader.js; sed -i 's/3585159200/1585159200/g' node_modules/ravencore-lib/lib/block/blockheader.js +fi + if [[ ${PORT} ]]; then port=${PORT} else From 33da8282d9a13f2673ea609fe0756aceb83f5f41 Mon Sep 17 00:00:00 2001 From: Cade Call Date: Wed, 6 May 2020 10:46:59 -0600 Subject: [PATCH 06/21] fixed testnet kawpow activation --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 7574d376a33..9635cc92296 100755 --- a/run.sh +++ b/run.sh @@ -7,7 +7,7 @@ else fi if [[ ${network} == "testnet" ]]; then - sed -i 's/1569945600/1567533600/g' node_modules/ravencore-lib/lib/block/blockheader.js; sed -i 's/3585159200/1585159200/g' node_modules/ravencore-lib/lib/block/blockheader.js + sed -i 's/1569945600/1567533600/g' node_modules/ravencore-lib/lib/block/blockheader.js; sed -i 's/1588788000/1585159200/g' node_modules/ravencore-lib/lib/block/blockheader.js fi if [[ ${PORT} ]]; then From 4e7135df9bf9097b5e233be9c62a7e2aae043a08 Mon Sep 17 00:00:00 2001 From: Cade Call Date: Fri, 8 May 2020 09:54:44 -0600 Subject: [PATCH 07/21] update to build multi-arch images --- azure-pipelines.yml | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 599d8545432..9fd82c838c6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,15 +20,6 @@ stages: pool: vmImage: 'ubuntu-latest' steps: - - task: Docker@2 - displayName: Build amd64 images - inputs: - containerRegistry: 'dockerhub_cadecall' - repository: 'ravenproject/ravencore-api' - command: 'buildAndPush' - Dockerfile: '**/Dockerfile.amd64' - tags: 'amd64-$(tag)' - - task: Bash@3 inputs: displayName: Setup OS requirements @@ -51,10 +42,29 @@ stages: docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 cat /proc/sys/fs/binfmt_misc/qemu-aarch64 - task: Docker@2 - displayName: Build arm32v7 images inputs: containerRegistry: 'dockerhub_cadecall' - repository: 'ravenproject/ravencore-api' - command: 'buildAndPush' - Dockerfile: '**/Dockerfile.arm32v7' - tags: 'arm32v7-$(tag)' \ No newline at end of file + command: 'login' + - task: Bash@3 + displayName: build docker images + inputs: + targetType: 'inline' + script: | + docker buildx build --push --platform linux/arm/v7,linux/amd64 --tag ravenproject/ravencore-api:latest . +# - task: Docker@2 +# displayName: Build amd64 images +# inputs: +# containerRegistry: 'dockerhub_cadecall' +# repository: 'ravenproject/ravencore-api' +# command: 'buildAndPush' +# Dockerfile: '**/Dockerfile.amd64' +# tags: 'amd64-$(tag)' + +# - task: Docker@2 +# displayName: Build arm32v7 images +# inputs: +# containerRegistry: 'dockerhub_cadecall' +# repository: 'ravenproject/ravencore-api' +# command: 'buildAndPush' +# Dockerfile: '**/Dockerfile.arm32v7' +# tags: 'arm32v7-$(tag)' \ No newline at end of file From 5ac6e19bf9bb3ed9d353d8662f412adc1ea92882 Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 10:58:21 -0600 Subject: [PATCH 08/21] updated docker buildx stuffs --- azure-pipelines.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9fd82c838c6..34963b08ec2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,8 +21,8 @@ stages: vmImage: 'ubuntu-latest' steps: - task: Bash@3 + displayName: Setup OS requirements inputs: - displayName: Setup OS requirements targetType: 'inline' script: | sudo apt-get -y remove docker docker-engine docker.io containerd runc @@ -36,9 +36,23 @@ stages: export DOCKER_BUILDKIT=1 - docker build --platform=local -o . git://github.com/docker/buildx + #docker build --platform=local -o . git://github.com/docker/buildx + - task: DownloadGitHubRelease@0 + displayName: Download docker buildx release + inputs: + connection: 'github.com_cfrogjump' + userRepository: 'docker/buildx' + defaultVersionType: 'latest' + itemPattern: 'buildx-*.linux-amd64' + downloadPath: '$(System.ArtifactsDirectory)' + - task: Bash@3 + displayName: Put buildx in the path + inputs: + targetType: 'inline' + script: | + ls $(System.ArtifactsDirectory) mkdir -p ~/.docker/cli-plugins - mv buildx ~/.docker/cli-plugins/docker-buildx + mv $(System.ArtifactsDirectory)/buildx ~/.docker/cli-plugins/docker-buildx docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 cat /proc/sys/fs/binfmt_misc/qemu-aarch64 - task: Docker@2 From 92c292802f11affcfab8eb5da3e4038c16b2a7d1 Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 11:13:26 -0600 Subject: [PATCH 09/21] updated buildx binary name --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 34963b08ec2..ca46fbf7218 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -52,7 +52,7 @@ stages: script: | ls $(System.ArtifactsDirectory) mkdir -p ~/.docker/cli-plugins - mv $(System.ArtifactsDirectory)/buildx ~/.docker/cli-plugins/docker-buildx + mv $(System.ArtifactsDirectory)/buildx-*.linux.amd64 ~/.docker/cli-plugins/docker-buildx docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 cat /proc/sys/fs/binfmt_misc/qemu-aarch64 - task: Docker@2 From 41c00d2be0bb57c4302f420a1150350ce618a620 Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 11:16:30 -0600 Subject: [PATCH 10/21] that binary again --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ca46fbf7218..85cd3ba55d2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -52,7 +52,7 @@ stages: script: | ls $(System.ArtifactsDirectory) mkdir -p ~/.docker/cli-plugins - mv $(System.ArtifactsDirectory)/buildx-*.linux.amd64 ~/.docker/cli-plugins/docker-buildx + mv $(System.ArtifactsDirectory)/buildx* ~/.docker/cli-plugins/docker-buildx docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 cat /proc/sys/fs/binfmt_misc/qemu-aarch64 - task: Docker@2 From 0af3a8610d0919e4f3f1324f0fd091b28bf96b6d Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 11:25:05 -0600 Subject: [PATCH 11/21] that binary again, and again --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 85cd3ba55d2..b8c8edb4076 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -55,7 +55,10 @@ stages: mv $(System.ArtifactsDirectory)/buildx* ~/.docker/cli-plugins/docker-buildx docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 cat /proc/sys/fs/binfmt_misc/qemu-aarch64 + sudo systemctl restart docker + docker buildx --help - task: Docker@2 + displayName: Login to dockerhub inputs: containerRegistry: 'dockerhub_cadecall' command: 'login' From fcdd6bfbcd574a63ba2577bc1a04a8e4ab41ce27 Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 11:33:54 -0600 Subject: [PATCH 12/21] binary permissions --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b8c8edb4076..3a12d45f3d4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -55,7 +55,8 @@ stages: mv $(System.ArtifactsDirectory)/buildx* ~/.docker/cli-plugins/docker-buildx docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 cat /proc/sys/fs/binfmt_misc/qemu-aarch64 - sudo systemctl restart docker + ls -la ~/.docker/cli-plugins/docker-buildx + sudo chmod +x ~/.docker/cli-plugins/docker-buildx docker buildx --help - task: Docker@2 displayName: Login to dockerhub From 782f8972cf2d3fba9165caa2d96013c0b1c49b9e Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 11:47:15 -0600 Subject: [PATCH 13/21] build order changes --- azure-pipelines.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3a12d45f3d4..c933e0077b5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -45,8 +45,13 @@ stages: defaultVersionType: 'latest' itemPattern: 'buildx-*.linux-amd64' downloadPath: '$(System.ArtifactsDirectory)' + - task: Docker@2 + displayName: Login to dockerhub + inputs: + containerRegistry: 'dockerhub_cadecall' + command: 'login' - task: Bash@3 - displayName: Put buildx in the path + displayName: build docker images inputs: targetType: 'inline' script: | @@ -57,18 +62,15 @@ stages: cat /proc/sys/fs/binfmt_misc/qemu-aarch64 ls -la ~/.docker/cli-plugins/docker-buildx sudo chmod +x ~/.docker/cli-plugins/docker-buildx - docker buildx --help - - task: Docker@2 - displayName: Login to dockerhub - inputs: - containerRegistry: 'dockerhub_cadecall' - command: 'login' - - task: Bash@3 - displayName: build docker images - inputs: - targetType: 'inline' - script: | + docker buildx build --push --platform linux/arm/v7,linux/amd64 --tag ravenproject/ravencore-api:latest . + +# - task: Bash@3 +# displayName: build docker images +# inputs: +# targetType: 'inline' +# script: | +# docker buildx build --push --platform linux/arm/v7,linux/amd64 --tag ravenproject/ravencore-api:latest . # - task: Docker@2 # displayName: Build amd64 images # inputs: From 202c7257c1de77e6e78d4b8214b06e8f93b72ba3 Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 12:07:02 -0600 Subject: [PATCH 14/21] build order changes --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c933e0077b5..a8d6867e4b4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -63,6 +63,8 @@ stages: ls -la ~/.docker/cli-plugins/docker-buildx sudo chmod +x ~/.docker/cli-plugins/docker-buildx + docker buildx build --help + docker buildx build --push --platform linux/arm/v7,linux/amd64 --tag ravenproject/ravencore-api:latest . # - task: Bash@3 From d0cfd4729b97477191b906b5bca70a61b27a236f Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 14:10:25 -0600 Subject: [PATCH 15/21] added restart --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a8d6867e4b4..865178fe038 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,9 +62,9 @@ stages: cat /proc/sys/fs/binfmt_misc/qemu-aarch64 ls -la ~/.docker/cli-plugins/docker-buildx sudo chmod +x ~/.docker/cli-plugins/docker-buildx - + sudo systemctl restart docker docker buildx build --help - + docker buildx build --push --platform linux/arm/v7,linux/amd64 --tag ravenproject/ravencore-api:latest . # - task: Bash@3 From 0743c53b01b3cd77b7502a0729156fe2f9ace6ef Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 14:17:13 -0600 Subject: [PATCH 16/21] docker version testing --- azure-pipelines.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 865178fe038..b50526cf775 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,6 +25,8 @@ stages: inputs: targetType: 'inline' script: | + echo "Docker version" + docker -v sudo apt-get -y remove docker docker-engine docker.io containerd runc sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common @@ -35,7 +37,8 @@ stages: sudo apt-get -y install docker-ce docker-ce-cli containerd.io export DOCKER_BUILDKIT=1 - + echo "Docker version" + docker -v #docker build --platform=local -o . git://github.com/docker/buildx - task: DownloadGitHubRelease@0 displayName: Download docker buildx release @@ -55,6 +58,8 @@ stages: inputs: targetType: 'inline' script: | + export DOCKER_BUILDKIT=1 + ls $(System.ArtifactsDirectory) mkdir -p ~/.docker/cli-plugins mv $(System.ArtifactsDirectory)/buildx* ~/.docker/cli-plugins/docker-buildx From 198b27bbcfd933b0b4c07748d8b9d157f3cf47d7 Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 14:40:33 -0600 Subject: [PATCH 17/21] docker version testing --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b50526cf775..ee719603f58 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,8 +25,10 @@ stages: inputs: targetType: 'inline' script: | + export DOCKER_BUILDKIT=1 echo "Docker version" docker -v + docker buildx --help sudo apt-get -y remove docker docker-engine docker.io containerd runc sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common @@ -36,7 +38,7 @@ stages: sudo apt-get update sudo apt-get -y install docker-ce docker-ce-cli containerd.io - export DOCKER_BUILDKIT=1 + echo "Docker version" docker -v #docker build --platform=local -o . git://github.com/docker/buildx From fcfbfe6a7547d05e2886b8362257544f4a16cc5f Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 14:45:03 -0600 Subject: [PATCH 18/21] docker version testing --- azure-pipelines.yml | 62 ++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ee719603f58..401b97a1887 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,36 +20,36 @@ stages: pool: vmImage: 'ubuntu-latest' steps: - - task: Bash@3 - displayName: Setup OS requirements - inputs: - targetType: 'inline' - script: | - export DOCKER_BUILDKIT=1 - echo "Docker version" - docker -v - docker buildx --help - sudo apt-get -y remove docker docker-engine docker.io containerd runc - sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common + #- task: Bash@3 + # displayName: Setup OS requirements + # inputs: + # targetType: 'inline' + # script: | + # export DOCKER_BUILDKIT=1 + # echo "Docker version" + # docker -v + # docker buildx --help + # sudo apt-get -y remove docker docker-engine docker.io containerd runc + # sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + # curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo apt-get update - sudo apt-get -y install docker-ce docker-ce-cli containerd.io + # sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + # sudo apt-get update + # sudo apt-get -y install docker-ce docker-ce-cli containerd.io - echo "Docker version" - docker -v + # echo "Docker version" + # docker -v #docker build --platform=local -o . git://github.com/docker/buildx - - task: DownloadGitHubRelease@0 - displayName: Download docker buildx release - inputs: - connection: 'github.com_cfrogjump' - userRepository: 'docker/buildx' - defaultVersionType: 'latest' - itemPattern: 'buildx-*.linux-amd64' - downloadPath: '$(System.ArtifactsDirectory)' + #- task: DownloadGitHubRelease@0 + # displayName: Download docker buildx release + # inputs: + # connection: 'github.com_cfrogjump' + # userRepository: 'docker/buildx' + # defaultVersionType: 'latest' + # itemPattern: 'buildx-*.linux-amd64' + # downloadPath: '$(System.ArtifactsDirectory)' - task: Docker@2 displayName: Login to dockerhub inputs: @@ -62,15 +62,15 @@ stages: script: | export DOCKER_BUILDKIT=1 - ls $(System.ArtifactsDirectory) - mkdir -p ~/.docker/cli-plugins - mv $(System.ArtifactsDirectory)/buildx* ~/.docker/cli-plugins/docker-buildx + # ls $(System.ArtifactsDirectory) + # mkdir -p ~/.docker/cli-plugins + # mv $(System.ArtifactsDirectory)/buildx* ~/.docker/cli-plugins/docker-buildx docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 cat /proc/sys/fs/binfmt_misc/qemu-aarch64 ls -la ~/.docker/cli-plugins/docker-buildx - sudo chmod +x ~/.docker/cli-plugins/docker-buildx - sudo systemctl restart docker - docker buildx build --help + # sudo chmod +x ~/.docker/cli-plugins/docker-buildx + # sudo systemctl restart docker + # docker buildx build --help docker buildx build --push --platform linux/arm/v7,linux/amd64 --tag ravenproject/ravencore-api:latest . From 9dd813b64283d564f513d70449bb4c01133fa70d Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 14:49:40 -0600 Subject: [PATCH 19/21] docker version testing --- azure-pipelines.yml | 74 +++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 401b97a1887..35c9376d751 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,36 +20,34 @@ stages: pool: vmImage: 'ubuntu-latest' steps: - #- task: Bash@3 - # displayName: Setup OS requirements - # inputs: - # targetType: 'inline' - # script: | - # export DOCKER_BUILDKIT=1 - # echo "Docker version" - # docker -v - # docker buildx --help - # sudo apt-get -y remove docker docker-engine docker.io containerd runc - # sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common - - # curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - - # sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - # sudo apt-get update - # sudo apt-get -y install docker-ce docker-ce-cli containerd.io - - - # echo "Docker version" - # docker -v - #docker build --platform=local -o . git://github.com/docker/buildx - #- task: DownloadGitHubRelease@0 - # displayName: Download docker buildx release - # inputs: - # connection: 'github.com_cfrogjump' - # userRepository: 'docker/buildx' - # defaultVersionType: 'latest' - # itemPattern: 'buildx-*.linux-amd64' - # downloadPath: '$(System.ArtifactsDirectory)' +# - task: Bash@3 +# displayName: Setup OS requirements +# inputs: +# targetType: 'inline' +# script: | +# export DOCKER_BUILDKIT=1 +# echo "Docker version" +# docker -v +# docker buildx --help +# sudo apt-get -y remove docker docker-engine docker.io containerd runc +# sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common +# +# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - +# +# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" +# sudo apt-get update +# sudo apt-get -y install docker-ce docker-ce-cli containerd.io +# echo "Docker version" +# docker -v +# docker build --platform=local -o . git://github.com/docker/buildx +# - task: DownloadGitHubRelease@0 +# displayName: Download docker buildx release +# inputs: +# connection: 'github.com_cfrogjump' +# userRepository: 'docker/buildx' +# defaultVersionType: 'latest' +# itemPattern: 'buildx-*.linux-amd64' +# downloadPath: '$(System.ArtifactsDirectory)' - task: Docker@2 displayName: Login to dockerhub inputs: @@ -61,19 +59,17 @@ stages: targetType: 'inline' script: | export DOCKER_BUILDKIT=1 - - # ls $(System.ArtifactsDirectory) - # mkdir -p ~/.docker/cli-plugins - # mv $(System.ArtifactsDirectory)/buildx* ~/.docker/cli-plugins/docker-buildx docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 cat /proc/sys/fs/binfmt_misc/qemu-aarch64 ls -la ~/.docker/cli-plugins/docker-buildx - # sudo chmod +x ~/.docker/cli-plugins/docker-buildx - # sudo systemctl restart docker - # docker buildx build --help - docker buildx build --push --platform linux/arm/v7,linux/amd64 --tag ravenproject/ravencore-api:latest . - +# sudo chmod +x ~/.docker/cli-plugins/docker-buildx +# sudo systemctl restart docker +# docker buildx build --help +# ls $(System.ArtifactsDirectory) +# mkdir -p ~/.docker/cli-plugins +# mv $(System.ArtifactsDirectory)/buildx* ~/.docker/cli-plugins/docker-buildx + # - task: Bash@3 # displayName: build docker images # inputs: From 2651eabcfae26f80ede0bd7d0137927bff89c93e Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 14:52:55 -0600 Subject: [PATCH 20/21] docker version testing --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 35c9376d751..547a9288b4b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -61,8 +61,10 @@ stages: export DOCKER_BUILDKIT=1 docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 cat /proc/sys/fs/binfmt_misc/qemu-aarch64 - ls -la ~/.docker/cli-plugins/docker-buildx + docker buildx build --push --platform linux/arm/v7,linux/amd64 --tag ravenproject/ravencore-api:latest . + docker buildx build --help +# ls -la ~/.docker/cli-plugins/docker-buildx # sudo chmod +x ~/.docker/cli-plugins/docker-buildx # sudo systemctl restart docker # docker buildx build --help From e133a3e5748612ca5c27a664fc7e224c212f2fc6 Mon Sep 17 00:00:00 2001 From: Cade Call Date: Mon, 15 Jun 2020 14:59:40 -0600 Subject: [PATCH 21/21] docker version testing --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 547a9288b4b..8d8192130f7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -61,7 +61,7 @@ stages: export DOCKER_BUILDKIT=1 docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 cat /proc/sys/fs/binfmt_misc/qemu-aarch64 - + docker buildx create --use --name build --node build --driver-opt network=host docker buildx build --push --platform linux/arm/v7,linux/amd64 --tag ravenproject/ravencore-api:latest . docker buildx build --help # ls -la ~/.docker/cli-plugins/docker-buildx