diff --git a/.drone/drone.jsonnet b/.drone/drone.jsonnet index aa35b3e6f6e8..a43b131c2849 100644 --- a/.drone/drone.jsonnet +++ b/.drone/drone.jsonnet @@ -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 @@ -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 @@ -110,8 +110,8 @@ 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: { @@ -119,14 +119,20 @@ local manifest(apps) = pipeline('manifest') { // 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 diff --git a/.drone/drone.yml b/.drone/drone.yml index 870cd025affc..d159080238a8 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -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 @@ -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 @@ -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 @@ -541,6 +539,7 @@ steps: from_secret: docker_username depends_on: - clone + - manifest-loki trigger: ref: