-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Push tagged builds automatically #119
Comments
Unfortunately, I'm not too familiar with the workflow and practices of a Java developer. We're lucky with Node, because Travis gives us the behavior we're looking for out of the box with an npm deploy provider: (see our travis.yml). If we push a new tag to the repo, it automatically runs our release.sh script to build the docs before publishing to npm on its own. Travis says the solution for projects that don't have a supported deploy provider is just using the However, since you can point
Sorry I couldn't be more help. |
Let me add here what I wrote in a not-so-related pull request. When a tag is pushed to the repository the $TRAVIS_TAG is set to its value. In the Before depolying in maven we also need to update version numbers in all pom.xml files (and READMEs). I see two solutions here:
The problem I see with approach 2 is that we will have a commit tagged with a newer version while maven's pom.xml and READMEs are still to the previous version as Travis commit arrives later (is triggered by the tag). Forcing the tag to move to the next commit is a no-no. I like approach 2 because it rely solely on git tags to publish a new version but I do not like having version update commits after their corresponding tag. Sticking to a 1-like solution might be better with this respect. Any thoughts? |
I also like approach 2 but let me make sure I understand it... if release_tag: |
Yes Travis should be triggered even if you push only tags and what you write should be doable without too much pain. The problems I see here are:
|
Yes, in case of release version 1.6.0 I would expect it to automatically move the SNAPSHOT version in the POM to 1.6.1-SNAPSHOT. As long as the tag release is smaller than POM version, we don't change the POM in gitHub (just locally for the maven and site pushes). I don't see the difference between the 1.6.0 case and the 2.0.0 case (so maybe I don't understand the question). It should be fine to have such a jump (POM would be set to 2.0.1-SNAPSHOT) and site/maven will be pushed with a 2.0.0 release. Another option to consider is pushing tags just with a release type indicator. |
I vote for the first option (using a script to update the poms before pushing the tag) because of the first bullet point (the tagged version will have an outdated pom.xml). I think option 2 would be a bit confusing down the line, especially if anybody checks out the repository using that tag. |
Just out of curiosity... shouldn't this be a solved problem? Is there something going on that we overlooked? I feel like any real Java project should have already figured this out.......... |
@aozarov The problem with jumping to 2.0.0 is not after the jump but before it: @jgeewax I browsed some real java projects and it's a huge mess, some do version changes by hand like in approach 1 (e.g. hibernate but they use gradle), others (e.g. Spring) have a build bot triggered from outside git (I think) that fetches the repo, moves to new version the POMs and pushes the changes as well as a version tag back to the repository, publishes the artifact and finally puts a new "development version" in the POMs and pushes to git. |
@mziccard Yes, I understand but I also don't think it is a big deal (it should be totally fine to skip a release for a snapshot when a change is no longer minor or to have a release without prior snapshots). What did you think about using major/minor/incremental tags instead of specifying the version (and automate the book-keeping)? We could always also support jump/reset to specific version if need to... @ajkannan can you describe the confusion? @jgeewax I also looked at guava and Guice and though they both seem to use gitHub releases/tags I didn't find any evidence of automation for it. They do automate javadoc & maven snapshots push in a similar way to what we already do (but they do not use maven site). |
Maybe we can look at a non-Google project for guidance? |
@aozarov You mean using just major/minor/incremental as tag name without any version information? While I understand your point, in git a tag must be unique so you can not use them as if they were actions. A tag is like a label you add to a commit to allow users to clone the repository for a specific version/bug fix/feature/etc. |
@aozarov To clarify what I said earlier regarding the confusion with Option 2: |
@ajkannan I see your point. @mziccard can we make Travis delete the tag (so we can re-use it next time) and then instead let Travis apply the specific version tag (after changing POMs version associated with the tag for both site/maven and github code check-in [to answer @ajkannan concern]). After that Travis can change POMs to the next snapshot version. Is that too much to task from Travis or gitHub? If so, than I think I would also favor a manually triggered script for releases while automating the snapshots [as we already do]. @jgeewax Hibernate and Spring that were pointed out by @mziccard are not Google projects. |
@aozarov Uh I see. I would say that this is an unorthodox way of using tags :) Deleting a remote tag is not very common unless you pushed it by accident but it can be done and I am not against this approach! Somebody else's thoughts would be valuable at this point. |
I'd agree... I think deleting remote tags is ... a bit scary. |
The repo currently has an automated release process based on the version in the pom. Closing out this issue. |
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/8dc67c4c-b602-45d4-bcb1-8c58b15f5c34/targets
🤖 I have created a release *beep* *boop* --- ## [1.2.1](googleapis/java-ids@v1.2.0...v1.2.1) (2022-07-13) ### Bug Fixes * enable longpaths support for windows test ([#1485](https://github.com/googleapis/java-ids/issues/1485)) ([#118](googleapis/java-ids#118)) ([e7db035](googleapis/java-ids@e7db035)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…-info-reports-plugin to v3.4.0 (#119) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-project-info-reports-plugin](https://maven.apache.org/plugins/) | `3.3.0` -> `3.4.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/compatibility-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/confidence-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-vmmigration). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMTcuNCIsInVwZGF0ZWRJblZlciI6IjMyLjExNy40In0=-->
🤖 I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-resumable-media](https://togithub.com/googleapis/google-resumable-media-python) | `==2.3.3` -> `==2.4.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-resumable-media/2.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-resumable-media/2.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-resumable-media/2.4.0/compatibility-slim/2.3.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-resumable-media/2.4.0/confidence-slim/2.3.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-video-live-stream). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMDguMiIsInVwZGF0ZWRJblZlciI6IjMyLjIwOC4yIn0=-->
🤖 I have created a release *beep* *boop* --- ## [0.5.5](https://togithub.com/googleapis/java-video-live-stream/compare/v0.5.4...v0.5.5) (2022-09-30) ### Dependencies * Update dependency cachetools to v5 ([#101](https://togithub.com/googleapis/java-video-live-stream/issues/101)) ([8b1f7cd](https://togithub.com/googleapis/java-video-live-stream/commit/8b1f7cd252a8d8be47adb7ad2647a9c978fe4433)) * Update dependency charset-normalizer to v2.1.1 ([#109](https://togithub.com/googleapis/java-video-live-stream/issues/109)) ([020b87d](https://togithub.com/googleapis/java-video-live-stream/commit/020b87d80c8ec0f6ccaee36536161d8ba32c9afc)) * Update dependency click to v8.1.3 ([#110](https://togithub.com/googleapis/java-video-live-stream/issues/110)) ([b01a8bc](https://togithub.com/googleapis/java-video-live-stream/commit/b01a8bc5c34de5997174241cce8bef616c752292)) * Update dependency google-api-core to v2.10.1 ([#111](https://togithub.com/googleapis/java-video-live-stream/issues/111)) ([fc39507](https://togithub.com/googleapis/java-video-live-stream/commit/fc39507d7ab374a607e7ad7bfc1feb67f1ade1bf)) * Update dependency google-auth to v2.12.0 ([#123](https://togithub.com/googleapis/java-video-live-stream/issues/123)) ([9332a20](https://togithub.com/googleapis/java-video-live-stream/commit/9332a2057e6eb9d24cb25136c9a0fa1fc1cb135d)) * Update dependency google-cloud-storage to v2.5.0 ([#112](https://togithub.com/googleapis/java-video-live-stream/issues/112)) ([b94e163](https://togithub.com/googleapis/java-video-live-stream/commit/b94e1630336fc419df81890907932ff2c4dce5a7)) * Update dependency google-crc32c to v1.5.0 ([#113](https://togithub.com/googleapis/java-video-live-stream/issues/113)) ([29f67f1](https://togithub.com/googleapis/java-video-live-stream/commit/29f67f1b834af05b0f1f9b7655d6b3e418393ebb)) * Update dependency google-resumable-media to v2.4.0 ([#119](https://togithub.com/googleapis/java-video-live-stream/issues/119)) ([15b08df](https://togithub.com/googleapis/java-video-live-stream/commit/15b08df1a40d2897964a897d61b39d6045ad2372)) * Update dependency googleapis-common-protos to v1.56.4 ([#108](https://togithub.com/googleapis/java-video-live-stream/issues/108)) ([815a46e](https://togithub.com/googleapis/java-video-live-stream/commit/815a46e7d6dd5866acee7c6cbb1dbef5cbda88d2)) * Update dependency importlib-metadata to v4.12.0 ([#96](https://togithub.com/googleapis/java-video-live-stream/issues/96)) ([de35cf1](https://togithub.com/googleapis/java-video-live-stream/commit/de35cf18e690b4e9fe56d2cddd5ce5ac4481abd8)) * Update dependency jeepney to v0.8.0 ([#114](https://togithub.com/googleapis/java-video-live-stream/issues/114)) ([8ce181d](https://togithub.com/googleapis/java-video-live-stream/commit/8ce181d95deaf0e5b37f24238370da29d6f726dd)) * Update dependency jinja2 to v3.1.2 ([#97](https://togithub.com/googleapis/java-video-live-stream/issues/97)) ([e36f74d](https://togithub.com/googleapis/java-video-live-stream/commit/e36f74debe88dcf2c406104af48037243098a180)) * Update dependency keyring to v23.9.3 ([#115](https://togithub.com/googleapis/java-video-live-stream/issues/115)) ([8a023a0](https://togithub.com/googleapis/java-video-live-stream/commit/8a023a0a009da78c07136f7b9b2904b3d6e04f6c)) * Update dependency markupsafe to v2.1.1 ([#98](https://togithub.com/googleapis/java-video-live-stream/issues/98)) ([316fb08](https://togithub.com/googleapis/java-video-live-stream/commit/316fb08bc6495e0b2a9ec5475a7b350137d6675c)) * Update dependency protobuf to v3.20.2 ([#116](https://togithub.com/googleapis/java-video-live-stream/issues/116)) ([933beb3](https://togithub.com/googleapis/java-video-live-stream/commit/933beb3a24cfb277f9c57d2486b49b1ecdc01029)) * Update dependency protobuf to v3.20.3 ([#120](https://togithub.com/googleapis/java-video-live-stream/issues/120)) ([99467b2](https://togithub.com/googleapis/java-video-live-stream/commit/99467b23dcc7641300b3c19b57ab1271255c303b)) * Update dependency protobuf to v4 ([#102](https://togithub.com/googleapis/java-video-live-stream/issues/102)) ([c3a58c0](https://togithub.com/googleapis/java-video-live-stream/commit/c3a58c0676766f0e995c71e0732e42f4eb45978c)) * Update dependency pyjwt to v2.5.0 ([#117](https://togithub.com/googleapis/java-video-live-stream/issues/117)) ([a6dc961](https://togithub.com/googleapis/java-video-live-stream/commit/a6dc9613215968bc7b45b16dd8cd906c1282a8cf)) * Update dependency requests to v2.28.1 ([#118](https://togithub.com/googleapis/java-video-live-stream/issues/118)) ([f0a4e18](https://togithub.com/googleapis/java-video-live-stream/commit/f0a4e188d15381aef2f1af1851686aef38dff0be)) * Update dependency typing-extensions to v4.3.0 ([#99](https://togithub.com/googleapis/java-video-live-stream/issues/99)) ([df3cb4d](https://togithub.com/googleapis/java-video-live-stream/commit/df3cb4d95031010920511a5d4feafa899a7c4499)) * Update dependency zipp to v3.8.1 ([#100](https://togithub.com/googleapis/java-video-live-stream/issues/100)) ([19815e7](https://togithub.com/googleapis/java-video-live-stream/commit/19815e709d5a0793d6e14e3f3b415ba54ddf412a)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
It'd be really nice to make our doc builds and the maven push all automagical based on the tags we have in the git repository.
/cc @stephenplusplus : Maybe you can add more color on how we did this for node.
(This stems from the discussion on #51)
The text was updated successfully, but these errors were encountered: