From 15bacaa1ba5c2183a4264b04823c94a872d311bf Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Tue, 18 Jun 2024 17:28:49 +0200 Subject: [PATCH 1/2] ci: do not create latest tag on master --- .drone.star | 51 ++++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/.drone.star b/.drone.star index 62790ec719..37333e0860 100644 --- a/.drone.star +++ b/.drone.star @@ -1693,30 +1693,25 @@ def releaseDockerManifest(ctx, repo, build_type): spec = "manifest.production.tmpl" spec_latest = "manifest.production-latest.tmpl" - return { - "kind": "pipeline", - "type": "docker", - "name": "manifest-%s" % build_type, - "platform": { - "os": "linux", - "arch": "amd64", - }, - "steps": [ - { - "name": "execute", - "image": PLUGINS_MANIFEST, - "settings": { - "username": { - "from_secret": "docker_username", - }, - "password": { - "from_secret": "docker_password", - }, - "spec": "ocis/docker/%s" % spec, - "auto_tag": True if ctx.build.event == "tag" else False, - "ignore_missing": True, + steps = [ + { + "name": "execute", + "image": PLUGINS_MANIFEST, + "settings": { + "username": { + "from_secret": "docker_username", }, + "password": { + "from_secret": "docker_password", + }, + "spec": "ocis/docker/%s" % spec, + "auto_tag": True if ctx.build.event == "tag" else False, + "ignore_missing": True, }, + }, + ] + if len(ctx.build.ref.split("-")) == 1: + steps.append( { "name": "execute-latest", "image": PLUGINS_MANIFEST, @@ -1737,7 +1732,17 @@ def releaseDockerManifest(ctx, repo, build_type): ], }, }, - ], + ) + + return { + "kind": "pipeline", + "type": "docker", + "name": "manifest-%s" % build_type, + "platform": { + "os": "linux", + "arch": "amd64", + }, + "steps": steps, "trigger": { "ref": [ "refs/heads/master", From a5d4d16d5ce7bf8658d18b8e8e788003cfc7efb3 Mon Sep 17 00:00:00 2001 From: Artur Neumann Date: Tue, 18 Jun 2024 17:45:00 +0200 Subject: [PATCH 2/2] ci: fix docker version name --- .drone.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.star b/.drone.star index 37333e0860..e7b1f09452 100644 --- a/.drone.star +++ b/.drone.star @@ -1309,7 +1309,7 @@ def dockerReleases(ctx): def dockerRelease(ctx, arch, repo, build_type): build_args = [ "REVISION=%s" % (ctx.build.commit), - "VERSION=%s" % (ctx.build.ref.replace("refs/tags/", "") if ctx.build.event == "tag" else "latest"), + "VERSION=%s" % (ctx.build.ref.replace("refs/tags/", "") if ctx.build.event == "tag" else "master"), ] depends_on = getPipelineNames(testOcisAndUploadResults(ctx) + testPipelines(ctx))