Skip to content

Instantly share code, notes, and snippets.

@AndrewOfC
AndrewOfC / gitlab_ci_lint.py
Created Feb 13, 2019
Q&D python for command line to validate .gitlab-ci.yml
View gitlab_ci_lint.py
#! /usr/bin/python
#
# script to validate .gitlab-ci.yml
#
import sys
import requests
import json
def main():
r = requests.post("https://gitlab.example.com/api/v4/ci/lint", json={ 'content': file(sys.argv[1], 'r').read() })
You can’t perform that action at this time.