Created
November 8, 2021 17:40
-
-
Save wesley-dean/8b6cf02d0831b2f6b20586f7da78bfff to your computer and use it in GitHub Desktop.
Mega-Linter on Jenkins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": "recommended", | |
"rules": { | |
"convention.CompileStatic": "off", | |
"convention.NoDef": "off", | |
"convention.VariableTypeRequired": "off", | |
"convention.MethodReturnTypeRequired": "off", | |
"groovyism.ExplicitCallToEqualsMethod": "off", | |
"groovyism.GStringExpressionWithinString": "off", | |
"naming.VariableName": "off", | |
"naming.FactoryMethodName": "off", | |
"unnecessary.UnnecessaryGetter": "off", | |
"size.NestedBlockDepth": { | |
"maxNestedBlockDepth": 10 | |
}, | |
"unused.UnusedVariable": { | |
"ignoreVariableNames": "_" | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stage('Meta-Linter') { | |
agent { | |
docker { | |
image 'megalinter/megalinter:latest' | |
args "-e VALIDATE_ALL_CODEBASE=true -v ${WORKSPACE}:/tmp/lint --entrypoint='' GROOVY_NPM_GROOVY_LINT_ARGUMENTS = '--no-insight' DISABLE_LINTERS = 'SPELL_CSPELL'" | |
reuseNode true | |
} | |
} | |
steps { | |
sh '/entrypoint.sh' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why is this different from the recommended configuration on the Mega-Linter website?
A few reasons:
ENTRYPOINT
in a Dockerfile) and the error reporting was written to a log file in an ephemeral container and that just wasn't helping me0.0.0.0:443
and colliding with another listener; the listener was for the Amplitude insight service which collects anonymous usage statistics and phones home with them; therefore, not for privacy reasons but practical ones, I had to pass--no-insight
so that the Groovy linter wouldn't fail)