Skip to content

chore: simplify docker build process. #2827

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

Merged
merged 2 commits into from
Apr 30, 2018
Merged

Conversation

appleboy
Copy link
Member

@appleboy appleboy commented Nov 2, 2017

  • git tag v1.9.2 will publish docker tags 1, 1.9 and 1.9.2
  • git tag v1.9.2-alpha.1 will publish docker tag 1.9.2-alpha.1

See the folllowings:

pipeline:
  publish_latest:
    image: plugins/docker
    repo: octocat/hello-world
-   tags: latest
+   default_tags: true
    when:
-     event: push
+     event: [ push, tag ]

- publish_release:
-   image: plugins/docker
-   repo: octocat/hello-world
-   tags: $DRONE_TAG
-   when:
-     event: tag

ref: https://discourse.drone.io/t/new-default-tags-parameter-for-docker-plugin/995

cc @lunny @tboerger

@appleboy appleboy added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label Nov 2, 2017
@appleboy appleboy added this to the 1.3.0 milestone Nov 2, 2017
@lafriks
Copy link
Member

lafriks commented Nov 2, 2017

But will it keep only master branch for latest?

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 2, 2017
@codecov-io
Copy link

codecov-io commented Nov 2, 2017

Codecov Report

Merging #2827 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2827      +/-   ##
==========================================
+ Coverage   20.22%   20.23%   +0.01%     
==========================================
  Files         145      145              
  Lines       28997    28997              
==========================================
+ Hits         5864     5867       +3     
+ Misses      22242    22240       -2     
+ Partials      891      890       -1
Impacted Files Coverage Δ
modules/process/manager.go 73.91% <0%> (+4.34%) ⬆️

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 ff64f18...bc8fa1e. Read the comment docs.

@appleboy
Copy link
Member Author

appleboy commented Nov 2, 2017

@lafriks Yes. it always does that since nobody can't create any branch on Gitea repo expect owner. Every need to fork this project to self-account and create a new branch, then send the PR.

@appleboy
Copy link
Member Author

appleboy commented Nov 2, 2017

@lafriks I created new PR to fix your problem. drone-plugins/drone-docker#160

@lafriks
Copy link
Member

lafriks commented Nov 2, 2017

@appleboy but there is also release branches that could possibly make latest not to be from master branch

@appleboy
Copy link
Member Author

appleboy commented Nov 2, 2017

@lafriks Yes. so I created new PR to fix the condition for multiple branches.

@lafriks lafriks added the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Nov 2, 2017
@lafriks
Copy link
Member

lafriks commented Nov 2, 2017

Would leaving branch: [ master ] would build only master branch and tags? If so that would work for us I think

@appleboy
Copy link
Member Author

@lafriks We don't need to leave branch: [ master ].

@appleboy
Copy link
Member Author

The docker plugin only builds image when branch equal to default branch of the project and push the tag event.

@bkcsoft bkcsoft 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 Apr 29, 2018
Copy link
Member

@bkcsoft bkcsoft left a comment

Choose a reason for hiding this comment

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

🤔

.drone.yml Outdated
tags: [ '${DRONE_TAG##v}' ]
when:
event: [ tag ]

docker:
image: plugins/docker:17.05
Copy link
Member

Choose a reason for hiding this comment

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

Seeing as the announcement was Oct '17 (17.10) should we have to update this image tag as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. f16eac1

.drone.yml Outdated
@@ -200,12 +191,10 @@ pipeline:
docker:
image: plugins/docker:17.05
Copy link
Member

Choose a reason for hiding this comment

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

And this obviously

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. f16eac1

Copy link
Member

@bkcsoft bkcsoft left a comment

Choose a reason for hiding this comment

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

The above review comment should've been a "request change" 🙄

@bkcsoft bkcsoft 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 Apr 30, 2018
@bkcsoft
Copy link
Member

bkcsoft commented Apr 30, 2018

make the bot work

@bkcsoft bkcsoft merged commit ca4a84a into go-gitea:master Apr 30, 2018
@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
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR 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.

6 participants