-
-
Save djom202/f37425a52677887c58fc519c3e690093 to your computer and use it in GitHub Desktop.
Bitbucket pipeline example for JS projects
This file contains 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:7.0 #node v7 | |
clone: # the 'clone' section | |
depth: 1 # latest commit only | |
pipelines: | |
default: | |
- step: | |
script: | |
- npm i -g yarn | |
- yarn | |
- yarn run generate:config | |
- yarn run lint | |
- yarn test | |
branches: | |
dev: #only for dev branch | |
- step: | |
script: | |
- apt-get update | |
- apt-get install -y zip | |
- npm i -g yarn | |
- yarn | |
- yarn run generate:config | |
- yarn run lint | |
- yarn test | |
- yarn run build | |
- mkdir -p ~/.ssh | |
- echo $KNOWN_HOST >> ~/.ssh/known_hosts | |
- echo $SSH_KEY >> ~/.ssh/id_rsa.temp | |
- base64 -d -i ~/.ssh/id_rsa.temp > ~/.ssh/id_rsa | |
- chmod 600 ~/.ssh/id_rsa | |
- yarn run deploy:pipeline | |
qa: #only for qa branch | |
- step: | |
script: | |
- apt-get update | |
- apt-get install -y zip | |
- npm i -g yarn | |
- yarn | |
- yarn run generate:config | |
- yarn run lint | |
- yarn test | |
- yarn run build | |
- mkdir -p ~/.ssh | |
- echo $KNOWN_HOST >> ~/.ssh/known_hosts | |
- echo $SSH_KEY >> ~/.ssh/id_rsa.temp | |
- base64 -d -i ~/.ssh/id_rsa.temp > ~/.ssh/id_rsa | |
- chmod 600 ~/.ssh/id_rsa | |
- yarn run deploy:pipeline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment