From ee2827f710454997a75a0ecf0cd718a3ff213ea0 Mon Sep 17 00:00:00 2001 From: Alvin Huang <17609145+alvin-huang@users.noreply.github.com> Date: Wed, 29 Apr 2020 14:37:18 -0400 Subject: [PATCH] add API trigger for helm charts index (#281) --- .circleci/config.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 357aa40..9d497c0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,8 +6,30 @@ jobs: - checkout - run: make test-image - run: make test-unit + update-helm-charts-index: + docker: + - image: circleci/golang:latest + steps: + - run: + name: update helm-charts index + command: | + curl --show-error --silent --fail --user "${CIRCLE_TOKEN}:" \ + -X POST \ + -H 'Content-Type: application/json' \ + -H 'Accept: application/json' \ + -d "{\"branch\": \"master\",\"parameters\":{\"SOURCE_REPO\": \"${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}\",\"SOURCE_TAG\": \"${CIRCLE_TAG}\"}}" \ + "${CIRCLE_ENDPOINT}/${CIRCLE_PROJECT}/pipeline" workflows: version: 2 build_and_test: jobs: - - bats-unit-test + - bats-unit-test + update-helm-charts-index: + jobs: + - update-helm-charts-index: + context: helm-charts-trigger + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/