Automatically promote/publish

We have some custom repositories to where external support upload packages, new packages must be visible to machines on daily basis, how to make hammer script or there is already module in foreman, which supports auto promo on new changes on specified repo?
Expected outcome:
New packages have to be visible on machines
Foreman and Proxy versions:
Foreman and Proxy plugin versions:
Distribution and version:

Other relevant data:

We do have auto-publish of composite content views whenever one of its components publishes. But that won’t help you.

Best I can think of is a cron job or some sort of automation that runs hammer content-view publish daily.

# hammer content-view publish \
--description "My_Content_View" \
--name "My_Content_View" \
--organization "My_Organization"

See the content management guide for more.

The other thing you could consider, is going around Katello for this particular repo, and just including the Library version of the repo (found on the repository page under “Published At:”) directly on those hosts.

Your use case is kind of working against the Katello CV design here (which is to provide stable well tested frozen package snapshots). If you publish a new CV version every day with a cron job, then you will end up with lots and lots of CV versions. If you add the library repo on your test systems, you can just add a sync plan for that repo and will always receive the latest state. Then you can still create a new “frozen” CV version at some time where you are happy with that latest state, and promote that to your Production machines. This is a bit workaroundish, but it may suit your use case.

1 Like