Skip to content

Instantly share code, notes, and snippets.

@matheusvt2
Created February 28, 2020 22:56
Show Gist options
  • Save matheusvt2/e621bd1890c0f66ef5a48243097d2d1e to your computer and use it in GitHub Desktop.
Save matheusvt2/e621bd1890c0f66ef5a48243097d2d1e to your computer and use it in GitHub Desktop.
parallel example
stage('Quality Tests'){
parallel{
stage ('Lynt Test'){
steps{
script{
pyLynt("Arquivos",100)
}
}
}
stage('SonarQube analysis'){
steps {
script{
dir ("Arquivos"){
sh "coverage run teste.py"
sh "coverage report"
sh "coverage xml -o coverage.xml"
withSonarQubeEnv('sonarQube') {
sh "${scannerHome}/bin/sonar-scanner -Dsonar.projectName='Python :: docker-pipeline' -Dsonar.projectKey='docker-pipeline' -Dsonar.sources=. -Dsonar.projectVersion=${BUILD_NUMBER} -Dsonar.language=py -Dsonar.sourceEncoding=UTF-8 -Dsonar.python.coverage.reportPath=coverage.xml -Dsonar.python.xunit.reportPath=TEST-teste-report.xml"
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment