Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make docker gitea/gitea:v1.16-dev etc refer to the latest build on that branch #18551

Merged
merged 5 commits into from
Feb 3, 2022

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Feb 2, 2022

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.

Signed-off-by: Andrew Thornton [email protected]

…at branch

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.

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added this to the 1.17.0 milestone Feb 2, 2022
Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Feb 2, 2022
@lunny
Copy link
Member

lunny commented Feb 2, 2022

That should be 1.16 but not 1.16-dev ?

@6543
Copy link
Member

6543 commented Feb 2, 2022

1.16 track latest specific release tag ... 1.16-dev track latest commit to release branch

@lunny
Copy link
Member

lunny commented Feb 2, 2022

1.16 track latest specific release tag ... 1.16-dev track latest commit to release branch

So we really need some documents update.

@zeripath
Copy link
Contributor Author

zeripath commented Feb 2, 2022

Currently we use "auto tagging" when pushing tags to docker. So 1.x.y will auto tag 1.x and 1 too. (auto tagging as defined by https://github.com/drone-plugins/drone-manifest/blob/92722b712a4a378262ca8f3e39e34248646c8a7b/tagging/tagging.go#L21)

Thus gitea/gitea:1 = gitea/gitea:1.16 = gitea/gitea:1.16.0

and

gitea/gitea:1.15 = gitea/gitea:1.15.11

If we were to push the branch to 1.16 without the dev suffix we'd be changing that.

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath
Copy link
Contributor Author

zeripath commented Feb 2, 2022

I've pushed up some non-automatic specific documentation changes but I can make it more generic if we're gonna backport this to 1.15.

@zeripath
Copy link
Contributor Author

zeripath commented Feb 2, 2022

A more generic phrase would be:

If you'd like to run the latest commit from a release branch you can use the 
`:1.x-dev` tag, where x is the current minor version of Gitea. (e.g. `:1.16-dev`)

@codecov-commenter
Copy link

Codecov Report

Merging #18551 (a6652be) into main (80048c0) will increase coverage by 0.07%.
The diff coverage is 52.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #18551      +/-   ##
==========================================
+ Coverage   46.25%   46.32%   +0.07%     
==========================================
  Files         842      846       +4     
  Lines      121180   121168      -12     
==========================================
+ Hits        56052    56136      +84     
+ Misses      58321    58230      -91     
+ Partials     6807     6802       -5     
Impacted Files Coverage Δ
models/commit.go 62.50% <0.00%> (ø)
models/release.go 49.45% <0.00%> (-1.49%) ⬇️
models/review.go 50.29% <0.00%> (-0.60%) ⬇️
models/user/external_login_user.go 28.57% <ø> (ø)
modules/gitgraph/graph_models.go 80.85% <0.00%> (ø)
modules/migration/pullrequest.go 0.00% <0.00%> (ø)
modules/migration/release.go 0.00% <0.00%> (ø)
modules/migration/review.go 0.00% <0.00%> (ø)
routers/web/org/teams.go 0.00% <0.00%> (ø)
routers/web/repo/commit.go 26.16% <0.00%> (ø)
... and 24 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 76e3111...a6652be. Read the comment docs.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 3, 2022
@6543
Copy link
Member

6543 commented Feb 3, 2022

🚀

@6543 6543 merged commit bc77b28 into go-gitea:main Feb 3, 2022
@zeripath zeripath deleted the docker-build-branch-images branch February 3, 2022 08:58
zeripath added a commit to zeripath/gitea that referenced this pull request Feb 3, 2022
…at branch (go-gitea#18551)

Backport go-gitea#18551

(Backporting this will enable this target to create 1.16-dev)

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.

Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: KN4CK3R <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
@zeripath zeripath added topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile backport/done All backports for this PR have been created labels Feb 3, 2022
zeripath added a commit that referenced this pull request Feb 3, 2022
…at branch (#18551) (#18569)

Backport #18551

(Backporting this will enable this target to create 1.16-dev)

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.

(Also contains backport for #18573)

Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: KN4CK3R <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this pull request Feb 3, 2022
…at branch (go-gitea#18551) (go-gitea#18569)

Backport go-gitea#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 go-gitea#18551/go-gitea#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 <[email protected]>
lunny pushed a commit that referenced this pull request Feb 3, 2022
…at 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 <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this pull request Feb 3, 2022
It appears that go-gitea#18551 and go-gitea#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 <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this pull request Feb 3, 2022
It appears that go-gitea#18551 and go-gitea#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 <[email protected]>
zeripath added a commit to zeripath/gitea that referenced this pull request Feb 3, 2022
Backport go-gitea#18578

It appears that go-gitea#18551 and go-gitea#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 <[email protected]>
zeripath added a commit that referenced this pull request Feb 3, 2022
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 <[email protected]>
6543 pushed a commit that referenced this pull request Feb 3, 2022
* Fix pushing to 1-x-dev docker tag

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 <[email protected]>

* 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 <[email protected]>

* Fix pushing to 1-x-dev docker tag

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 <[email protected]>

* Apply suggestions from code review
zeripath added a commit that referenced this pull request Feb 3, 2022
* Fix pushing to 1-x-dev docker tag

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 <[email protected]>

* 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 <[email protected]>

* Fix pushing to 1-x-dev docker tag

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 <[email protected]>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 5, 2022
* giteaofficial/main:
  Use `CryptoRandomBytes` instead of `CryptoRandomString` (go-gitea#18439)
  Remove the spurious space in the .ui.right additional selector (go-gitea#18605)
  Ensure commit-statuses box is sized correctly in headers (go-gitea#18538)
  [skip ci] Updated translations via Crowdin
  Prevent merge messages from being sorted to the top of email chains (go-gitea#18566)
  Fix pushing to 1-x-dev docker tag (go-gitea#18578)
  Replace `sync.Map` with normal maps (go-gitea#18584)
  Fix oauth docs usage for 2fa (go-gitea#18581)
  Update .gitattributes for .tmpl files (go-gitea#18576)
  Prevent panic on prohibited user login with oauth2 (go-gitea#18562)
  Fix manifest.tmpl (go-gitea#18573)
  Make docker gitea/gitea:v1.16-dev etc refer to the latest build on that branch (go-gitea#18551)
  Add dropdown icon to template loading dropdown (go-gitea#18564)
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
…at branch (go-gitea#18551)

* Make docker gitea/gitea:v1.16-dev etc refer to the latest build on that branch

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.

Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: KN4CK3R <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
* Fix pushing to 1-x-dev docker tag

It appears that go-gitea#18551 and go-gitea#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 <[email protected]>

* 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 <[email protected]>

* Fix pushing to 1-x-dev docker tag

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 <[email protected]>

* Apply suggestions from code review
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
@delvh delvh added topic/distribution This PR changes something about the packaging of Gitea and removed theme/docker labels Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile topic/distribution This PR changes something about the packaging of Gitea
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants