diff --git a/.circleci/config.yml b/.circleci/config.yml index 5f113ea99e2f2..4cd3541d1f9ee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,9 +37,6 @@ workflows: requires: [ lint, test ] filters: { <<: *only-tags } - - deploy: - filters: {<<: *tag-or-master} - - test-helm: requires: [ lint, test ] filters: {<<: *tags} @@ -113,16 +110,6 @@ jobs: name: github release command: make BUILD_IN_CONTAINER=false publish - deploy: - <<: *defaults - steps: - - checkout - - run: | - curl -s --header "Content-Type: application/json" \ - --data "{\"build_parameters\": {\"CIRCLE_JOB\": \"deploy\", \"IMAGE_NAMES\": \"$(make print-images)\"}}" \ - --request POST \ - https://circleci.com/api/v1.1/project/github/raintank/deployment_tools/tree/master?circle-token=$CIRCLE_TOKEN - test-helm: environment: CT_VERSION: 2.3.3 diff --git a/.drone/drone.jsonnet b/.drone/drone.jsonnet index 2422acd76db33..097493f8389fe 100644 --- a/.drone/drone.jsonnet +++ b/.drone/drone.jsonnet @@ -96,7 +96,7 @@ local manifest(apps) = pipeline('manifest') { depends_on: [ 'docker-%s' % arch for arch in archs - ] + ['check'], + ], }; local drone = [ @@ -118,6 +118,24 @@ local drone = [ manifest(['promtail', 'loki', 'loki-canary']) { trigger: condition('include').tagMaster, }, +] + [ + pipeline("deploy") { + trigger: condition('include').tagMaster, + depends_on: ["manifest"], + steps: [ + { + name: "trigger", + image: 'alpine', + environment: { + CIRLCE_TOKEN: {from_secret: "circle_token"} + }, + commands: [ + "apk add --no-cache curl", + 'curl -s --header "Content-Type: application/json" --data "{\"build_parameters\": {\"CIRCLE_JOB\": \"deploy\", \"IMAGE_NAMES\": \"$(make print-images)\"}}" --request POST https://circleci.com/api/v1.1/project/github/raintank/deployment_tools/tree/master?circle-token=$CIRCLE_TOKEN' + ] + } + ], + } ]; { diff --git a/.drone/drone.yml b/.drone/drone.yml index f273596ba91dc..3d112f8aff0a1 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -378,7 +378,6 @@ depends_on: - docker-amd64 - docker-arm64 - docker-arm -- check kind: pipeline name: manifest steps: @@ -423,3 +422,24 @@ trigger: include: - refs/heads/master - refs/tags/v* +--- +depends_on: +- manifest +kind: pipeline +name: deploy +steps: +- commands: + - apk add --no-cache curl + - 'curl -s --header "Content-Type: application/json" --data "{"build_parameters": + {"CIRCLE_JOB": "deploy", "IMAGE_NAMES": "$(make print-images)"}}" --request POST + https://circleci.com/api/v1.1/project/github/raintank/deployment_tools/tree/master?circle-token=$CIRCLE_TOKEN' + environment: + CIRLCE_TOKEN: + from_secret: circle_token + image: alpine + name: trigger +trigger: + ref: + include: + - refs/heads/master + - refs/tags/v*