Created
August 21, 2017 15:15
-
-
Save shaliko/e03ec21d607eff8419052c08b8944b75 to your computer and use it in GitHub Desktop.
GitLab Continuous Integration with Capistrano 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: ruby:2.4 | |
stages: | |
- deploy | |
deploy_staging: | |
environment: staging | |
stage: deploy | |
script: | |
- which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) | |
- eval $(ssh-agent -s) | |
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store | |
- ssh-add <(echo -e “$SSH_PRIVATE_KEY”) | |
- gem install capistrano | |
- cap staging deploy | |
only: | |
- develop | |
deploy: | |
environment: production | |
stage: deploy | |
script: | |
- which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) | |
- eval $(ssh-agent -s) | |
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store | |
- ssh-add <(echo -e “$SSH_PRIVATE_KEY”) | |
- gem install capistrano | |
- cap staging deploy | |
only: | |
- master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think that in line 27 You should have
cap production deploy