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

drone/docker: Use a more standard format #7480

Merged
merged 5 commits into from
Jul 17, 2019

Conversation

sapk
Copy link
Member

@sapk sapk commented Jul 16, 2019

Based on the plugin drone structure itself : https://github.com/drone-plugins/drone-docker/blob/ebce953fc443371d79b5a019fcc9c1976f60a09a/.drone.yml#L9
Use autotag : http://plugins.drone.io/drone-plugins/drone-docker/#autotag

Should fix #7476

Based on auto-tag, we should still have near similar tagging :

  • master -> latest
  • tag v1.9.0-rc2 -> 1.9.0-rc2
  • tag v1.9.1 -> 1, 1.9, 1.9.1

Previously, (before the drone update the broke it) we had :

  • master -> latest
  • tag v1.9.0-rc2 -> 1.9.0-rc2
  • tag v1.9.1 -> 1.9.1
  • commit on branch release/v1.9 -> 1, 1.9

@sapk
Copy link
Member Author

sapk commented Jul 16, 2019

This change will change the branch release with this the tag 1 and 1.9 will not be updated at each commit but at each tag but it will add consistency and simplicity by following what is "standard" for drone docker plugin.
This also mean that later the tag 1.10 would only be created after the first release of 1.10.0 and not on 1.10-0-rc1 which seems more logic.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 16, 2019
@codecov-io
Copy link

codecov-io commented Jul 16, 2019

Codecov Report

Merging #7480 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7480      +/-   ##
==========================================
+ Coverage    41.2%   41.21%   +<.01%     
==========================================
  Files         469      469              
  Lines       63556    63533      -23     
==========================================
- Hits        26190    26183       -7     
+ Misses      33947    33933      -14     
+ Partials     3419     3417       -2
Impacted Files Coverage Δ
modules/process/manager.go 76.81% <0%> (-4.35%) ⬇️
modules/log/event.go 64.61% <0%> (-1.03%) ⬇️
modules/setting/setting.go 49.22% <0%> (ø) ⬆️
modules/setting/cache.go 73.33% <0%> (ø) ⬆️
modules/setting/session.go 86.36% <0%> (ø) ⬆️
routers/routes/routes.go 82.4% <0%> (ø) ⬆️
models/user.go 50.5% <0%> (+0.04%) ⬆️
models/branches.go 50.16% <0%> (+0.16%) ⬆️
models/repo.go 48.78% <0%> (+0.18%) ⬆️
models/repo_mirror.go 23.32% <0%> (+0.4%) ⬆️
... and 2 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 760c473...8855984. Read the comment docs.

@lunny lunny added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label Jul 16, 2019
@lunny lunny added this to the 1.10.0 milestone Jul 16, 2019
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jul 16, 2019
@lafriks
Copy link
Member

lafriks commented Jul 16, 2019

What will happen if we tag 1.8.4? It will probably override :1 even if it was already for 1.9.0 release already, no?

@sapk
Copy link
Member Author

sapk commented Jul 16, 2019

@lafriks yes but when version 1.9.0 that will update is only when rc end. This will maybe need to order for this release but for next the process would be :

  • update 1.9.x -> 1.9.x 1.9 1
  • release 1.10.0-rc1 -> 1.10.0-rc1
  • update 1.9.x -> 1.9.x 1.9 1
  • release 1.10.0-rc2 -> 1.10.0-rc2
  • release 1.10.1 -> 1.10.1 1.10 1 and drop support for 1.9 (as indicated un the docs)

It will be more logic to update 1 tag after end of rc period.

@techknowlogick
Copy link
Member

@lafriks if we release a minor version for a past release (ex 1.8.4) then usually we will also release for the current one two. We do this in case of security patches where we tag past and release, then tag and release current. It is rare where we will release a patch for a previous version and not release for current.

@techknowlogick
Copy link
Member

techknowlogick commented Jul 16, 2019

Moving to this standard that Drone uses will also allow us to copy their manifests so we can easily build docker images for ARM too.

@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 Jul 17, 2019
.drone.yml Outdated Show resolved Hide resolved
@sapk
Copy link
Member Author

sapk commented Jul 17, 2019

@techknowlogick That the next goal by just adding the suffix by platform and a step for pushing manifest. But since this PR as this is already modifying a little how we release I wanted to make it in two step to ease the review process.

@techknowlogick
Copy link
Member

👌 For next PR here is some info that may help:

I have a rough version of multi-arch manifets here: https://github.com/go-gitea/test-openldap

We have ARM drone agent that we can use (it is only arm64, because I can't get docker to run in both 32-bit and 64-bit at same time).

@sapk
Copy link
Member Author

sapk commented Jul 17, 2019

@techknowlogick I planned to use the same as drone plugin that seems to be a little advanced by managing tag but it is very similar.
https://github.com/drone-plugins/drone-docker/blob/master/docker/docker/manifest.tmpl
https://github.com/drone-plugins/drone-docker/blob/master/.drone.yml#L303

@techknowlogick techknowlogick merged commit acf6bd4 into go-gitea:master Jul 17, 2019
@techknowlogick
Copy link
Member

@sapk please backport to 1.9 :)

@sapk sapk deleted the std-docker-publish branch July 17, 2019 17:33
sapk added a commit to sapk-fork/gitea that referenced this pull request Jul 17, 2019
* drone/docker: Use a more standard format

Based on the plugin drone structure itself : https://github.com/drone-plugins/drone-docker/blob/ebce953fc443371d79b5a019fcc9c1976f60a09a/.drone.yml#L9
Use autotag : http://plugins.drone.io/drone-plugins/drone-docker/#autotag

* use latest plugins/docker:linux-amd64

* remove useless cache_from

* Don't depends on translations step
@techknowlogick techknowlogick added the backport/done All backports for this PR have been created label Jul 17, 2019
techknowlogick pushed a commit that referenced this pull request Jul 18, 2019
* don't make release-version deps on transalations since translations is only triggered by push on master (#7496)

* drone/docker: Use a more standard format (#7480)

* drone/docker: Use a more standard format

Based on the plugin drone structure itself : https://github.com/drone-plugins/drone-docker/blob/ebce953fc443371d79b5a019fcc9c1976f60a09a/.drone.yml#L9
Use autotag : http://plugins.drone.io/drone-plugins/drone-docker/#autotag

* use latest plugins/docker:linux-amd64

* remove useless cache_from

* Don't depends on translations step
jeffliu27 pushed a commit to jeffliu27/gitea that referenced this pull request Jul 18, 2019
* drone/docker: Use a more standard format

Based on the plugin drone structure itself : https://github.com/drone-plugins/drone-docker/blob/ebce953fc443371d79b5a019fcc9c1976f60a09a/.drone.yml#L9
Use autotag : http://plugins.drone.io/drone-plugins/drone-docker/#autotag

* use latest plugins/docker:linux-amd64

* remove useless cache_from

* Don't depends on translations step
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updated drone file doesn't build docker images for tags
7 participants