You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-9Lines changed: 21 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,16 @@
1
1
## gitlab-ci-validate
2
+
2
3
This tool uses GitLab's CI [config validation API endpoint](https://docs.gitlab.com/ce/api/lint.html) to validate local config files.
3
4
4
5
If you don't want to use the command line, you can paste your config into `https://gitlab.com/<your project>/-/ci/lint`[[ref](https://docs.gitlab.com/ee/ci/yaml/#validate-the-gitlab-ciyml)]
5
6
6
7
### Usage
8
+
7
9
One or more `.gitlab-ci.yml` are passed as arguments on the command line. Any errors will result in a non-zero exit code. The filename must end in `.yml` to pass, but doesn't have to be `.gitlab-ci.yml`.
10
+
An access token must be provided in order to authenticate throw gitlab API. [Here to generate one](https://gitlab.com/-/profile/personal_access_tokens).
The flag has precedence over the environment variable.
43
49
When not specified the host used is by default `https://gitlab.com`
44
50
45
51
### Installation
52
+
46
53
You can either use a premade binary from the [releases page](https://github.com/Code0x58/gitlab-ci-validate/releases) or you can install it using `go get`:
54
+
47
55
```sh
48
56
go get -u github.com/Code0x58/gitlab-ci-validate
49
57
```
50
58
51
59
#### Usage with Docker containers
60
+
52
61
You can use the Dockerfile to build your own image or use the pre-built version available at the [Gitlab container registry](https://gitlab.com/comedian780/docker-gitlab-ci-validate/container_registry).
53
62
54
63
You can run tests against the gitlab.com endpoint:
55
64
If no parameter is given the container will look for a file called `.gitlab-ci.yml`
0 commit comments