How to save values on jenkins except for groovy?

I wanna save custom values on jenkins for read and write, it looks that groovy could help to do it,but I am new to that language,and I want to search any alternatives first.Is there anyway to handle this?

PS: The workflow I created was the first one-- free style

To be more clear, in my case I got serveral arguments for building

企业微信截图_0cea3f95-d76d-42ae-a054-e1498c82d120

The argument ResVersion used for recording the resources version of the AP. Is there anyway to store the value,so next time before starting to build,I can got the version code of the last building.

Futhermore,is it possible to modify the value by shell on Mac?

For the things you describe, you would probably want the Active Choices plugin. The plugin allows you to use groovy to generate custom parameter setup based on groovy. I think you would need to write out a properties file or something to save off the value you want to increment automatically, though I would just recommend using the BUILD_NUMBER variable for ResVersion instead of trying to save off and restore. This would tie the version to the build that created it for easy reference.

1 Like

I’ve also heard good things about Conventional Commits

Trying to store things in the build would be very error prone

in pipeline you could use properties that has the value set to last value, so the next time it runs, it’ll have the previous value.