1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-01 07:30:07 +02:00
copilot/legacy/circle.yml
Sérgio Ramos 8295bd6882 chore: initial lerna setup
this shall be a progressive process
2017-05-25 10:56:50 +01:00

52 lines
1.9 KiB
YAML

## Customize the test machine
machine:
pre:
- git config --global user.email "circleci@joyent.zone"
- git config --global user.name "circlebot"
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker
node:
version: 7.7.3
dependencies:
pre:
- sudo curl -L https://github.com/docker/compose/releases/download/1.8.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- yarn global add triton@4.15.0 || cat /home/ubuntu/.yarn-config/global/yarn-error.log
- echo '{"url":"https://eu-ams-1.api.joyent.com","account":"'$SDC_ACCOUNT'","keyId":"c3:30:35:9b:85:48:73:44:31:cc:4b:2e:6a:00:16:e2","name":"eu-ams-1","curr":true}' | triton profile create -f -
- triton env --docker eu-ams-1
- mkdir -p ${CIRCLE_TEST_REPORTS}/tap-xunit/
- echo -e "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
override:
- make && make install
# Install git-lfs - TODO: Move to make task
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
- sudo apt-get install git-lfs
- ssh git@github.com git-lfs-authenticate yldio/joyent-portal.git download
- git config credential.helper manager
- git lfs pull
test:
override:
- make -j2 lint-ci test-ci
deployment:
development:
branch: master
commands:
- ./bin/docker-login
- ./bin/on-changes-publish-ui
- make -j2 build
- make -j2 push
- ./bin/deploy
staging:
tag: /release.*/
commands:
- CIRCLE_BRANCH=staging ./bin/docker-login
- CIRCLE_BRANCH=staging ./bin/on-changes-publish-ui
- CIRCLE_BRANCH=staging make -j2 build
- CIRCLE_BRANCH=staging make -j2 push
- CIRCLE_BRANCH=staging ./bin/deploy