Skip to content

Commit

Permalink
ci: switch from Travis to CircleCI (carbon-design-system#1551)
Browse files Browse the repository at this point in the history
* ci: switch from Travis to CircleCI

* chore: un-comment deploy steps and switch badge
  • Loading branch information
joshblack authored Nov 12, 2018
1 parent 0f06c93 commit f860286
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 43 deletions.
57 changes: 57 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:8.12
working_directory: ~/repo
steps:
- checkout
- run:
name: Install yarn
command: |
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.12.3
export PATH=$HOME/.yarn/bin:$PATH
- run:
name: Install dependencies from offline mirror
command: yarn install --offline
- run:
name: Run Continuous Integration checks
command: yarn ci-check
- run:
name: Semantic Release
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
yarn semantic-release
fi
- deploy:
name: deploy to IBM Cloud
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
# Install `ibmcloud` CLI
curl -fsSL https://clis.ng.bluemix.net/install/linux | sh
# Login and push staging manifest
ibmcloud login \
--apikey $CLOUD_API_KEY \
-a https://api.ng.bluemix.net \
-o carbon-design-system \
-s production
ibmcloud cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org
ibmcloud cf install-plugin blue-green-deploy -f -r CF-Community
# Default storybook build
yarn build-storybook
ibmcloud cf blue-green-deploy carbon-storybook \
-f .circleci/manifest.yml \
--delete-old-apps
# Experimental storybook build
rm -rf storybook-static
CARBON_USE_EXPERIMENTAL_FEATURES=true yarn build-storybook
ibmcloud cf blue-green-deploy carbon-storybook-experimental \
-f .circleci/manifest.experimental.yml \
--delete-old-apps
fi
8 changes: 8 additions & 0 deletions .circleci/manifest.experimental.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
applications:
- name: carbon-storybook-experimental
memory: 64M
buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git
routes:
- route: react-experimental.carbondesignsystem.com
- route: carbon-react-storybook-experimental.mybluemix.net
2 changes: 1 addition & 1 deletion manifest.yml → .circleci/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ applications:
memory: 64M
buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git
routes:
- route: carbon-react-storybook.mybluemix.net
- route: react.carbondesignsystem.com
- route: carbon-react-storybook.mybluemix.net
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Carbon Components React

[![Build Status](https://travis-ci.org/IBM/carbon-components-react.svg?branch=master)](https://travis-ci.org/IBM/carbon-components-react)
[![CircleCI](https://circleci.com/gh/IBM/carbon-components-react.svg?style=shield)](https://circleci.com/gh/IBM/carbon-components-react)
[![All Contributors](https://img.shields.io/badge/all_contributors-64-orange.svg?style=flat-square)](#contributors)
[![Greenkeeper badge](https://badges.greenkeeper.io/IBM/carbon-components-react.svg)](https://greenkeeper.io/)

Expand Down

0 comments on commit f860286

Please sign in to comment.