Compare commits

...

7 Commits

Author SHA1 Message Date
Andrew Thornton
a93d5e12d4 Fix pushing to 1-x-dev docker tag (part 4)
OK now we have the images building we should make sure that the main ones stays
dev and the release/v* ones become *-dev-*

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-02-03 19:58:41 +00:00
Andrew Thornton
abe2fd614e Fix pushing to 1-x-dev docker tag (part 3)
well part 2 did not work - let us try again.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-02-03 19:40:43 +00:00
Andrew Thornton
f5e19dcfd7 Fix pushing to 1-x-dev docker tag (part 2)
Although we now have the manifest working, we need to create the images.

Here we adjust the .drone.yml to force building of the images

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-02-03 18:53:55 +00:00
zeripath
3182d4edaa Fix pushing to 1-x-dev docker tag (#18578) (#18580)
Backport #18578

It appears that #18551 and #18573 have a mistake in that raymond does not have
an {{else}} on {{#equal}}. This PR notes that Sprig has a hasPrefix function
and so we use this with another if.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-02-03 16:27:24 +00:00
zeripath
f8deb116cc Make docker gitea/gitea:v1.15-dev etc refer to the latest build on that branch (#18551) (#18569) (#18575)
Backport #18551

One of the problems with our current docker tagging is that although we
have strict version tags, latest and dev we do not have a way for docker
users to track the current release branch. This PR simply suggests that
we use the 1.x-dev tag for these and we build and push these. This will
give users who want or need unreleased bug fixes the option of tracking
the pre-release version instead of simply jumping to dev.

However, there is a problem with #18551/#18569 whereby the manifest is
not properly uploading. Therefore this PR adds in some debug logging
in order to get this to debug things.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-02-03 23:09:15 +08:00
techknowlogick
5a16cbdaf6 point to s3 endpoint directly (#18497) (#18509) 2022-01-31 17:50:20 -05:00
techknowlogick
889bdf9196 for next 1.15.x tag, don't push "latest" image (#18489) 2022-01-31 12:44:56 -05:00
3 changed files with 147 additions and 11 deletions

View File

@@ -531,7 +531,7 @@ steps:
settings: settings:
acl: public-read acl: public-read
bucket: gitea-artifacts bucket: gitea-artifacts
endpoint: https://storage.gitea.io endpoint: https://ams3.digitaloceanspaces.com
path_style: true path_style: true
source: "dist/release/*" source: "dist/release/*"
strip_prefix: dist/release/ strip_prefix: dist/release/
@@ -552,7 +552,7 @@ steps:
settings: settings:
acl: public-read acl: public-read
bucket: gitea-artifacts bucket: gitea-artifacts
endpoint: https://storage.gitea.io endpoint: https://ams3.digitaloceanspaces.com
path_style: true path_style: true
source: "dist/release/*" source: "dist/release/*"
strip_prefix: dist/release/ strip_prefix: dist/release/
@@ -627,7 +627,7 @@ steps:
settings: settings:
acl: public-read acl: public-read
bucket: gitea-artifacts bucket: gitea-artifacts
endpoint: https://storage.gitea.io endpoint: https://ams3.digitaloceanspaces.com
path_style: true path_style: true
source: "dist/release/*" source: "dist/release/*"
strip_prefix: dist/release/ strip_prefix: dist/release/
@@ -817,6 +817,70 @@ steps:
exclude: exclude:
- pull_request - pull_request
---
kind: pipeline
name: docker-linux-amd64-release-branch
platform:
os: linux
arch: amd64
depends_on:
- testing-amd64
- testing-arm64
trigger:
ref:
- "refs/heads/release/v*"
event:
exclude:
- cron
steps:
- name: fetch-tags
image: docker:git
commands:
- git fetch --tags --force
- name: publish
pull: always
image: techknowlogick/drone-docker:latest
settings:
auto_tag: false
tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64
repo: gitea/gitea
build_args:
- GOPROXY=off
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
auto_tag: false
tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64-rootless
repo: gitea/gitea
build_args:
- GOPROXY=off
password:
from_secret: docker_password
username:
from_secret: docker_username
environment:
PLUGIN_MIRROR:
from_secret: plugin_mirror
when:
event:
exclude:
- pull_request
--- ---
kind: pipeline kind: pipeline
name: docker-linux-arm64-dry-run name: docker-linux-arm64-dry-run
@@ -982,6 +1046,74 @@ steps:
event: event:
exclude: exclude:
- pull_request - pull_request
---
kind: pipeline
name: docker-linux-arm64-release-branch
platform:
os: linux
arch: arm64
depends_on:
- testing-amd64
- testing-arm64
trigger:
ref:
- "refs/heads/release/v*"
event:
exclude:
- cron
steps:
- name: fetch-tags
image: docker:git
commands:
- git fetch --tags --force
- name: publish
pull: always
image: techknowlogick/drone-docker:latest
settings:
auto_tag: false
tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64
repo: gitea/gitea
build_args:
- GOPROXY=off
password:
from_secret: docker_password
username:
from_secret: docker_username
environment:
PLUGIN_MIRROR:
from_secret: plugin_mirror
when:
event:
exclude:
- pull_request
- name: publish-rootless
image: techknowlogick/drone-docker:latest
settings:
dockerfile: Dockerfile.rootless
auto_tag: false
tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64-rootless
repo: gitea/gitea
build_args:
- GOPROXY=off
password:
from_secret: docker_password
username:
from_secret: docker_username
environment:
PLUGIN_MIRROR:
from_secret: plugin_mirror
when:
event:
exclude:
- pull_request
--- ---
kind: pipeline kind: pipeline
name: docker-manifest-version name: docker-manifest-version
@@ -1041,6 +1173,7 @@ steps:
auto_tag: false auto_tag: false
ignore_missing: true ignore_missing: true
spec: docker/manifest.rootless.tmpl spec: docker/manifest.rootless.tmpl
dump: true
password: password:
from_secret: docker_password from_secret: docker_password
username: username:
@@ -1052,6 +1185,7 @@ steps:
auto_tag: false auto_tag: false
ignore_missing: true ignore_missing: true
spec: docker/manifest.tmpl spec: docker/manifest.tmpl
dump: true
password: password:
from_secret: docker_password from_secret: docker_password
username: username:
@@ -1060,6 +1194,7 @@ steps:
trigger: trigger:
ref: ref:
- refs/heads/main - refs/heads/main
- "refs/heads/release/v*"
event: event:
exclude: exclude:
- cron - cron
@@ -1067,6 +1202,8 @@ trigger:
depends_on: depends_on:
- docker-linux-amd64-release - docker-linux-amd64-release
- docker-linux-arm64-release - docker-linux-arm64-release
- docker-linux-amd64-release-branch
- docker-linux-arm64-release-branch
--- ---
kind: pipeline kind: pipeline

View File

@@ -1,4 +1,4 @@
image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}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}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
@@ -8,12 +8,12 @@ tags:
{{/if}} {{/if}}
manifests: manifests:
- -
image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}dev{{/if}}-linux-amd64-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}}-linux-amd64-rootless
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- -
image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}dev{{/if}}-linux-arm64-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}}-linux-arm64-rootless
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux

View File

@@ -1,20 +1,19 @@
image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}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}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
- {{this}} - {{this}}
{{/each}} {{/each}}
- "latest"
{{/if}} {{/if}}
manifests: manifests:
- -
image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{else}}dev-{{/if}}linux-amd64 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}}-linux-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- -
image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{else}}dev-{{/if}}linux-arm64 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}}-linux-arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8