Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
dominikwilkowski committed Nov 15, 2017
2 parents 3c65311 + 3533f2a commit b39c98495bc09e52bc906802a666837271a5c7d6
Showing with 79 additions and 49 deletions.
  1. +79 −0 .circleci/config.yml
  2. +0 −49 circle.yml
View
@@ -0,0 +1,79 @@
# Node CircleCI 2.0 configuration file to DTA cloud 2.0
version: 2
jobs:
# DEPLOY-STAGING JOB
# installing dependencies, building assets and deploying to staging
deploy-staging:
docker:
- image: circleci/node:8.9.1
steps:
- checkout # get the files from the repo (why would you ever not want the files????)
- run: rm -rf node_modules # delete node_modules folder because we need to bust the cache
- run: npm install # duh
- run: npm run bootstrap # installing all dependencies of all packages
- run: npm run build # build all packages
- run: npm test # run all tests
- run: rm -rf node_modules # delete node_modules folder again to not push it to cf
- run: find . -name "lib" -exec rm -rf '{}' + # removing all lib/ folders
- run: find . -name "src" -exec rm -rf '{}' + # removing all src/ folder
# install packages: cf-cli and tree
- run: sudo apt-get install apt-transport-https
- run: wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
- run: echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
- run: sudo apt-get update
- run: sudo apt-get install tree
- run: sudo apt-get install cf-cli
- run: cf version # log what version we are running
- run: cf login -a api.system.y.cld.gov.au -o $CF_ORG_STAGING -s $CF_SPACE_STAGING -u $CF_USER_STAGING -p $CF_PASSWORD_STAGING
- run: tree -C # log all files before we push
- run: cf push -f manifest.yml
# DEPLOY-STAGING JOB
# installing dependencies, building assets and deploying to production
deploy-prod:
docker:
- image: circleci/node:8.9.1
steps:
- checkout # get the files from the repo (why would you ever not want the files????)
- run: rm -rf node_modules # delete node_modules folder because we need to bust the cache
- run: npm install # duh
- run: npm run bootstrap # installing all dependencies of all packages
- run: npm run build # build all packages
- run: npm test # run all tests
- run: rm -rf node_modules # delete node_modules folder again to not push it to cf
- run: find . -name "lib" -exec rm -rf '{}' + # removing all lib/ folders
- run: find . -name "src" -exec rm -rf '{}' + # removing all src/ folder
# install packages: cf-cli and tree
- run: sudo apt-get install apt-transport-https
- run: wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
- run: echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
- run: sudo apt-get update
- run: sudo apt-get install tree
- run: sudo apt-get install cf-cli
- run: cf version # log what version we are running
- run: cf login -a api.system.b.cld.gov.au -o $CF_ORG_PROD -s $CF_SPACE_PROD -u $CF_USER_PROD -p $CF_PASSWORD_PROD
- run: tree -C # log all files before we push
- run: cf push -f manifest.yml
# OUR WORKFLOW
# this is where we orchestrate our jobs
workflows:
version: 2
testing-deploying:
jobs:
- deploy-staging: # run deploy staging
filters:
branches:
only: develop # and only on the `develop` branch
- deploy-prod: # run deploy production
filters:
branches:
only: master # and only on the `master` branch
View

This file was deleted.

Oops, something went wrong.

0 comments on commit b39c984

Please sign in to comment.