Skip to content

Commit 765c8a7

Browse files
committed
[WIP] Add CI to validate pipeline
1 parent 7a06a93 commit 765c8a7

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Pipeline-Linter
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
syntax_check:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v5
13+
14+
- name: Check Jenkinsfile file
15+
id: validate
16+
uses: fjogeleit/http-request-action@v1
17+
with:
18+
url: https://osci-jenkins-1.ci.fedoraproject.org/pipeline-model-converter/validate
19+
method: POST
20+
# files: '{ "jenkinsfile" : "${{ github.workspace }}/Jenkinsfile" }'
21+
file: ${{ github.workspace }}/Jenkinsfile
22+
- name: Check validation result
23+
run: |
24+
echo "status=${{ steps.validate.outputs.status }}"
25+
echo ${{ steps.validate.outputs.response }}
26+
if [[ ! ${{ steps.validate.outputs.response }} =~ .*"successfully validated".* ]]; then
27+
exit 1
28+
fi

0 commit comments

Comments
 (0)