diff --git a/Jenkinsfile b/Jenkinsfile index f2e37d8..43c4795 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -96,19 +96,19 @@ pipeline { echo python3 - <<'PY' - import json - import pathlib +import json +import pathlib - paths = sorted(pathlib.Path('.').glob('schemas/*.json')) - paths += sorted(pathlib.Path('.').glob('profiles/*.json')) - paths += sorted(pathlib.Path('.').glob('machines/*.json')) - if not paths: - raise SystemExit('ERROR: no JSON contracts or manifests found.') - for path in paths: - with path.open(encoding='utf-8') as stream: - json.load(stream) - print(f'OK: {path}') - PY +paths = sorted(pathlib.Path('.').glob('schemas/*.json')) +paths += sorted(pathlib.Path('.').glob('profiles/*.json')) +paths += sorted(pathlib.Path('.').glob('machines/*.json')) +if not paths: + raise SystemExit('ERROR: no JSON contracts or manifests found.') +for path in paths: + with path.open(encoding='utf-8') as stream: + json.load(stream) + print(f'OK: {path}') +PY ''' } } @@ -158,7 +158,7 @@ pipeline { echo "No merge conflict markers found." fi - suspicious="$(git ls-files | grep -E '\.(tmp|bak|old|orig|rej)$' || true)" + suspicious="$(git ls-files | grep -E '[.](tmp|bak|old|orig|rej)$' || true)" if [ -n "${suspicious}" ]; then echo >&2 echo "WARNING: suspicious tracked backup/temp files:"