From c6f54362f91f31498d383ebd0bdb01db0fd1890d Mon Sep 17 00:00:00 2001 From: Stanislav Popov Date: Thu, 20 Jul 2017 00:35:48 +0500 Subject: [PATCH] test: gitlab-ci: add pull to dev and deploy to staging --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 752cd8c..bc4cdfb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,3 +2,24 @@ test: script: - molecule test + +pull_role: + stage: build + tags: + - dev + script: + - if [ -z "$ANSIBLE_SERVER_PATH" ]; then exit 1; fi + - rsync -r "$PWD/" "$ANSIBLE_SERVER_PATH/../$CI_PROJECT_NAME/" + #- cd $ANSIBLE_SERVER_PATH && git pull origin master + only: + - master + +"adeploy server-scripts": + tags: + - prod + stage: deploy + script: + - ANSIBLE_STDOUT_CALLBACK=actionable ansible-deploy server-scripts --ssh-common-args="-i /srv/docker/gitlab/keys/prod/id_rsa" + when: manual + only: + - master