Skip to content

Commit

Permalink
chore(packaging): deploy from drone
Browse files Browse the repository at this point in the history
Moves the continuous deploy call from CircleCI to drone, because the images are
now built there.
  • Loading branch information
sh0rez committed Sep 9, 2019
1 parent db8880e commit 3719f51
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 15 deletions.
13 changes: 0 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ workflows:
requires: [ lint, test ]
filters: { <<: *only-tags }

- deploy:
filters: {<<: *tag-or-master}

- test-helm:
requires: [ lint, test ]
filters: {<<: *tags}
Expand Down Expand Up @@ -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
Expand Down
20 changes: 19 additions & 1 deletion .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ local manifest(apps) = pipeline('manifest') {
depends_on: [
'docker-%s' % arch
for arch in archs
] + ['check'],
],
};

local drone = [
Expand All @@ -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'
]
}
],
}
];

{
Expand Down
22 changes: 21 additions & 1 deletion .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ depends_on:
- docker-amd64
- docker-arm64
- docker-arm
- check
kind: pipeline
name: manifest
steps:
Expand Down Expand Up @@ -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*

0 comments on commit 3719f51

Please sign in to comment.