feat:initial arm64 docker image

This commit is contained in:
Swann 2021-12-02 15:28:46 +01:00
parent de32bd89e3
commit e4e93f7c7f
3 changed files with 26 additions and 2 deletions

View File

@ -1,7 +1,8 @@
stages: stages:
- test - test
- build - build
- deploy - deploy-amd64
- deploy-arm64
- doc - doc
@ -9,5 +10,6 @@ stages:
include: include:
- local: .gitlab/ci/test.gitlab-ci.yml - local: .gitlab/ci/test.gitlab-ci.yml
- local: .gitlab/ci/build.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 - local: .gitlab/ci/doc.gitlab-ci.yml

View File

@ -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