From 448437c342df630a01d54845521bd09c1e9619f5 Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Wed, 27 Jan 2016 20:18:35 +0100 Subject: [PATCH] feat(circleci): triggers grafana packer after successful build Only triggers for main grafana repo (not forks) and when the master branch is built. --- circle.yml | 7 +++++++ trigger_grafana_packer.sh | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100755 trigger_grafana_packer.sh diff --git a/circle.yml b/circle.yml index a3280ae18e5..22dab8ab893 100644 --- a/circle.yml +++ b/circle.yml @@ -27,3 +27,10 @@ test: # js tests - ./node_modules/grunt-cli/bin/grunt test - npm run coveralls + +deployment: + master: + branch: master + owner: grafana + commands: + - ./trigger_grafana_packer.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN} diff --git a/trigger_grafana_packer.sh b/trigger_grafana_packer.sh new file mode 100755 index 00000000000..e4a33a00221 --- /dev/null +++ b/trigger_grafana_packer.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +_circle_token=$1 + +trigger_build_url=https://circleci.com/api/v1/project/grafana/grafana-packer/tree/master?circle-token=${_circle_token} + +curl \ +--header "Accept: application/json" \ +--header "Content-Type: application/json" \ +--request POST ${trigger_build_url} \ No newline at end of file