From 6fc03ad0ee0d1fde3a475f7f8c88849a25678512 Mon Sep 17 00:00:00 2001 From: Swann Date: Thu, 2 Dec 2021 16:33:02 +0100 Subject: [PATCH] overide pipelines --- .gitlab-ci.yml | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d368741..28e6fe1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,8 +7,37 @@ stages: -include: - # - local: .gitlab/ci/test.gitlab-ci.yml - # - local: .gitlab/ci/build-addon.gitlab-ci.yml - - local: .gitlab/ci/build-image.gitlab-ci.yml - # - local: .gitlab/ci/doc.gitlab-ci.yml +# include: +# # - local: .gitlab/ci/test.gitlab-ci.yml +# # - local: .gitlab/ci/build-addon.gitlab-ci.yml +# - local: .gitlab/ci/build-image.gitlab-ci.yml +# # - local: .gitlab/ci/doc.gitlab-ci.yml + +build-arm64: + stage: build-arm64 + # needs: ["build-addon-zip"] + image: slumber/docker-python + variables: + DOCKER_DRIVER: overlay2 + DOCKER_TLS_CERTDIR: "/certs" + GIT_SUBMODULE_STRATEGY: recursive + + services: + - docker:19.03.12-dind + before_script: + - apk add curl + - mkdir -p ~/.docker/cli-plugins + - curl -sSLo ~/.docker/cli-plugins/docker-buildx https://github.com/docker/buildx/releases/download/$BUILDX_VERSION/buildx-$BUILDX_VERSION.linux-amd64 + - chmod +x ~/.docker/cli-plugins/docker-buildx + - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - docker info + 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 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 \ No newline at end of file