Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ setup: true


orbs:
dynamic: bjd2385/dynamic-continuation@3.7.1
general: premiscale/general@1.0.12
slack: circleci/slack@4.12.5
dynamic: bjd2385/dynamic-continuation@3.8.1
general: premiscale/general@1.2.0
slack: circleci/slack@4.13.2


workflows:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1


orbs:
shellcheck: circleci/shellcheck@3.1.1
shellcheck: circleci/shellcheck@3.2.0


workflows:
Expand Down
18 changes: 14 additions & 4 deletions .circleci/src.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
version: 2.1

orbs:
general: premiscale/general@1.0.9
general: premiscale/general@1.2.0


executors:
python3-12:
docker:
- image: cimg/python:3.12.3

python3-11:
docker:
- image: cimg/python:3.11.9

python3-10:
docker:
- image: cimg/python:3.10.6
- image: cimg/python:3.10.14

python3-9:
docker:
- image: cimg/python:3.9.12
- image: cimg/python:3.9.19

python3-8:
docker:
- image: cimg/python:3.8.13
- image: cimg/python:3.8.19


workflows:
Expand All @@ -34,6 +42,8 @@ workflows:
matrix:
parameters:
executor:
- python3-12
- python3-11
- python3-10
- python3-9
- python3-8
Expand Down
2 changes: 1 addition & 1 deletion .circleci/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2.1
executors:
python3-10:
docker:
- image: cimg/python:3.10.6
- image: cimg/python:3.10.14


jobs:
Expand Down
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"packageRules": [
{
"matchCategories": ["python"],
"matchUpdateTypes": ["patch", "minor"],
"groupName": "python (non-major)"
}
]
}
2 changes: 1 addition & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository:
has_wiki: false
has_downloads: true

default_branch: master
default_branch: main

allow_squash_merge: true
allow_merge_commit: true
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ repos:
hooks:
- id: pylint
args:
- --rcfile=.pylintrc
- premiscale/
- --rcfile=pyproject.toml
- src/

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.15
Expand Down
7 changes: 0 additions & 7 deletions .pylintrc

This file was deleted.

21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ optional arguments:
-q, -Q, --quiet Silently fail and pass, without output, unless improperly configured. (default: False)
```

## Install
## Use

### Install

```shell
pip install pre-commit-gitlabci-lint
```

## Use

### Setup

1. [Create an access token](https://gitlab.com/-/profile/personal_access_tokens) with `api` scope.
Expand All @@ -58,13 +58,21 @@ token = "$GITLAB_TOKEN"

### Shell

<details>
<summary><b>Expand</b></summary>

```console
$ export GITLAB_TOKEN="$(pass show gitlab-api-key)"
$ gitlabci-lint -p <project_id>
Config file at '.gitlab-ci.yml' is valid.
```

### pre-commit
</details>

### Pre-commit

<details>
<summary><b>Expand</b></summary>

An example `.pre-commit-config.yaml`:

Expand All @@ -77,9 +85,13 @@ repos:
- id: gitlabci-lint
# args: [-b, 'https://custom.gitlab.host.com', '-p', '12345678']
```
</details>

### GitLab CI

<details>
<summary><b>Expand</b></summary>

Here is an example Gitlab CI job that lints all GitLab CI files in a project on merge requests with naming conventions matching the regex `.*.gitlab-ci.yml`.

```yaml
Expand Down Expand Up @@ -118,3 +130,4 @@ gitlab-ci-lint:
rules:
- $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^(develop|main)$/
```
</details>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gitlabci-lint]
quiet = true
base-url = https://git.ops.sbe-vision.com
base-url = https://git.hello.com
configs = [ .gitlab-ci.yml ]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gitlabci-lint]
quiet = false
base-url = https://git.ops.sbe-vision.com
base-url = https://git.hello.com
configs = [ .gitlab-ci.yml ]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pre-commit-gitlabci-lint",
"description": "pre-commit hook for GitLab CI validation",
"repository": "[email protected]:bjd2385/pre-commit-gitlabci-lint.git",
"author": "Emma Doyle <emma@sbevision.com>",
"author": "Emma Doyle <emma@premiscale.com>",
"license": "MIT",
"scripts": {
"install:dependencies": "./scripts/dependencies.sh",
Expand Down
Loading