Package: checkmk-dev-tools
Checkmk Development ToolsThis repository includes scripts/tools for Checkmk developers.TBD: what should go here
TBD: what shouldn't go hereInstallationWhile you can just clone and use the tools inside of course (they're just plain Python or Bash
scripts), the intended way to use it is viapipor inside a virtual environment.Install it locally usingpip:[<PYTHON>-m]pip[3]install[--user][--upgrade]checkmk-dev-toolsContained toolscmk-dev howtoci-artifactsci-rtifactsis a tool which makes artifacts of CI jobs (currently only Jenkins)
locally available based on certain constraints like job parameters and time constraints.UsageRunci-artifacts --helpin general. Here come a few more detailed examples,
which might be outdated.Assuming credentials are configured and you don't have any more constraints than
a build has been completed successfully,fetchdownloads a given jobs artifacts
to a folder calledout:ci-artifacts fetch checkmk/master/winagt-buildIn contrast, this is what a more detailed call might look likeci-artifacts --log-level debug \
    --credentials url_env=JENKINS_URL,username_env=JENKINS_USERNAME,password_env=JENKINS_PASSWORD \
    fetch checkmk/master/winagt-build \
    --params EDITION=raw,DISTRO="ubuntu-22.04" \
    --params-no-check DISABLE_CACHE=false \
    --dependency-paths agents/wnx,agents/windows,packages/cmk-agent-ctl \
    --time-constraints today \
    --base-dir ~/my-git-projects/checkmk/master \
    --out-dir package_download--credentials <CREDENTIALS>Provide URL, username and password to your Jenkins instance.--params <JOB-PARAMETERS>Comma separated list of job-parameters used for identifying existing builds and
to start new ones.--params-no-check <JOB-PARAMETERS>Comma separated list of job-parameters used only to start new ones.--time-constraints <SPECIFIER>Check for build date constraints when looking for existing builds - currently
onlytodayis taken into account.--dependency-paths <PATH,..>Comma separated list of relative paths to files and directories checked for
differences when looking for existing builds--base-dir <PATH>Path taken as repository base dir to prefix paths provided with--dependency-pathsas well as base dir for--out-dir.--out-dir <PATH>Artifact download destination directory.--omit-new-buildDon't start new builds, even when no matching build could be found.--force-new-buildDon't look for existing builds, always start a new build instead.--log-levelProvide a Pythonlogginglevel name, e.g.DEBUG(case-insensitive)Todosplit intorequestanddownloadrequest CI build from local changesDevelopment & ContributionSetupFor active development you need to havepoetryandpre-commitinstalledpython3-mpipinstall--upgrade--userpoetrypre-commit
gitclonessh://review.lan.tribe29.com:29418/checkmk_dev_toolscdcheckmk_dev_tools
pre-commitinstall# if you need a specific version of Python inside your dev environmentpoetryenvuse~/.pyenv/versions/3.10.4/bin/python3
poetryinstallWorkflow(once and only for publishing to PyPi) Get token on PyPi.org(once and only for publishing to PyPi)poetry config pypi-token.pypi pypi-<LONG-STRING>(will write to~/.config/pypoetry/auth.toml)modify and check commits viapre-commitafter work is done locally:adapt version inpyproject.tomlbuild and check a packagepoetrybuild&&\twinecheckdist/*&&python3-mpipuninstall-ycheckmk_dev_tools&&\python3-mpipinstall--userdist/checkmk_dev_tools-$(grep-E"^version.?="pyproject.toml|cut-d'"'-f2)-py3-none-any.whlcheck installed packagego through review processpublish the new packagepoetry publish --buildcommit new version && push