bitbucket-pipelines.yml created online with Bitbucket

This commit is contained in:
Tommy Adamos
2019-01-23 18:04:49 +00:00
parent ce100ee4e1
commit 837adb3d35

30
bitbucket-pipelines.yml Normal file
View File

@@ -0,0 +1,30 @@
image: node:latest
pipelines:
default:
- step:
script:
- echo "nothing to do"
branches:
master:
- step:
caches:
- node
script:
- umask 0022
- npm install
- node_modules/.bin/ng build --prod
- tar cfz /tmp/$BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG.tgz -C dist/hima/ .
- scp /tmp/$BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG.tgz $DEPLOYMENT_USER@$TESTING_HOST:/tmp/
- ssh $DEPLOYMENT_USER@$TESTING_HOST "sudo /usr/local/bin/deploy $BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG $BITBUCKET_BRANCH"
testing:
- step:
caches:
- node
script:
- umask 0022
- npm install
- node_modules/.bin/ng build --prod
- tar cfz /tmp/$BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG.tgz -C dist/hima/ .
- scp /tmp/$BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG.tgz $DEPLOYMENT_USER@$TESTING_HOST:/tmp/
- ssh $DEPLOYMENT_USER@$TESTING_HOST "sudo /usr/local/bin/deploy $BITBUCKET_BRANCH-$BITBUCKET_REPO_SLUG $BITBUCKET_BRANCH"