Compare commits

...

14 Commits

Author SHA1 Message Date
Swann
6fc03ad0ee overide pipelines 2021-12-02 16:33:02 +01:00
Swann
5a12b82392 feat tests 2021-12-02 16:30:49 +01:00
Swann
35ee8bc8ec fix build 2021-12-02 16:28:38 +01:00
Swann
cef3cd445c fix buildx 2021-12-02 16:07:17 +01:00
Swann
2b205c4b62 fix buildx 2021-12-02 15:55:16 +01:00
Swann
ed4b26f925 fix doc 2021-12-02 15:45:06 +01:00
Swann
c9758e6f11 fix build 2021-12-02 15:44:00 +01:00
Swann
7152ea9307 fix ci 2021-12-02 15:43:25 +01:00
Swann
0f35031375 fix ci 2021-12-02 15:41:48 +01:00
Swann Martinez
37b0b5040d Update .gitlab-ci.yml file 2021-12-02 14:39:37 +00:00
Swann Martinez
318bd50eec Update .gitlab-ci.yml file 2021-12-02 14:37:58 +00:00
Swann Martinez
fd733d45bf Update .gitlab-ci.yml file 2021-12-02 14:37:37 +00:00
Swann
09af14bc4b fix: job name 2021-12-02 15:35:23 +01:00
Swann
e4e93f7c7f feat:initial arm64 docker image 2021-12-02 15:28:46 +01:00
5 changed files with 92 additions and 33 deletions

View File

@ -1,13 +1,43 @@
stages:
- test
- build
- deploy
- doc
# - test
# - build-addon-zip
# - build-amd64
- build-arm64
# - doc
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/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

View File

@ -1,5 +1,5 @@
build:
stage: build
build-addon-zip:
stage: build-addon-zip
needs: ["test"]
image: debian:stable-slim
script:

View File

@ -0,0 +1,50 @@
build-amd64:
stage: build-amd64
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
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 build --build-arg replication_version=${RP_VERSION} --build-arg version={VERSION} -t registry.gitlab.com/slumber/multi-user/multi-user-server:${VERSION} ./scripts/docker_server
- echo "Pushing to gitlab registry ${VERSION}"
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker tag registry.gitlab.com/slumber/multi-user/multi-user-server:${VERSION} registry.gitlab.com/slumber/multi-user/multi-user-server:${CI_COMMIT_REF_NAME}
- docker push registry.gitlab.com/slumber/multi-user/multi-user-server
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

View File

@ -1,21 +0,0 @@
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 build --build-arg replication_version=${RP_VERSION} --build-arg version={VERSION} -t registry.gitlab.com/slumber/multi-user/multi-user-server:${VERSION} ./scripts/docker_server
- echo "Pushing to gitlab registry ${VERSION}"
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker tag registry.gitlab.com/slumber/multi-user/multi-user-server:${VERSION} registry.gitlab.com/slumber/multi-user/multi-user-server:${CI_COMMIT_REF_NAME}
- docker push registry.gitlab.com/slumber/multi-user/multi-user-server

View File

@ -1,6 +1,6 @@
pages:
stage: doc
needs: ["deploy"]
needs: ["build-arm64","build-amd64"]
image: python
script:
- pip install -U sphinx sphinx_rtd_theme sphinx-material