1
votes

I can publish an rpm to a yum repo on Artifactory by using generic curl command, but I'm hoping to publish our custom RPMs similar to maven - be able to save daily snapshots with built-in timestamp and resolve dynamic versions from that, etc...

Can anyone please provide guide/resources if this is possible?

If this is not a built-in function, how does one handle daily build of RPMs other than overwriting the previous day's build?

Thanks,

2

2 Answers

1
votes

In cases like that, you can use the timestamp itself as the release field of the RPMs, e.g., name-version-release-arch.rpm

If builds are infrequent, just the year/month/day (20151230 is December 30, 2015) works well enough. If builds are frequent, you could add hours and minutes, e.g., 201512302105 or break it up for readability: 2015.12.30.21.05. Keep in mind that yum will compare these release values to determine what is the newest release.

0
votes

I am using for building nightly RPM packages Tito (https://github.com/dgoodwin/tito). When you execute

tito build --test --rpm

It will generate the release tag using commit SHA similary as suggested by T.Dickey above.