Declarative: Support for multiple docker agents run in parallel and communicating

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Declarative does not have structures to support docker.withRun as in this example, from "Running the Tests" section of this blog post:
      (https://jenkins.io/blog/2016/08/10/rails-cd-with-pipeline/#writing-the-pipeline)

      node('docker') {
          docker.image('postgres').withRun { container ->
              docker.image('rtyler/rvm:2.3.0').inside("--link=${container.id}:postgres") { 
                  rvm "bundle install"
      
                  withEnv(['DATABASE_URL=postgres://postgres@postgres:5432/']) { 
                      rvm "bundle exec rake"
                  }
                  junit 'spec/reports/*.xml' 
              }
          }
      }
      

      Note, the example in the blog includes stages inside the inner docker agent, but that is a separate concept.

            Assignee:
            Andrew Bayer
            Reporter:
            Liam Newman
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: