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

ci: make manifest publishing run in serial #1633

Merged
merged 1 commit into from
Feb 5, 2020
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
24 changes: 15 additions & 9 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ local multiarch_image(arch) = pipeline('docker-' + arch) + arch_image(arch) {
when: condition('exclude').tagMaster,
settings+: {
dry_run: true,
build_args: [ 'TOUCH_PROTOS=1' ]
build_args: ['TOUCH_PROTOS=1'],
},
}
for app in apps
Expand All @@ -101,7 +101,7 @@ local multiarch_image(arch) = pipeline('docker-' + arch) + arch_image(arch) {
depends_on: ['image-tag'],
when: condition('include').tagMaster,
settings+: {
build_args: [ 'TOUCH_PROTOS=1' ]
build_args: ['TOUCH_PROTOS=1'],
},
}
for app in apps
Expand All @@ -110,23 +110,29 @@ local multiarch_image(arch) = pipeline('docker-' + arch) + arch_image(arch) {
};

local manifest(apps) = pipeline('manifest') {
steps: [
{
steps: std.foldl(
function(acc, app) acc + [{
name: 'manifest-' + app,
image: 'plugins/manifest',
settings: {
// the target parameter is abused for the app's name,
// as it is unused in spec mode. See docker-manifest.tmpl
target: app,
spec: '.drone/docker-manifest.tmpl',
ignore_missing: true,
ignore_missing: false,
username: { from_secret: 'docker_username' },
password: { from_secret: 'docker_password' },
},
depends_on: ['clone'],
}
for app in apps
],
depends_on: ['clone'] + (
// Depend on the previous app, if any.
if std.length(acc) > 0
then [acc[std.length(acc) - 1].name]
else []
),
}],
apps,
[],
),
depends_on: [
'docker-%s' % arch
for arch in archs
Expand Down
5 changes: 2 additions & 3 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ steps:
- name: manifest-promtail
image: plugins/manifest
settings:
ignore_missing: true
password:
from_secret: docker_password
spec: .drone/docker-manifest.tmpl
Expand All @@ -519,7 +518,6 @@ steps:
- name: manifest-loki
image: plugins/manifest
settings:
ignore_missing: true
password:
from_secret: docker_password
spec: .drone/docker-manifest.tmpl
Expand All @@ -528,11 +526,11 @@ steps:
from_secret: docker_username
depends_on:
- clone
- manifest-promtail

- name: manifest-loki-canary
image: plugins/manifest
settings:
ignore_missing: true
password:
from_secret: docker_password
spec: .drone/docker-manifest.tmpl
Expand All @@ -541,6 +539,7 @@ steps:
from_secret: docker_username
depends_on:
- clone
- manifest-loki

trigger:
ref:
Expand Down