From e4e93f7c7f257b6cd0a36de182a17c737f636979 Mon Sep 17 00:00:00 2001 From: Swann Date: Thu, 2 Dec 2021 15:28:46 +0100 Subject: [PATCH] feat:initial arm64 docker image --- .gitlab-ci.yml | 6 +++-- ...tlab-ci.yml => deploy-amd64.gitlab-ci.yml} | 0 .gitlab/ci/deploy-arm64.gitlab-ci.yml | 22 +++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) rename .gitlab/ci/{deploy.gitlab-ci.yml => deploy-amd64.gitlab-ci.yml} (100%) create mode 100644 .gitlab/ci/deploy-arm64.gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7c6485..755d9be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,8 @@ stages: - test - build - - deploy + - deploy-amd64 + - deploy-arm64 - doc @@ -9,5 +10,6 @@ stages: include: - local: .gitlab/ci/test.gitlab-ci.yml - local: .gitlab/ci/build.gitlab-ci.yml - - local: .gitlab/ci/deploy.gitlab-ci.yml + - local: .gitlab/ci/deploy-amd64.gitlab-ci.yml + - local: .gitlab/ci/deploy-arm64.gitlab-ci.yml - local: .gitlab/ci/doc.gitlab-ci.yml diff --git a/.gitlab/ci/deploy.gitlab-ci.yml b/.gitlab/ci/deploy-amd64.gitlab-ci.yml similarity index 100% rename from .gitlab/ci/deploy.gitlab-ci.yml rename to .gitlab/ci/deploy-amd64.gitlab-ci.yml diff --git a/.gitlab/ci/deploy-arm64.gitlab-ci.yml b/.gitlab/ci/deploy-arm64.gitlab-ci.yml new file mode 100644 index 0000000..49c77c3 --- /dev/null +++ b/.gitlab/ci/deploy-arm64.gitlab-ci.yml @@ -0,0 +1,22 @@ +deploy: + stage: deploy + needs: ["build"] + image: slumber/docker-python + variables: + DOCKER_DRIVER: overlay2 + DOCKER_TLS_CERTDIR: "/certs" + GIT_SUBMODULE_STRATEGY: recursive + + services: + - docker:19.03.12-dind + + script: + - RP_VERSION="$(python scripts/get_replication_version.py)" + - VERSION="$(python scripts/get_addon_version.py)" + - echo "Building docker image with replication ${RP_VERSION}" + - docker buildx create --name arm64 --use + - docker buildx build --platform linux/arm64 --build-arg version={VERSION} --tag registry.gitlab.com/slumber/multi-user/multi-user-server:${VERSION}-arm64 ./scripts/docker_server + - echo "Pushing to gitlab registry ${VERSION}-arm64" + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker tag registry.gitlab.com/slumber/multi-user/multi-user-server:${VERSION}-arm64 registry.gitlab.com/slumber/multi-user/multi-user-server:${CI_COMMIT_REF_NAME}-arm64 + - docker push registry.gitlab.com/slumber/multi-user/multi-user-server:${VERSION}-arm64