checkmk-dev-tools


Namecheckmk-dev-tools JSON
Version 0.1.64 PyPI version JSON
download
home_pagehttps://github.com/Checkmk/checkmk-dev-tools
SummaryCheckmk DevOps tools
upload_time2024-06-20 08:13:19
maintainerNone
docs_urlNone
authorFrans Fürst
requires_python<4.0.0,>=3.10.4
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Checkmk Development Tools

This repository includes scripts/tools for Checkmk developers.

TBD: what should go here
TBD: what shouldn't go here


## Installation

While 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 via `pip` or inside a virtual environment.

Install it locally using `pip`:

```sh
[<PYTHON> -m] pip[3] install [--user] [--upgrade] checkmk-dev-tools
```

## Contained tools

### `cmk-dev howto`

### `ci-artifacts`

`ci-artifacts` is a tool for accessing and triggering (currently Jenkins only) CI job builds and
making build artifacts available locally in an efficient way (i.e. avoiding unnessessary builds by
comparing certain constraints like job parameters and time of already available builds).

Formerly it was only used to make artifacts available which is the reason for the name and some
CLI desing desicions.


#### Usage

Run `ci-artifacts --help` in 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, `fetch` downloads a given jobs artifacts
to a folder called `out`:
```
ci-artifacts fetch checkmk/master/winagt-build
```

In contrast, this is what a more detailed call might look like
```
ci-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
only `today` is 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-paths`
as well as base dir for `--out-dir`.

**`--out-dir <PATH>`**

Artifact download destination directory.

**`--omit-new-build`**

Don't start new builds, even when no matching build could be found.

**`--force-new-build`**

Don't look for existing builds, always start a new build instead.

**`--log-level`**

Provide a Python `logging` level name, e.g. `DEBUG` (case-insensitive)

#### Todo

- [ ] split into `request` and `download`
- [ ] request CI build from local changes


## Development & Contribution

### Setup

For active development you need to have `poetry` and `pre-commit` installed

```sh
python3 -m pip install --upgrade --user poetry pre-commit
git clone ssh://review.lan.tribe29.com:29418/checkmk_dev_tools
cd checkmk_dev_tools
pre-commit install
# if you need a specific version of Python inside your dev environment
poetry env use ~/.pyenv/versions/3.10.4/bin/python3
poetry install
```

### Workflow

