diff --git a/.drone.star b/.drone.star index 533aca9845c..ea65d25c4ee 100644 --- a/.drone.star +++ b/.drone.star @@ -1688,8 +1688,10 @@ def licenseCheck(ctx): def releaseDockerManifest(repo, build_type): spec = "manifest.tmpl" + spec_latest = "manifest-latest.tmpl" if "rolling" not in repo: - spec = "manifest-production.tmpl" + spec = "manifest.production.tmpl" + spec_latest = "manifest.production-latest.tmpl" return { "kind": "pipeline", @@ -1715,6 +1717,26 @@ def releaseDockerManifest(repo, build_type): "ignore_missing": True, }, }, + { + "name": "execute-latest", + "image": PLUGINS_MANIFEST, + "settings": { + "username": { + "from_secret": "docker_username", + }, + "password": { + "from_secret": "docker_password", + }, + "spec": "ocis/docker/%s" % spec_latest, + "auto_tag": True, + "ignore_missing": True, + }, + "when": { + "ref": [ + "refs/tags/v*", + ], + }, + }, ], "trigger": { "ref": [ diff --git a/ocis/docker/manifest-latest.tmpl b/ocis/docker/manifest-latest.tmpl new file mode 100644 index 00000000000..5893e1d9b53 --- /dev/null +++ b/ocis/docker/manifest-latest.tmpl @@ -0,0 +1,11 @@ +image: owncloud/ocis-rolling:latest +manifests: + - image: owncloud/ocis-rolling:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - image: owncloud/ocis-rolling:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 + platform: + architecture: arm64 + variant: v8 + os: linux diff --git a/ocis/docker/manifest.production-latest.tmpl b/ocis/docker/manifest.production-latest.tmpl new file mode 100644 index 00000000000..4d06b3e225e --- /dev/null +++ b/ocis/docker/manifest.production-latest.tmpl @@ -0,0 +1,11 @@ +image: owncloud/ocis:latest +manifests: + - image: owncloud/ocis:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - image: owncloud/ocis:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 + platform: + architecture: arm64 + variant: v8 + os: linux diff --git a/ocis/docker/manifest.production.tmpl b/ocis/docker/manifest.production.tmpl index 10c45ca1126..29428742cf1 100644 --- a/ocis/docker/manifest.production.tmpl +++ b/ocis/docker/manifest.production.tmpl @@ -1,4 +1,4 @@ -image: owncloud/ocis:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +image: owncloud/ocis:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}master{{/if}} {{#if build.tags}} tags: {{#each build.tags}} diff --git a/ocis/docker/manifest.tmpl b/ocis/docker/manifest.tmpl index 5df44182a1e..71ac9aad6e8 100644 --- a/ocis/docker/manifest.tmpl +++ b/ocis/docker/manifest.tmpl @@ -1,4 +1,4 @@ -image: owncloud/ocis-rolling:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +image: owncloud/ocis-rolling:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}master{{/if}} {{#if build.tags}} tags: {{#each build.tags}}