Current Path : /home/bitrix/ext_www/mr.yacl.site/ |
Current File : /home/bitrix/ext_www/mr.yacl.site/site_not_exist.yml |
# Select a base image to start working with... image: deeptrancer/php7.1-centos # Configure the base image before_script: ## ## Run ssh-agent (inside the build environment) ## - eval $(ssh-agent -s) ## ## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store ## We're using tr to fix line endings which makes ed25519 keys work ## without extra base64 encoding. ## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556 ## - bash -c "ssh-add <(echo '$SSH_PRIVATE_KEY')" ## ## Create the SSH directory and give it the right permissions ## - mkdir -p ~/.ssh - chmod 700 ~/.ssh # Define pipline stages stages: - build - deploy create: stage: build script: - ssh -o StrictHostKeyChecking=no root@k-team.korusdev.ru "/home/bitrix/deploy.sh -c -b $CI_COMMIT_REF_NAME; exit \$?" when: manual update: stage: deploy needs: ["create"] script: - ssh -o StrictHostKeyChecking=no root@k-team.korusdev.ru "/home/bitrix/deploy.sh -u -b $CI_COMMIT_REF_NAME; exit \$?" reset: stage: deploy needs: ["create"] script: - ssh -o StrictHostKeyChecking=no root@k-team.korusdev.ru "/home/bitrix/deploy.sh -r -b $CI_COMMIT_REF_NAME; exit \$?" when: manual delete: stage: deploy needs: ["create"] script: - ssh -o StrictHostKeyChecking=no root@k-team.korusdev.ru "/home/bitrix/deploy.sh -d -b $CI_COMMIT_REF_NAME; exit \$?" rules: - if: '$CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME == "demo" || $CI_COMMIT_REF_NAME == "develop"' when: never - if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_REF_NAME != "demo" && $CI_COMMIT_REF_NAME != "develop"' when: manual