mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 20:29:54 -06:00
Merge pull request #9401 from owncloud/nolatestonprelease
ci: do not build "latest" docker tag on prerelease
This commit is contained in:
53
.drone.star
53
.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))
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user