2016-10-17 19:56:01 +03:00
|
|
|
## Customize the test machine
|
|
|
|
machine:
|
2016-10-20 19:15:43 +03:00
|
|
|
pre:
|
2016-10-24 13:01:03 +03:00
|
|
|
- git config --global user.email "circleci@joyent.zone"
|
|
|
|
- git config --global user.name "circlebot"
|
2016-10-21 19:09:14 +03:00
|
|
|
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
|
2016-10-17 19:56:01 +03:00
|
|
|
|
2016-10-18 12:54:32 +03:00
|
|
|
services:
|
|
|
|
- docker
|
2016-10-19 17:24:46 +03:00
|
|
|
node:
|
2017-03-21 16:41:30 +02:00
|
|
|
version: 7.7.3
|
2016-10-18 12:54:32 +03:00
|
|
|
|
2016-10-18 13:00:25 +03:00
|
|
|
dependencies:
|
2016-10-21 18:44:35 +03:00
|
|
|
pre:
|
2016-10-26 16:36:42 +03:00
|
|
|
- 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
|
2016-10-26 12:58:24 +03:00
|
|
|
- sudo chmod +x /usr/local/bin/docker-compose
|
2017-02-23 15:53:43 +02:00
|
|
|
- yarn global add triton@4.15.0 || cat /home/ubuntu/.yarn-config/global/yarn-error.log
|
2016-10-21 19:05:06 +03:00
|
|
|
- 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 -
|
2016-11-23 14:11:42 +02:00
|
|
|
- triton env --docker eu-ams-1
|
2016-10-27 19:43:24 +03:00
|
|
|
- mkdir -p ${CIRCLE_TEST_REPORTS}/tap-xunit/
|
2017-01-03 15:53:24 +02:00
|
|
|
- echo -e "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
2016-10-27 18:26:41 +03:00
|
|
|
override:
|
2016-10-27 18:50:47 +03:00
|
|
|
- make && make install
|
2017-02-20 13:34:36 +02:00
|
|
|
# Install git-lfs - TODO: Move to make task
|
2017-02-08 19:35:53 +02:00
|
|
|
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
|
2017-02-16 13:11:59 +02:00
|
|
|
- sudo apt-get install git-lfs
|
2017-02-09 12:20:25 +02:00
|
|
|
- ssh git@github.com git-lfs-authenticate yldio/joyent-portal.git download
|
2017-02-17 19:49:38 +02:00
|
|
|
- git config credential.helper manager
|
2017-02-08 19:35:53 +02:00
|
|
|
- git lfs pull
|
2016-10-18 13:00:25 +03:00
|
|
|
|
|
|
|
test:
|
2016-10-27 18:26:41 +03:00
|
|
|
override:
|
2016-10-31 16:17:08 +02:00
|
|
|
- make -j2 lint-ci test-ci
|
2016-10-17 19:56:01 +03:00
|
|
|
|
2016-10-18 13:00:25 +03:00
|
|
|
deployment:
|
2017-03-21 16:41:30 +02:00
|
|
|
development:
|
2016-10-18 13:00:25 +03:00
|
|
|
branch: master
|
|
|
|
commands:
|
2016-10-31 19:09:00 +02:00
|
|
|
- ./bin/docker-login
|
2017-01-06 16:47:36 +02:00
|
|
|
- ./bin/on-changes-publish-ui
|
2017-01-18 14:01:51 +02:00
|
|
|
- make -j2 build
|
|
|
|
- make -j2 push
|
2016-10-20 16:55:05 +03:00
|
|
|
- ./bin/deploy
|
2017-03-21 16:41:30 +02:00
|
|
|
staging:
|
2017-04-05 23:21:39 +03:00
|
|
|
tag: /release.*/
|
2017-03-21 16:41:30 +02:00
|
|
|
commands:
|
2017-04-05 23:21:39 +03:00
|
|
|
- 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
|