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