Skip to content

Commit

Permalink
Merge pull request #9400 from owncloud/artifacts-latest
Browse files Browse the repository at this point in the history
ci: use latest docker for tags and add master tag
  • Loading branch information
individual-it committed Jun 18, 2024
2 parents 73c0b2a + da59508 commit 1b23910
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 3 deletions.
24 changes: 23 additions & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": [
Expand Down
11 changes: 11 additions & 0 deletions ocis/docker/manifest-latest.tmpl
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions ocis/docker/manifest.production-latest.tmpl
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ocis/docker/manifest.production.tmpl
Original file line number Diff line number Diff line change
@@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion ocis/docker/manifest.tmpl
Original file line number Diff line number Diff line change
@@ -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}}
Expand Down

0 comments on commit 1b23910

Please sign in to comment.