Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix drone deploy job #1232

Merged
merged 1 commit into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
ci: fix drone deploy job
The deploy job stopped working for some unknown reason. This commit
fixes it by moving the deploy script to its own file.
  • Loading branch information
rfratto committed Nov 5, 2019
commit f89dd8165d809699ff72b58677c7a28c9c65dcb6
32 changes: 16 additions & 16 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ local docker(arch, app) = {
},
};

local arch_image(arch,tags='') = {
local arch_image(arch, tags='') = {
platform: {
os: 'linux',
arch: arch,
Expand All @@ -59,8 +59,8 @@ local arch_image(arch,tags='') = {
}],
};

local fluentbit() = pipeline('fluent-bit-amd64') + arch_image('amd64','latest,master') {
steps+: [
local fluentbit() = pipeline('fluent-bit-amd64') + arch_image('amd64', 'latest,master') {
steps+: [
// dry run for everything that is not tag or master
docker('amd64', 'fluent-bit') {
depends_on: ['image-tag'],
Expand All @@ -69,7 +69,7 @@ local fluentbit() = pipeline('fluent-bit-amd64') + arch_image('amd64','latest,ma
dry_run: true,
repo: 'grafana/fluent-bit-plugin-loki',
},
}
},
] + [
// publish for tag or master
docker('amd64', 'fluent-bit') {
Expand All @@ -78,7 +78,7 @@ local fluentbit() = pipeline('fluent-bit-amd64') + arch_image('amd64','latest,ma
settings+: {
repo: 'grafana/fluent-bit-plugin-loki',
},
}
},
],
depends_on: ['check'],
};
Expand Down Expand Up @@ -130,8 +130,8 @@ local manifest(apps) = pipeline('manifest') {
local drone = [
pipeline('check') {
workspace: {
base: "/src",
path: "loki"
base: '/src',
path: 'loki',
},
steps: [
make('test', container=false) { depends_on: ['clone'] },
Expand All @@ -144,28 +144,28 @@ local drone = [
multiarch_image(arch)
for arch in archs
] + [
fluentbit()
fluentbit(),
] + [
manifest(['promtail', 'loki', 'loki-canary']) {
trigger: condition('include').tagMaster,
},
] + [
pipeline("deploy") {
pipeline('deploy') {
trigger: condition('include').tagMaster,
depends_on: ["manifest"],
depends_on: ['manifest'],
steps: [
{
name: "trigger",
name: 'trigger',
image: 'grafana/loki-build-image:%s' % build_image_version,
environment: {
CIRCLE_TOKEN: {from_secret: "circle_token"}
CIRCLE_TOKEN: { from_secret: 'circle_token' },
},
commands: [
'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'
]
}
'./tools/deploy.sh',
],
},
],
}
},
];

{
Expand Down
Loading