Created
September 20, 2018 14:22
-
-
Save pyldin601/ea59bef66e22039fa8dc114427e55eab to your computer and use it in GitHub Desktop.
Bitbucket pipelines for docker swarm service with deploy via SSH.
This file contains hidden or 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: node | |
pipelines: | |
branches: | |
staging: | |
- step: | |
script: | |
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | |
- make TAG=staging docker-build docker-push | |
- step: | |
deployment: staging | |
script: | |
- make DEPLOY_HOST=$STAGING_DEPLOY_HOST TAG=staging deploy | |
production: | |
- step: | |
script: | |
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | |
- make TAG=production docker-build docker-push | |
- step: | |
deployment: production | |
script: | |
- make DEPLOY_HOST=$PRODUCTION_DEPLOY_HOST TAG=production deploy | |
master: | |
- step: | |
script: | |
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | |
- make docker-build docker-push | |
options: | |
docker: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment