pipeline with docker and warnings (pylint)

9 views
Skip to first unread message

kristian kvilekval

unread,
May 19, 2017, 6:07:58 PM5/19/17
to Jenkins Users
I am trying to create a pipeline step that will display pylint warnings.  I have a docker container with the code which will write a /reports/pylint.log file 

I would like to run the  container and wait for the container to exit before executing the warning plugin on the resulting file.  
What I see instead is the container is started in daemon mode and the stopped/removed immediately.

Here is my example:


  stage ("Build") {
    def image = docker.build ("biodev.ece.ucsb.edu:5000/bisque06", '.')
    stage ("Test"){
      def workspace = pwd()
      image.withRun ("-v ${workspace}/reports:/reports", "bootstrap pylint unit-tests") { c->
        // WAIT FOR run to be completed.. 
        warnings canComputeNew: false, canResolveRelativePaths: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: [[parserName: 'PyLint', pattern: 'reports/pylint.log']], unHealthy: ''
      }
    }

Any help appreciated.
Kris








Reply all
Reply to author
Forward
0 new messages