Skip to content

Instantly share code, notes, and snippets.

@dragoonis
Created August 13, 2018 23:01
Show Gist options
  • Select an option

  • Save dragoonis/bca127e7df6368b77fc7a9ffcf07dcf6 to your computer and use it in GitHub Desktop.

Select an option

Save dragoonis/bca127e7df6368b77fc7a9ffcf07dcf6 to your computer and use it in GitHub Desktop.

Revisions

  1. dragoonis created this gist Aug 13, 2018.
    9 changes: 9 additions & 0 deletions lint_jenkinsfile.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # Run each thru the linter
    shopt -s nullglob
    for jenkinsFile in "${SEARCH_FOLDER}"/Jenkinsfile* ; do
    echo "Linting ${jenkinsFile}"
    if ! java -jar ~/tools/jenkins-cli.jar -i JENKINS_KEY -s JENKINS_URL declarative-linter<"${jenkinsFile}" ; then
    OVERALL_RESULT=1
    fi
    done