Skip to content

Instantly share code, notes, and snippets.

@MadFaill
Forked from pyldin601/bitbucket-pipelines.yml
Created August 5, 2019 07:32
Show Gist options
  • Save MadFaill/59a5e674fdcc668bea3f812603db11f5 to your computer and use it in GitHub Desktop.
Save MadFaill/59a5e674fdcc668bea3f812603db11f5 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