get-git-repo
Automatically generated README for this automation recipe: get-git-repo
Category: DevOps automation
License: Apache 2.0
-
Notes from the authors, contributors and users: README-extra
-
CM meta description for this script: _cm.json
- Output cached? True
Reuse this script in your project
Install MLCommons CM automation meta-framework
Pull CM repository with this automation recipe (CM script)
cm pull repo mlcommons@cm4mlops
Print CM help from the command line
cmr "get git repo repository clone" --help
Run this script
Run this script via CLI
cm run script --tags=get,git,repo,repository,clone[,variations] [--input_flags]
Run this script via CLI (alternative)
cmr "get git repo repository clone [variations]" [--input_flags]
Run this script from Python
import cmind
r = cmind.access({'action':'run'
'automation':'script',
'tags':'get,git,repo,repository,clone'
'out':'con',
...
(other input keys for this script)
...
})
if r['return']>0:
print (r['error'])
Run this script via Docker (beta)
cm docker script "get git repo repository clone[variations]" [--input_flags]
Variations
-
No group (any combination of variations can be selected)
Click here to expand this section.
_lfs
- ENV variables:
- CM_GIT_REPO_NEEDS_LFS:
yes
- CM_GIT_REPO_NEEDS_LFS:
- ENV variables:
_no-recurse-submodules
- ENV variables:
- CM_GIT_RECURSE_SUBMODULES: ``
- ENV variables:
_patch
- ENV variables:
- CM_GIT_PATCH:
yes
- CM_GIT_PATCH:
- ENV variables:
_submodules.#
- ENV variables:
- CM_GIT_SUBMODULES:
#
- CM_GIT_SUBMODULES:
- ENV variables:
-
Group "checkout"
Click here to expand this section.
_branch.#
- ENV variables:
- CM_GIT_BRANCH:
#
- CM_GIT_BRANCH:
- ENV variables:
_sha.#
- ENV variables:
- CM_GIT_SHA:
#
- CM_GIT_SHA:
- ENV variables:
_tag.#
- ENV variables:
- CM_GIT_CHECKOUT_TAG:
#
- CM_GIT_CHECKOUT_TAG:
- ENV variables:
-
Group "git-history"
Click here to expand this section.
_full-history
- ENV variables:
- CM_GIT_DEPTH: ``
- ENV variables:
_short-history
(default)- ENV variables:
- CM_GIT_DEPTH:
--depth 5
- CM_GIT_DEPTH:
- ENV variables:
-
Group "repo"
Click here to expand this section.
_repo.#
- ENV variables:
- CM_GIT_URL:
#
- CM_GIT_URL:
- ENV variables:
Default variations
_short-history
Script flags mapped to environment
--branch=value
→CM_GIT_CHECKOUT=value
--depth=value
→CM_GIT_DEPTH=value
--env_key=value
→CM_GIT_ENV_KEY=value
--folder=value
→CM_GIT_CHECKOUT_FOLDER=value
--patch=value
→CM_GIT_PATCH=value
--pull=value
→CM_GIT_REPO_PULL=value
--submodules=value
→CM_GIT_RECURSE_SUBMODULES=value
--update=value
→CM_GIT_REPO_PULL=value
Default environment
These keys can be updated via --env.KEY=VALUE
or env
dictionary in @input.json
or using script flags.
- CM_GIT_DEPTH:
--depth 4
- CM_GIT_CHECKOUT_FOLDER:
repo
- CM_GIT_PATCH:
no
- CM_GIT_RECURSE_SUBMODULES:
--recurse-submodules
- CM_GIT_URL:
https://github.com/mlcommons/ck.git
Native script being run
Script output
cmr "get git repo repository clone [variations]" [--input_flags] -j