gitlab-lint-srt


Namegitlab-lint-srt JSON
Version 0.8.1 PyPI version JSON
download
home_pagehttps://github.com/elijah-roberts/gitlab-lint
SummaryThis is a CLI application to quickly lint .gitlab-ci.yml files using the gitlab api
upload_time2024-07-01 01:51:52
maintainerNone
docs_urlNone
authorElijah Roberts
requires_python<4.0,>=3.10
licenseMIT
keywords gitlab lint
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # gitlab_lint

[![Downloads](https://pepy.tech/badge/gitlab-lint)](https://pepy.tech/project/gitlab-lint)

This is a CLI application to quickly lint `.gitlab-ci.yml` files using the GitLab api.
This can easily be added as a pre-commit step to locally catch any issues with your configuration prior to pushing your changes.

## Installation

`$ python3 -m pip install -U gitlab_lint`

## Configuration

### Parameters

Run `gll --help` for full descriptions.
All parameters can be set by environment variable, simply prefix the double-dash or long version with `GLL_`.
These can be added to your ~/.profile or ~/.bash_profile for convenience.
If options/arguments aren't set it, the application will search for GitLab CI variables instead.

## Example Usage

If your .gitlab-ci.yml is in the current directory it is as easy as:

```bash
$ gll
GitLab CI configuration is valid
```

Failures will appear like so:

```bash
$ gll
# GitLab CI configuration is invalid
# (<unknown>): could not find expected ':' while scanning a simple key at line 26 column 1
```

If you need to you can specify the path:

```bash
$ gll --file path/to/.gitlab-ci.yml
# GitLab CI configuration is valid
```

If you choose not to set the envvars for domain and token you can pass them in as flags:

```bash
$ gll --file path/to/.gitlab-ci.yml --domain gitlab.mycompany.com --project 1234 --token <gitlab personal token>
# GitLab CI configuration is valid
```

Https verification is enabled by default, if you wish to disable it pass the `--insecure | -i` flag:

```bash
$ gll --insecure
# GitLab CI configuration is valid
```

## Development

### Bug Reports & Feature Requests

Please use the submit a issue to report any bugs or file feature requests.

### Developing

<!--- pyml disable-next-line md013-->
If you are interested in being a contributor and want to get involved in developing this CLI application feel free to reach out!

In general, PRs are welcome. We follow the typical trunk based development Git workflow.

1. **Fork** the repo
1. **Clone** the project to your own machine
1. **Run** the devcontainer
1. **Make** and **test** your changes
1. **Commit** changes to your branch using `cz bump`
1. **Push** your work back up to your branch including tags `git push --all`
1. Submit a **Merge/Pull Request** so that we can review your changes

**NOTE:** Be sure to merge the latest changes from upstream before making a pull request!

### Virtual environments

This project supports Poetry for Python virtual environments.
Poetry may be installed via `pip`, and environments can be accessed with `poetry shell` or `poetry run`.

At the current time there's a bit of a clash with Flakes and Poetry2Nix.
`editablePackageSources` property is at odds with the pureness of flakes.
One can work around this by `direnv reload` on every change to package source code, or by directly running `python gll.py`.
[GitHub issue](https://github.com/nix-community/poetry2nix/issues/425)

#### Tests

Run tests in root directory with `pytest`

### pre-commit

To use this with pre-commit.com, you can use something like

```yaml
-   repo: https://github.com/mick352/gitlab-lint
    rev: pre-commit-hook
    hooks:
    -   id: gitlab-ci-check
        pass_filenames: false
        args: [-d, my.private.gitlab.com, -p, project_id, -t, private_token]
```

(or remove the `args` line for gitlab.com).

### TODO

Look into automagic release jobs

```Bash
poetry version $(git describe --tags --abbrev=0)
poetry build
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/elijah-roberts/gitlab-lint",
    "name": "gitlab-lint-srt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "gitlab, lint",
    "author": "Elijah Roberts",
    "author_email": "elijah@elijahjamesroberts.com",
    "download_url": "https://files.pythonhosted.org/packages/d6/fd/50083300e2ede1ec552d5ad3a5773839bc6b69c579b93b40fce75c9564b3/gitlab_lint_srt-0.8.1.tar.gz",
    "platform": null,
    "description": "# gitlab_lint\n\n[![Downloads](https://pepy.tech/badge/gitlab-lint)](https://pepy.tech/project/gitlab-lint)\n\nThis is a CLI application to quickly lint `.gitlab-ci.yml` files using the GitLab api.\nThis can easily be added as a pre-commit step to locally catch any issues with your configuration prior to pushing your changes.\n\n## Installation\n\n`$ python3 -m pip install -U gitlab_lint`\n\n## Configuration\n\n### Parameters\n\nRun `gll --help` for full descriptions.\nAll parameters can be set by environment variable, simply prefix the double-dash or long version with `GLL_`.\nThese can be added to your ~/.profile or ~/.bash_profile for convenience.\nIf options/arguments aren't set it, the application will search for GitLab CI variables instead.\n\n## Example Usage\n\nIf your .gitlab-ci.yml is in the current directory it is as easy as:\n\n```bash\n$ gll\nGitLab CI configuration is valid\n```\n\nFailures will appear like so:\n\n```bash\n$ gll\n# GitLab CI configuration is invalid\n# (<unknown>): could not find expected ':' while scanning a simple key at line 26 column 1\n```\n\nIf you need to you can specify the path:\n\n```bash\n$ gll --file path/to/.gitlab-ci.yml\n# GitLab CI configuration is valid\n```\n\nIf you choose not to set the envvars for domain and token you can pass them in as flags:\n\n```bash\n$ gll --file path/to/.gitlab-ci.yml --domain gitlab.mycompany.com --project 1234 --token <gitlab personal token>\n# GitLab CI configuration is valid\n```\n\nHttps verification is enabled by default, if you wish to disable it pass the `--insecure | -i` flag:\n\n```bash\n$ gll --insecure\n# GitLab CI configuration is valid\n```\n\n## Development\n\n### Bug Reports & Feature Requests\n\nPlease use the submit a issue to report any bugs or file feature requests.\n\n### Developing\n\n<!--- pyml disable-next-line md013-->\nIf you are interested in being a contributor and want to get involved in developing this CLI application feel free to reach out!\n\nIn general, PRs are welcome. We follow the typical trunk based development Git workflow.\n\n1. **Fork** the repo\n1. **Clone** the project to your own machine\n1. **Run** the devcontainer\n1. **Make** and **test** your changes\n1. **Commit** changes to your branch using `cz bump`\n1. **Push** your work back up to your branch including tags `git push --all`\n1. Submit a **Merge/Pull Request** so that we can review your changes\n\n**NOTE:** Be sure to merge the latest changes from upstream before making a pull request!\n\n### Virtual environments\n\nThis project supports Poetry for Python virtual environments.\nPoetry may be installed via `pip`, and environments can be accessed with `poetry shell` or `poetry run`.\n\nAt the current time there's a bit of a clash with Flakes and Poetry2Nix.\n`editablePackageSources` property is at odds with the pureness of flakes.\nOne can work around this by `direnv reload` on every change to package source code, or by directly running `python gll.py`.\n[GitHub issue](https://github.com/nix-community/poetry2nix/issues/425)\n\n#### Tests\n\nRun tests in root directory with `pytest`\n\n### pre-commit\n\nTo use this with pre-commit.com, you can use something like\n\n```yaml\n-   repo: https://github.com/mick352/gitlab-lint\n    rev: pre-commit-hook\n    hooks:\n    -   id: gitlab-ci-check\n        pass_filenames: false\n        args: [-d, my.private.gitlab.com, -p, project_id, -t, private_token]\n```\n\n(or remove the `args` line for gitlab.com).\n\n### TODO\n\nLook into automagic release jobs\n\n```Bash\npoetry version $(git describe --tags --abbrev=0)\npoetry build\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This is a CLI application to quickly lint .gitlab-ci.yml files using the gitlab api",
    "version": "0.8.1",
    "project_urls": {
        "Homepage": "https://github.com/elijah-roberts/gitlab-lint",
        "Repository": "https://github.com/elijah-roberts/gitlab-lint"
    },
    "split_keywords": [
        "gitlab",
        " lint"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bade1b48de4a62f39a140ba98fac2d20efee789734e15c81c9408e7295795435",
                "md5": "52adbd8a49ca4751d3200f1dd5c2b265",
                "sha256": "38b0a950499823317502064cdd19d677781a1382e15f85a245948a4685776d70"
            },
            "downloads": -1,
            "filename": "gitlab_lint_srt-0.8.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "52adbd8a49ca4751d3200f1dd5c2b265",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 6598,
            "upload_time": "2024-07-01T01:51:50",
            "upload_time_iso_8601": "2024-07-01T01:51:50.961785Z",
            "url": "https://files.pythonhosted.org/packages/ba/de/1b48de4a62f39a140ba98fac2d20efee789734e15c81c9408e7295795435/gitlab_lint_srt-0.8.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d6fd50083300e2ede1ec552d5ad3a5773839bc6b69c579b93b40fce75c9564b3",
                "md5": "37ad58d0c685f197b4254a14cba43030",
                "sha256": "73e751f15c6ae84550660d8c64055306d8b61265cc183f8d7acb95e1e1f17981"
            },
            "downloads": -1,
            "filename": "gitlab_lint_srt-0.8.1.tar.gz",
            "has_sig": false,
            "md5_digest": "37ad58d0c685f197b4254a14cba43030",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 5902,
            "upload_time": "2024-07-01T01:51:52",
            "upload_time_iso_8601": "2024-07-01T01:51:52.857666Z",
            "url": "https://files.pythonhosted.org/packages/d6/fd/50083300e2ede1ec552d5ad3a5773839bc6b69c579b93b40fce75c9564b3/gitlab_lint_srt-0.8.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-01 01:51:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "elijah-roberts",
    "github_project": "gitlab-lint",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "gitlab-lint-srt"
}
        
Elapsed time: 4.93635s