blob: 9f62e8fe593eb78f9e9613f104b03c9dcdb2b4a4 [file] [log] [blame]
node('sre-team-infra') {
timestamps() {
ansiColor('xterm') {
tmp_jenkins_config = '/dev/shm/sre-jenkins-job-builder.ini'
stage('Checkout') {
checkout scm
}
stage('Codenarc') {
try {
sh '''#!/bin/bash -ex
docker run --rm \
-t --user "\$(id -u):\$(id -g)" \
-w \$PWD -v ${WORKSPACE}:/shared \
docker-prod-local.docker.mirantis.net/infra/codenarc:latest \
-rulesetfiles="rulesets/basic.xml" \
-maxPriority1Violations=0 \
-maxPriority2Violations=0 \
-maxPriority3Violations=0 \
-report=console \
-report=html:/shared/report.html 2>&1 \
| tee report.log
if [ "${PIPESTATUS[0]}" != '0' ]; then
exit 1
fi
'''
}
finally {
archiveArtifacts \
artifacts: "**/report.html",
allowEmptyArchive: false
}
}
stage ("Test python with pep8"){
sh """
set -e
tox
"""
}
}
}
}