mercredi 11 avril 2018

Converting Travis.yml to circle.yml

I'm having a lot of trouble switching my build (EmberJS) from TravisCI to CircleCI. Here is my current travis.yml file, it's super simple, but does leverage some pull request info...any help is much appreciated.

# TravisCI deploy script for frontend Ember build.
---
language: node_js
node_js:
  - "6"

sudo: false
dist: trusty

addons:
  chrome: stable

cache:
  directories:
    - $HOME/.npm

deploy:
  - provider: script
    skip_cleanup: true
    before_script: cd frontend
    script: node_modules/.bin/ember deploy production --activate --verbose
    on:
      branch: frontend
  - provider: script
    skip_cleanup: true
    before_script: cd frontend
    script: node_modules/.bin/ember deploy staging --activate --verbose
    on:
      branch: frontend-staging

branches:
  only:
    - frontend
    - frontend-staging

# script:
#   - npm test
script:
  - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then node_modules/.bin/ember build; fi
  - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then npm install surge; fi

env:
  global:
    - JOBS=1

before_install:
  - npm config set spin false
  - cd frontend

after_success:
  - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then chmod ugo+x frontend/pr_deploy.sh; fi
  - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then frontend/pr_deploy.sh; fi




Aucun commentaire:

Enregistrer un commentaire