#28 add flake8 into the Jenkinsfile
Merged 6 years ago by mjia. Opened 6 years ago by mjia.
mjia/waiverdb flake8_Jenkins  into  master

file modified
+3
@@ -12,6 +12,9 @@ 

  

  node('rcm-tools-jslave-rhel-7') {

      checkout scm

+     stage('Invoke Flake8') {

+         sh 'flake8'

This won't execute with the same rules as the one enforced in tox. You can execute just the lint rule in tox with tox -e lint so it runs with the same rules it runs for developers.

mjia commented 6 years ago

As the doc says, it will run with the rules configured in the tox.ini.
http://flake8.pycqa.org/en/latest/user/configuration.html#configuration-locations

Whoa, fancy. I've been needlessly duplicating my configuration to setup.cfg. :thumbsup:

+     }

      stage('Build SRPM') {

          sh './rpmbuild.sh -bs'

          archiveArtifacts artifacts: 'rpmbuild-output/**'

no initial comment

Better put this in its own build stage. It's not part of building the SRPM.

rebased

6 years ago

@dcallagh this one as well, please, :smile:

You can just invoke python instead of /usr/bin/python.

(We have to invoke /usr/bin/mock with the full path because of the mess with /usr/sbin/mock setuid helper.)

rebased

6 years ago

Yeah, I thought there must be a reason to call mock like that. I've updated the PR.

:+1: but ideally test it in Jenkins before merging

👍 but ideally test it in Jenkins before merging

Yeah, that reminds me that I need to get flask-oidc built in eng-rhel-7.

This won't execute with the same rules as the one enforced in tox. You can execute just the lint rule in tox with tox -e lint so it runs with the same rules it runs for developers.

As the doc says, it will run with the rules configured in the tox.ini.
http://flake8.pycqa.org/en/latest/user/configuration.html#configuration-locations

Whoa, fancy. I've been needlessly duplicating my configuration to setup.cfg. :thumbsup:

rebased

6 years ago

I've tested it in Jenkins and it works as expected.

Pull-Request has been merged by mjia

6 years ago
Metadata