From 81ce5f2e584f6b06cbab70698adc32d5814e7af7 Mon Sep 17 00:00:00 2001 From: Christopher Poile Date: Tue, 11 Jun 2019 15:38:16 -0400 Subject: [PATCH] updating circleci yml (#18) --- .circleci/config.yml | 85 ++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 58 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4ec2398..1c26fb2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,82 +1,51 @@ version: 2.1 -executors: - default: - docker: - - image: circleci/golang:1.12 -jobs: - lint: - executor: - name: default - steps: - - checkout - - run: make check-style - - test: - executor: - name: default - steps: - - checkout - - run: make test - - build: - executor: - name: default - steps: - - checkout - - run: make dist - - persist_to_workspace: - root: . - paths: ./dist/*.tar.gz - - publish-github-release: - docker: - - image: cibuilds/github:0.12 - steps: - - attach_workspace: - at: . - - run: - name: "Publish Release on GitHub" - command: | - ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./dist/com.mattermost.aws-sns-*.tar.gz +orbs: + plugin-ci: mattermost/plugin-ci@volatile workflows: - version: 2 - untagged-build: - jobs: - - lint - - test - tagged-build: + ci-build: jobs: - - lint: + - plugin-ci/lint: filters: tags: only: /^v.*/ - branches: - ignore: /.*/ - - test: + - plugin-ci/test: + filters: + tags: + only: /^v.*/ + - plugin-ci/build: filters: tags: only: /^v.*/ + - plugin-ci/deploy-ci: + filters: branches: - ignore: /.*/ - - build: + only: master + context: plugin-ci requires: - - lint - - test + - plugin-ci/lint + - plugin-ci/test + - plugin-ci/build + - plugin-ci/deploy-release: filters: tags: only: /^v.*/ branches: ignore: /.*/ - - publish-github-release: - context: matterbuild-github-token + context: plugin-ci requires: - - lint - - test - - build + - plugin-ci/lint + - plugin-ci/test + - plugin-ci/build + - plugin-ci/deploy-release-github: filters: tags: only: /^v.*/ branches: ignore: /.*/ + context: matterbuild-github-token + requires: + - plugin-ci/lint + - plugin-ci/test + - plugin-ci/build