Adjust manifest to prevent tagging latest on rcs (#22811)
This commit is contained in:
parent
6cb76bf1df
commit
54d7435d28
3 changed files with 140 additions and 2 deletions
134
.drone.yml
134
.drone.yml
|
@ -985,7 +985,10 @@ depends_on:
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
|
include:
|
||||||
- "refs/tags/**"
|
- "refs/tags/**"
|
||||||
|
exclude:
|
||||||
|
- "refs/tags/**-rc*"
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- cron
|
- cron
|
||||||
|
@ -1033,6 +1036,68 @@ steps:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: docker-linux-amd64-release-candidate-version
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- testing-amd64
|
||||||
|
- testing-arm64
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
ref:
|
||||||
|
- "refs/tags/**-rc*"
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- cron
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: fetch-tags
|
||||||
|
image: docker:git
|
||||||
|
pull: always
|
||||||
|
commands:
|
||||||
|
- git config --global --add safe.directory /drone/src
|
||||||
|
- git fetch --tags --force
|
||||||
|
|
||||||
|
- name: publish
|
||||||
|
image: techknowlogick/drone-docker:latest
|
||||||
|
pull: always
|
||||||
|
settings:
|
||||||
|
tags: ${DRONE_TAG##v}-linux-amd64
|
||||||
|
repo: gitea/gitea
|
||||||
|
build_args:
|
||||||
|
- GOPROXY=https://goproxy.io
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
- name: publish-rootless
|
||||||
|
image: techknowlogick/drone-docker:latest
|
||||||
|
settings:
|
||||||
|
dockerfile: Dockerfile.rootless
|
||||||
|
tags: ${DRONE_TAG##v}-linux-amd64-rootless
|
||||||
|
repo: gitea/gitea
|
||||||
|
build_args:
|
||||||
|
- GOPROXY=https://goproxy.io
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -1209,7 +1274,10 @@ depends_on:
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
|
include:
|
||||||
- "refs/tags/**"
|
- "refs/tags/**"
|
||||||
|
exclude:
|
||||||
|
- "refs/tags/**-rc*"
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- cron
|
- cron
|
||||||
|
@ -1258,6 +1326,68 @@ steps:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: docker-linux-arm64-release-candidate-version
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- testing-amd64
|
||||||
|
- testing-arm64
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
ref:
|
||||||
|
- "refs/tags/**-rc*"
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- cron
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: fetch-tags
|
||||||
|
image: docker:git
|
||||||
|
pull: always
|
||||||
|
commands:
|
||||||
|
- git config --global --add safe.directory /drone/src
|
||||||
|
- git fetch --tags --force
|
||||||
|
|
||||||
|
- name: publish
|
||||||
|
image: techknowlogick/drone-docker:latest
|
||||||
|
pull: always
|
||||||
|
settings:
|
||||||
|
tags: ${DRONE_TAG##v}-linux-arm64
|
||||||
|
repo: gitea/gitea
|
||||||
|
build_args:
|
||||||
|
- GOPROXY=https://goproxy.io
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
- name: publish-rootless
|
||||||
|
image: techknowlogick/drone-docker:latest
|
||||||
|
settings:
|
||||||
|
dockerfile: Dockerfile.rootless
|
||||||
|
tags: ${DRONE_TAG##v}-linux-arm64-rootless
|
||||||
|
repo: gitea/gitea
|
||||||
|
build_args:
|
||||||
|
- GOPROXY=https://goproxy.io
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
|
@ -1427,7 +1557,9 @@ trigger:
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- docker-linux-amd64-release-version
|
- docker-linux-amd64-release-version
|
||||||
|
- docker-linux-amd64-release-candidate-version
|
||||||
- docker-linux-arm64-release-version
|
- docker-linux-arm64-release-version
|
||||||
|
- docker-linux-arm64-release-candidate-version
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -1509,6 +1641,8 @@ depends_on:
|
||||||
- docker-linux-arm64-release
|
- docker-linux-arm64-release
|
||||||
- docker-linux-amd64-release-version
|
- docker-linux-amd64-release-version
|
||||||
- docker-linux-arm64-release-version
|
- docker-linux-arm64-release-version
|
||||||
|
- docker-linux-amd64-release-candidate-version
|
||||||
|
- docker-linux-arm64-release-candidate-version
|
||||||
- docker-linux-amd64-release-branch
|
- docker-linux-amd64-release-branch
|
||||||
- docker-linux-arm64-release-branch
|
- docker-linux-arm64-release-branch
|
||||||
- docker-manifest
|
- docker-manifest
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}{{#if (hasPrefix "refs/heads/release/v" build.ref)}}{{trimPrefix "refs/heads/release/v" build.ref}}-{{/if}}dev{{/if}}-rootless
|
image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}{{#if (hasPrefix "refs/heads/release/v" build.ref)}}{{trimPrefix "refs/heads/release/v" build.ref}}-{{/if}}dev{{/if}}-rootless
|
||||||
{{#if build.tags}}
|
{{#if build.tags}}
|
||||||
|
{{#unless contains "-rc" build.tag}}
|
||||||
tags:
|
tags:
|
||||||
{{#each build.tags}}
|
{{#each build.tags}}
|
||||||
- {{this}}-rootless
|
- {{this}}-rootless
|
||||||
{{/each}}
|
{{/each}}
|
||||||
- "latest-rootless"
|
- "latest-rootless"
|
||||||
|
{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
manifests:
|
manifests:
|
||||||
-
|
-
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}{{#if (hasPrefix "refs/heads/release/v" build.ref)}}{{trimPrefix "refs/heads/release/v" build.ref}}-{{/if}}dev{{/if}}
|
image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}{{#if (hasPrefix "refs/heads/release/v" build.ref)}}{{trimPrefix "refs/heads/release/v" build.ref}}-{{/if}}dev{{/if}}
|
||||||
{{#if build.tags}}
|
{{#if build.tags}}
|
||||||
|
{{#unless contains "-rc" build.tag }}
|
||||||
tags:
|
tags:
|
||||||
{{#each build.tags}}
|
{{#each build.tags}}
|
||||||
- {{this}}
|
- {{this}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
- "latest"
|
- "latest"
|
||||||
|
{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
manifests:
|
manifests:
|
||||||
-
|
-
|
||||||
|
|
Loading…
Reference in a new issue