core.repository_prep#
repository_prep#
For every key in the configuration which has a subkey named “repository”, then following is done:
git clone repository.remote # if ! exists(repository.path)
git checkout [repository.branch,repository.tag] # if repository.{branch,tag}
git pull –rebase # if repository.branch
git status
The intended usage of this script is to prepare a repositories in a recently provisioned system. Such as a done by ‘qemu.provision’.
Configuration#
Ensure that the “repository” has sensible values for:
remote: url of the repository to clone
branch: name of the branch to check out and rebase
tag: name of the tag to check out
run_local: Optionally, set ‘run_local’ to True, in case the repos should just be checked out locally, instead of on the remote.
Retargetable: True#
- cijoe.core.scripts.repository_prep.main(args, cijoe)#
Clone, checkout branch and pull
CLI arguments#
options:
-h, --helpshow this help message and exit