From a6ddee9b5df36a701fe9f7d2a38cc797d271ba82 Mon Sep 17 00:00:00 2001 From: Mark Newman Date: Thu, 14 Sep 2017 15:26:22 +0100 Subject: [PATCH] Migrate to CircleCI 2.0 --- .circleci/config.yml | 37 +++++++++++++++++++++++++++++++++++++ .ernest-ci | 3 ++- README.md | 9 +++------ circle.yml | 35 ----------------------------------- 4 files changed, 42 insertions(+), 42 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..0f8c4c5 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,37 @@ +version: 2 +jobs: + build: + machine: + image: circleci/classic:201709-01 + environment: + NATS_URI: nats://127.0.0.1:4222 + ROOTPATH: /home/circleci/.go_workspace/src/github.com/ernestio + NATS_URI_TEST: nats://127.0.0.1:4222 + GOBIN: /home/circleci/.go_workspace/bin + CURRENT_INSTANCE: http://ernest.local:80/ + JWT_SECRET: test + IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" + ERNEST_LOG_FILE: '/tmp/ernest.log' + ERNEST_APPLY_DELAY: 1 + ERNEST_CRYPTO_KEY: mMYlPIvI11z20H1BnBmB223355667788 + working_directory: /home/circleci/.go_workspace/src/github.com/ernestio/monit + steps: + - checkout + - run: + name: Setup Hosts File + command: echo 127.0.0.1 ernest.local | sudo tee -a /etc/hosts + - run: + name: Install Dependencies + command: make dev-deps + - run: + name: Code Analysis + command: make lint + - run: + name: Unit Tests + command: make test + - run: + name: Integration Tests + command: | + git clone -b f-circleci-v2-680 git@github.com:ernestio/toolset.git /tmp/toolset/ + cd /tmp/toolset/ernestci/ && bundle install + ruby /tmp/toolset/ernestci/run.rb $CIRCLE_WORKING_DIRECTORY/.ernest-ci diff --git a/.ernest-ci b/.ernest-ci index 8b13789..40b959f 100644 --- a/.ernest-ci +++ b/.ernest-ci @@ -1 +1,2 @@ - +ernest:f-micro-container-671 +config-store:f-micro-container-671 diff --git a/README.md b/README.md index 051a0d6..f11cdb8 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,14 @@ # Monit +master: [![CircleCI](https://circleci.com/gh/ernestio/monit/tree/master.svg?style=shield)](https://circleci.com/gh/ernestio/monit/tree/master) +develop: [![CircleCI](https://circleci.com/gh/ernestio/monit/tree/develop.svg?style=shield)](https://circleci.com/gh/ernestio/monit/tree/develop) + ## Synopsis This microservice listens to all `monitor.user` events that are fired off by the FSM. It allows users to listen to the event stream over SSE (Server Side Events) These events are collected into an inbox based on the monitor id passed by the user on an action. The inbox is opened on `service.create`, `service.delete` and closed on `service.create.done` and `service.delete.done`. If no inbox with the given ID exists when a user connects, one will be created. -## Build status - -* Master: [![CircleCI Master](https://circleci.com/gh/ernestio/monit/tree/master.svg?style=svg)](https://circleci.com/gh/ernestio/monit/tree/master) -* Develop: [![CircleCI Develop](https://circleci.com/gh/ernestio/monit/tree/develop.svg?style=svg)](https://circleci.com/gh/ernestio/monit/tree/develop) - - ## Installation ``` diff --git a/circle.yml b/circle.yml deleted file mode 100644 index b57cc2c..0000000 --- a/circle.yml +++ /dev/null @@ -1,35 +0,0 @@ -machine: - pre: - - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0 - - touch /tmp/ernest.log && chmod 666 /tmp/ernest.log - - curl -L https://github.com/docker/compose/releases/download/1.10.0/docker-compose-`uname -s`-`uname -m` > /home/ubuntu/bin/docker-compose - - chmod +x /home/ubuntu/bin/docker-compose - services: - - docker - environment: - NATS_URI: nats://127.0.0.1:4222 - NATS_URI_TEST: nats://127.0.0.1:4222 - GOBIN: /home/ubuntu/.go_workspace/bin - CURRENT_INSTANCE: http://ernest.local:80/ - JWT_SECRET: test - IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" - ERNEST_LOG_FILE: '/tmp/ernest.log' - ROOTPATH: /home/ubuntu/.go_workspace/src/github.com/ernestio/ - ERNEST_CRYPTO_KEY: mMYlPIvI11z20H1BnBmB223355667788 - - hosts: - ernest.local: 127.0.0.1 - - -dependencies: - pre: - - make dev-deps - - mkdir -p $ROOTPATH/ - - rm -rf $ROOTPATH/toolset/ && git clone git@github.com:ernestio/toolset.git $ROOTPATH/toolset/ - - cd $ROOTPATH/toolset/ernestci/ && bundle install - -test: - override: - - make test - - ruby $ROOTPATH/toolset/ernestci/run.rb .ernest-ci - - make lint