2020-06-24 07:51:04 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
function _checkci() {
|
2020-07-11 10:25:30 +00:00
|
|
|
local username
|
|
|
|
username="$(git config --global -l | grep "user.email" | cut -d'@' -f1 | cut -d'=' -f2)"
|
|
|
|
local jenkinsfile="${1:-Jenkinsfile}"
|
|
|
|
curl --user "$username:$JENKINS_SECRET" -X POST -F "jenkinsfile=<$jenkinsfile" "$JENKINS_URL/pipeline-model-converter/validate"
|
2020-06-24 07:51:04 +00:00
|
|
|
}
|
|
|
|
_checkci "$*"
|
|
|
|
exit 0
|