embeddedartistry / athena-bootloader

An AVR Arduino bootloader that supports uploads over Ethernet (via TFTP) and Serial.
GNU Lesser General Public License v2.1
12 stars 5 forks source link

Automated versioned builds: Only apply when src/ or libraries changes #98

Open phillipjohnston opened 2 years ago

phillipjohnston commented 2 years ago

Related to #90, prompted by discussion in #64:

One reason I can think of would be that non-code related items, such as README changes or infrastructure changes, should not generate a new release version. In that case, I would still fall back on having the nightly build be manual instead of automatic, but that also increases the friction of releases being made after PRs are merged - I'd have to remember to go and click the button, which is quite easy to do. I could also check whether or not changes have been made to src/ or libraries.

Explore this option.

phillipjohnston commented 2 years ago

Alternative, however, is to handle version numbering differently, since leveraging jenkins build number is really the more problematic part. Or we do need that intermediate develop-style approach, so merges to master will be properly incremental.

phillipjohnston commented 2 years ago

Another option is to keep the current strategy, monitor only for src/library changes, and use this plugin to discard aborted builds. Probably needs to be combined with this plugin to reset numbers to the current attempt.

phillipjohnston commented 2 years ago

The plugin for discarding aborted builds works great. The plugin to reset build number does not function in pipeline builds, instead requiring JobDSL.

phillipjohnston commented 2 years ago

Next build number can be reset with a pipeline library function!

phillipjohnston commented 2 years ago

Current conflict: build-history-manager deletion deletes everything but build.xml, which means that setting the next build number fails because a build exists. Investigating other options.

hagaigold commented 2 years ago

Is there a reason I'm missing that it would be superior to manually manage it?

this is only my preference- manually manage the version number over automatically increasing it. but as you mention above:

since leveraging jenkins build number is really the more problematic part

if you wish to increment the version number automatically, why not also keep it in a JSON file (or header file) as part of the codebase? pushing it from Jenkins is very awkward to my mind. I believe the version should come from the source and not externally. Then bumping it manually or automatically becomes just a CI implementation detail...

hagaigold commented 2 years ago

another argument (and maybe the strongest for my mind)- when you browse the code (or checkout old commit), you can not see what version are you looking at.

phillipjohnston commented 2 years ago

when you browse the code (or checkout old commit), you can not see what version are you looking at.

Just FYI, every release is tagged so you can always find out what version you're looking at with git describe --tags. This would be more convenient reading a version from a file, because git describe will tell you how many commits you are from that release, while the version in the file will not include.

This is not an argument against your suggestion, just thought you might like to know!