tripleo-repos/tripleo-get-hash
Wesley Hayutin 6bf179989d add stein and queens to config
tripleo-get-hash --os-version centos7 --release queens
tripleo-get-hash - INFO - Using config file at /etc/tripleo_get_hash/config.yaml
os_version: centos7,
release: queens,
component: None,
tag: current-tripleo,
dlrn_url: https://trunk.rdoproject.org/centos7-queens/current-tripleo/commit.yaml,
full_hash: e302f1b9617e568a32abfd3b4bb758c5040c3d84_66bf2511,
commit_hash: e302f1b9617e568a32abfd3b4bb758c5040c3d84,
distro_hash: 66bf251101c9c0080e03af95c25a2df03d13eb67,
extended_hash: None

Change-Id: I8ae6215b8cf57049f17c9deea28be7d154ea39ce
2021-05-17 11:38:16 -06:00
..
test Adds tripleo-get-hash module get tripleo-ci hash info from tag 2021-05-06 14:21:56 +03:00
tripleo_get_hash Fixup local config paths for pip installs 2021-05-11 15:08:12 +03:00
LICENSE Adds tripleo-get-hash module get tripleo-ci hash info from tag 2021-05-06 14:21:56 +03:00
README.md Adds tripleo-get-hash module get tripleo-ci hash info from tag 2021-05-06 14:21:56 +03:00
config.yaml add stein and queens to config 2021-05-17 11:38:16 -06:00
requirements.txt Adds tripleo-get-hash module get tripleo-ci hash info from tag 2021-05-06 14:21:56 +03:00
setup.cfg Fixup license classifier in setup.cfg preventing pypi upload 2021-05-07 14:31:54 +03:00
setup.py Adds tripleo-get-hash module get tripleo-ci hash info from tag 2021-05-06 14:21:56 +03:00
test-requirements.txt Adds tripleo-get-hash module get tripleo-ci hash info from tag 2021-05-06 14:21:56 +03:00

README.md

tripleo-get-hash

What is tripleo-get-hash

This utility is meant for use by TripleO deployments, particularly in zuul continuous integration jobs. Given an RDO named tag, such as 'current-tripleo' or 'tripleo-ci-testing' [1] it will return the hash information, including the commit, distro and full hashes where available.

It includes a simple command line interface. If you clone the source you can try it out of the box without installation invoking it as a module:

     python -m tripleo_get_hash # by default centos8, master, current-tripleo.
     python -m tripleo_get_hash --component tripleo --release victoria --os-version centos8
     python -m tripleo_get_hash --release master --os-version centos7
     python -m tripleo_get_hash --release train # by default centos8
     python -m tripleo_get_hash --os-version rhel8 --release osp16-2 --dlrn-url http://osp-trunk.hosted.upshift.rdu2.redhat.com
     python -m tripleo_get_hash --help

Quick start

python setup.py install

The tripleo-get-hash utility uses a yaml configuration file named 'config.yaml'. If you install this utility using setup.py as above, the configuration file is placed in /etc:

     /etc/tripleo_get_hash/config.yaml

Alternatively if you are running from a checked out version of the repo and invoking as a module (see examples above) the config.yaml in the repo checkout is used instead.

After installation you can invoke tripleo-get-hash in /usr/local/bin/:

     tripleo-get-hash --help

By default this queries the delorean server at "https://trunk.rdoproject.org", with this URL specified in config.yaml. To use a different delorean server you can either update config.yaml or use the --dlrn-url parameter to the cli. If instead you are instantiating TripleOHashInfo objects in code, you can create the objects passing an existing 'config' dictionary. Note this has to contain all of constants.CONFIG_KEYS to avoid explosions.

[1] https://docs.openstack.org/tripleo-docs/latest/ci/stages-overview.html#rdo-dlrn-promotion-criteria