script pipeline with rabbitmq

32 views
Skip to first unread message

Arturo Arenas

unread,
Jun 16, 2020, 3:47:52 PM6/16/20
to Jenkins Users
hello everybody !!

someone tried to do this?

node {
    docker
.image('rabbitmq:3').withRun('--rm --hostname test-rabbit --name test-rabbit -p 15672:15672') { c ->
        docker
.image('rabbitmq:3').inside("--link ${c.id}:db") {
          sh
'rabbitmqctl list_users'
       
}
        docker
.image('fedora').inside("--link ${c.id}:db") {
            sh
'ls'
       
}
   
}
}

also i tried to do this

pipeline {
    agent
{
        docker
'fedora'
   
}
    options
{
        buildDiscarder
(logRotator(numToKeepStr: '1'))
   
}
    stages
{
        stage
('RabbitMQ') {
            steps
{
              script
{
                  docker
.image('rabbitmq:3').withRun('--rm --hostname test-rabbit --name test-rabbit -p 15672:15672') { c ->
                    docker
.image('rabbitmq:3').inside("--link ${c.id}:db") {
                        sh
'rabbitmqctl list_users'
                   
}
                 
}
             
}
           
}
       
}
   
}
}


I'm having problems to perform my script

thanks in advance

Jan Monterrubio

unread,
Jun 16, 2020, 6:36:51 PM6/16/20
to jenkins...@googlegroups.com
What are you trying to accomplish here? It looks like setup some queues and db as infrastructure for something else that depends on it?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/15b91650-e515-4370-b23f-f2946ff12ff0o%40googlegroups.com.

Arturo Arenas

unread,
Jun 16, 2020, 11:01:21 PM6/16/20
to Jenkins Users

Hello Jan,

Yes, i want to perform some test with AMQP in mi code, therefore, i need running sidecars containers, but i get some issues with that implementation.  
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.

Jan Monterrubio

unread,
Jun 17, 2020, 6:36:04 PM6/17/20
to jenkins...@googlegroups.com
Check out the sidecar portion of these docs: 

I think maybe the initial agent part is what might not be making it work. 

On Tue, Jun 16, 2020 at 14:48 Arturo Arenas <arturo...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages