From ea4cfe4303313960023b4026fbd8e00b3b880752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <henrik@trineo.org> Date: Wed, 17 Jul 2019 11:29:08 +0200 Subject: [PATCH] ci --- .gitlab-ci.yml | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 57994e2..a917eff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,16 +24,6 @@ # variables: - SQL_RESTORE: "" - NIS_ENABLE: "" - NIS_DOMAIN: "" - NIS_SERVER: "" - PORT_SSL: "" - DOCKER_TZ: "" - DOCKER_MAIL: "" - MAKE_TEST: "" - MYSQL_ROOT_PASSWORD: caosdb1234 - CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb # When using dind service we need to instruct docker, to talk with the # daemon started inside of the service. The daemon is available with # a network connection instead of the default /var/run/docker.sock socket. @@ -59,10 +49,27 @@ variables: services: - docker:dind -code_style: - script: "flake8 --count ." +stages: + - deploy + - test + - style +code_style: + stage: style + script: "flake8 --count ." -services: - - name: mariadb:10.4 - - name: "$CI_REGISTRY_IMAGE:latest" +deploy-to-swarm: + stage: deploy + variables: + SERVICE_NAME: caosdb_stack + image: docker:latest + script: + - docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker stack deploy + --with-registry-auth + --compose-file=.docker-stack-base.yml + $SERVICE_NAME +test: + stage: test + script: + - echo "test" -- GitLab