Skip to content

Instantly share code, notes, and snippets.

@pyldin601
Created September 20, 2018 14:22
Show Gist options
  • Save pyldin601/ea59bef66e22039fa8dc114427e55eab to your computer and use it in GitHub Desktop.
Save pyldin601/ea59bef66e22039fa8dc114427e55eab to your computer and use it in GitHub Desktop.
Bitbucket pipelines for docker swarm service with deploy via SSH.
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