Skip to content
Snippets Groups Projects
Commit 6b8eb549 authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Adding Jenkinsfile for linting

parent 311a9e11
No related branches found
No related tags found
1 merge request!3Add readme
pipeline {
agent none
options {
gitlabBuilds(builds: ['Linting', 'Build-env', 'Build ood', 'Build compute', 'Build ohpc'])
}
stages {
stage('Linting') {
agent {
docker {
image 'cytopia/pylint'
args '--entrypoint= '
}
}
steps {
script {
echo "RESULT: ${currentBuild.result}"
try {
sh 'pylint *.py'
} catch (err) {
echo err.getMessage()
unstable('Linting failed')
echo "RESULT: ${currentBuild.result}"
}
}
}
post {
success {
updateGitlabCommitStatus name: 'Linting', state: 'success'
}
unstable {
// workaround for allow failure
// updateGitlabCommitStatus only support pending, running, canceled, success, failed
// So, use success state with failed name to indicate linting failed but continue CI pipeline
updateGitlabCommitStatus name: 'Linting', state: 'failed'
}
}
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment