Skip to content

How to Bulk Promote packages

Salim Alam edited this page Nov 1, 2017 · 11 revisions

DON'T use the 'hab bldr job promote' command if there are any packages (eg, non-core) packages that should not be promoted.

DO THIS INSTEAD: Get the list of successfully built packages by issuing an API command and filtering it into a package list - Example below:

http GET https://bldr.habitat.sh/v1/depot/pkgs/schedule/<group id> Authorization:Bearer:${HAB_AUTH_TOKEN} | jq '.projects[] | select(.state == "Success") | {ident} | .ident | values' | tr -d '"' > promote_idents

Check the 'promote_idents' file to make sure it looks sane. Remove anything from it you don't want promoted - Eg - DON'T promote hab or sup if you're not sure they should be promoted

Then, go to the bulk promote tool dir (in the habitat repo - /tools/bulk_promote Make sure HAB_BLDR_URL and HAB_AUTH_TOKEN are set appropriately

Then run the tool:

./bulk_promote.sh <promote idents file> <channel>