Skip to content

Instantly share code, notes, and snippets.

@jeromecoupe
Last active August 2, 2019 11:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeromecoupe/db9f6edb5b7c389b38da75f2b023efdd to your computer and use it in GitHub Desktop.
Save jeromecoupe/db9f6edb5b7c389b38da75f2b023efdd to your computer and use it in GitHub Desktop.
Minimal Bitbucket Pipelines
# Only use spaces to indent your .yml configuration.
# $SSH_USER $ROOT_PATH $SSH_IP:$SSH_PATH are environment variables
# image
image: node:latest
# pipelines
pipelines:
default:
- step:
caches:
- node
name: run tests
script:
- npm install
- npm test
branches:
master:
- step:
caches:
- node
name: deploy to production
deployment: production
script:
- apt-get update
- apt-get -q -y install rsync
- npm install
- npm test
- npm run build
- rsync -clvrz --delete -e "ssh -l $SSH_USER" $ROOT_PATH $SSH_IP:$SSH_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment