[JIRA] (JENKINS-41581) Declarative: Support for multiple docker agents run in parallel and communicating

3 views
Skip to first unread message

bitwiseman@gmail.com (JIRA)

unread,
Jan 30, 2017, 7:02:02 PM1/30/17
to jenkinsc...@googlegroups.com
Liam Newman created an issue
 
Jenkins / New Feature JENKINS-41581
Declarative: Support for multiple docker agents run in parallel and communicating
Issue Type: New Feature New Feature
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2017/Jan/31 12:01 AM
Priority: Minor Minor
Reporter: Liam Newman

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") { 
            stage 'Install Gems'
            rvm "bundle install"

            stage 'Invoke Rake'
            withEnv(['DATABASE_URL=postgres://postgres@postgres:5432/']) { 
                rvm "bundle exec rake"
            }
            junit 'spec/reports/*.xml' 
        }
    }
}
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

bitwiseman@gmail.com (JIRA)

unread,
Jan 30, 2017, 7:44:02 PM1/30/17
to jenkinsc...@googlegroups.com
Liam Newman updated an issue
Change By: Liam Newman

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)

{code:language=groovy}

node('docker') {
    docker.image('postgres').withRun { container ->
        docker.image('rtyler/rvm:2.3.0').inside("--link=${container.id}:postgres") {
            stage 'Install Gems'
            rvm "bundle install"

            stage 'Invoke Rake'
            withEnv(['DATABASE_URL=postgres://postgres@postgres:5432/']) {
                rvm "bundle exec rake"
            }
            junit 'spec/reports/*.xml'
        }
    }
}
{code}

bitwiseman@gmail.com (JIRA)

unread,
Jan 30, 2017, 7:45:02 PM1/30/17
to jenkinsc...@googlegroups.com
Liam Newman updated an issue
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)

{code:language=groovy}
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'
        }
    }
}
{code}

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

jdumay@cloudbees.com (JIRA)

unread,
Mar 6, 2018, 5:25:03 PM3/6/18
to jenkinsc...@googlegroups.com
James Dumay resolved as Duplicate
Change By: James Dumay
Status: Open Resolved
Resolution: Duplicate
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:16 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Duplicate
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages