multi-user/.gitlab/ci/deploy.gitlab-ci.yml

22 lines
983 B
YAML
Raw Normal View History

2020-10-02 18:59:25 +02:00
deploy:
2020-10-02 18:57:50 +02:00
stage: deploy
2021-03-02 09:06:32 +00:00
needs: ["build"]
2020-10-03 00:07:07 +02:00
image: slumber/docker-python
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
2021-05-07 15:47:53 +02:00
GIT_SUBMODULE_STRATEGY: recursive
2020-10-03 00:07:07 +02:00
2020-10-02 23:55:04 +02:00
services:
- docker:19.03.12-dind
2020-10-02 18:56:26 +02:00
script:
2020-10-03 00:26:44 +02:00
- 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
2020-10-02 23:32:06 +02:00
- echo "Pushing to gitlab registry ${VERSION}"
2020-10-03 00:12:39 +02:00
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
2021-01-28 09:54:19 +01:00
- 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