* (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 via `pre-commit`
* after work is done locally:
  - adapt version in `pyproject.toml`
  - build and check a package
```sh
poetry build && \
poetry run twine check dist/* &&
python3 -m pip uninstall -y checkmk_dev_tools && \
python3 -m pip install --user dist/checkmk_dev_tools-$(grep -E "^version.?=" pyproject.toml | cut -d '"' -f 2)-py3-none-any.whl
```
  - check installed package
  - go through review process
  - publish the new package `poetry publish --build`
  - commit new version && push

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Checkmk/checkmk-dev-tools",
    "name": "checkmk-dev-tools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.10.4",
    "maintainer_email": null,
    "keywords": null,
    "author": "Frans F\u00fcrst",
    "author_email": "frans.fuerst@checkmk.com",
    "download_url": "https://files.pythonhosted.org/packages/e4/26/86dc2af46a5385d12ff0498b574e3fa23acf1121acf7d2772abbc14a92f6/checkmk_dev_tools-0.1.64.tar.gz",
    "platform": null,
    "description": "# Checkmk Development Tools\n\nThis repository includes scripts/tools for Checkmk developers.\n\nTBD: what should go here\nTBD: what shouldn't go here\n\n\n## Installation\n\nWhile you can just clone and use the tools inside of course (they're just plain Python or Bash\nscripts), the intended way to use it is via `pip` or inside a virtual environment.\n\nInstall it locally using `pip`:\n\n```sh\n[<PYTHON> -m] pip[3] install [--user] [--upgrade] checkmk-dev-tools\n```\n\n## Contained tools\n\n### `cmk-dev howto`\n\n### `ci-artifacts`\n\n`ci-artifacts` is a tool for accessing and triggering (currently Jenkins only) CI job builds and\nmaking build artifacts available locally in an efficient way (i.e. avoiding unnessessary builds by\ncomparing certain constraints like job parameters and time of already available builds).\n\nFormerly it was only used to make artifacts available which is the reason for the name and some\nCLI desing desicions.\n\n\n#### Usage\n\nRun `ci-artifacts --help` in general. Here come a few more detailed examples,\nwhich might be outdated.\n\nAssuming credentials are configured and you don't have any more constraints than\na build has been completed successfully, `fetch` downloads a given jobs artifacts\nto a folder called `out`:\n```\nci-artifacts fetch checkmk/master/winagt-build\n```\n\nIn contrast, this is what a more detailed call might look like\n```\nci-artifacts --log-level debug \\\n    --credentials url_env=JENKINS_URL,username_env=JENKINS_USERNAME,password_env=JENKINS_PASSWORD \\\n    fetch checkmk/master/winagt-build \\\n    --params EDITION=raw,DISTRO=\"ubuntu-22.04\" \\\n    --params-no-check DISABLE_CACHE=false \\\n    --dependency-paths agents/wnx,agents/windows,packages/cmk-agent-ctl \\\n    --time-constraints today \\\n    --base-dir ~/my-git-projects/checkmk/master \\\n    --out-dir package_download\n```\n\n**`--credentials <CREDENTIALS>`**\n\nProvide URL, username and password to your Jenkins instance.\n\n**`--params <JOB-PARAMETERS>`**\n\nComma separated list of job-parameters used for identifying existing builds and\nto start new ones.\n\n**`--params-no-check <JOB-PARAMETERS>`**\n\nComma separated list of job-parameters used only to start new ones.\n\n**`--time-constraints <SPECIFIER>`**\n\nCheck for build date constraints when looking for existing builds - currently\nonly `today` is taken into account.\n\n**`--dependency-paths <PATH,..>`**\n\nComma separated list of relative paths to files and directories checked for\ndifferences when looking for existing builds\n\n**`--base-dir <PATH>`**\n\nPath taken as repository base dir to prefix paths provided with `--dependency-paths`\nas well as base dir for `--out-dir`.\n\n**`--out-dir <PATH>`**\n\nArtifact download destination directory.\n\n**`--omit-new-build`**\n\nDon't start new builds, even when no matching build could be found.\n\n**`--force-new-build`**\n\nDon't look for existing builds, always start a new build instead.\n\n**`--log-level`**\n\nProvide a Python `logging` level name, e.g. `DEBUG` (case-insensitive)\n\n#### Todo\n\n- [ ] split into `request` and `download`\n- [ ] request CI build from local changes\n\n\n## Development & Contribution\n\n### Setup\n\nFor active development you need to have `poetry` and `pre-commit` installed\n\n```sh\npython3 -m pip install --upgrade --user poetry pre-commit\ngit clone ssh://review.lan.tribe29.com:29418/checkmk_dev_tools\ncd checkmk_dev_tools\npre-commit install\n# if you need a specific version of Python inside your dev environment\npoetry env use ~/.pyenv/versions/3.10.4/bin/python3\npoetry install\n```\n\n### Workflow\n\n* (once and only for publishing to PyPi) Get token on PyPi.org\n* (once and only for publishing to PyPi) `poetry config pypi-token.pypi pypi-<LONG-STRING>`\n  (will write to `~/.config/pypoetry/auth.toml`)\n* modify and check commits via `pre-commit`\n* after work is done locally:\n  - adapt version in `pyproject.toml`\n  - build and check a package\n```sh\npoetry build && \\\npoetry run twine check dist/* &&\npython3 -m pip uninstall -y checkmk_dev_tools && \\\npython3 -m pip install --user dist/checkmk_dev_tools-$(grep -E \"^version.?=\" pyproject.toml | cut -d '\"' -f 2)-py3-none-any.whl\n```\n  - check installed package\n  - go through review process\n  - publish the new package `poetry publish --build`\n  - commit new version && push\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Checkmk DevOps tools",
    "version": "0.1.64",
    "project_urls": {
        "Homepage": "https://github.com/Checkmk/checkmk-dev-tools",
        "Repository": "https://github.com/Checkmk/checkmk-dev-tools"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d6ca8742eeef26f251aea85a391981ed8ffe2bc0f852269676a02fe91374456b",
                "md5": "dc869eec515c7d432d172c47654d01f7",
                "sha256": "d2e83abb5681c7ad44f0b59d3a1232cd1c630fa9adaf9fdc531f56ce022e4ac2"
            },
            "downloads": -1,
            "filename": "checkmk_dev_tools-0.1.64-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dc869eec515c7d432d172c47654d01f7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.10.4",
            "size": 36340,
            "upload_time": "2024-06-20T08:13:16",
            "upload_time_iso_8601": "2024-06-20T08:13:16.787438Z",
            "url": "https://files.pythonhosted.org/packages/d6/ca/8742eeef26f251aea85a391981ed8ffe2bc0f852269676a02fe91374456b/checkmk_dev_tools-0.1.64-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e42686dc2af46a5385d12ff0498b574e3fa23acf1121acf7d2772abbc14a92f6",
                "md5": "cd2bdebef8c48399d6f022cc7a2ec8e5",
                "sha256": "d76ced9627cbad81432be035bd5c747304340444d84bca97fa09096b5c65b68b"
            },
            "downloads": -1,
            "filename": "checkmk_dev_tools-0.1.64.tar.gz",
            "has_sig": false,
            "md5_digest": "cd2bdebef8c48399d6f022cc7a2ec8e5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.10.4",
            "size": 31951,
            "upload_time": "2024-06-20T08:13:19",
            "upload_time_iso_8601": "2024-06-20T08:13:19.557399Z",
            "url": "https://files.pythonhosted.org/packages/e4/26/86dc2af46a5385d12ff0498b574e3fa23acf1121acf7d2772abbc14a92f6/checkmk_dev_tools-0.1.64.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-20 08:13:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Checkmk",
    "github_project": "checkmk-dev-tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "checkmk-dev-tools"
}
        
Elapsed time: 0.59470s