Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34633

ansible-plugin with pipeline groovy multiple misbehaviours

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      environment

      1. server side:
        • Jenkins 2.1, pipeline plugin: 2.1, ansible 2.0
        • Java: oracle jdk8: build 1.8.0_91-b14
        • os: Ubuntu 14.04.4 LTS
      2. client side:
        • Google chrome Version 50.0.2661.94 (64-bit)
        • Fedora 23

      list of issues:

      1. when you want to generate snippet for eitherplaybook or ad-hoc command, the groovy generated does not have unbufferedOutput flag, no matter the value
        • reproducing: click "Snippet Generator", Sample step: "General build step", in "Build Step" choose either ansible playbook or ad-hoc, and play with unbuffered flag, pressing "Generate" after each change - does not affect groovy
      2. I have created a "deep" closure of:
        node('master') {
            withCredentials([[
                    $class           : 'AmazonWebServicesCredentialsBinding',
                    credentialsId    : creds_id_amazon,
                    accessKeyVariable: 'AWS_ACCESS_KEY_ID',
                    secretKeyVariable: 'AWS_SECRET_ACCESS_KEY'
                ]]) {
                dir('dnoc'){
                    wrap([$class: 'TimestamperBuildWrapper']){
                        wrap([$class: 'AnsiColorBuildWrapper', colorMapName: "xterm"]){
                             // call to ansible via:
                             def result = step([
                                $class              : 'AnsibleAdHocCommandBuilder',
                                //....
                              ])                     
                         }
                    } 
                }
            }
        }
        

        Fails with:

        [Pipeline] step
        23:42:14 FATAL: command execution failed
        23:42:14 hudson.AbortException: The ansible playbook build step requires to be launched on a node
        23:42:14 	at org.jenkinsci.plugins.ansible.AnsibleAdHocCommandBuilder.perform(AnsibleAdHocCommandBuilder.java:158)
        23:42:14 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:68)
        23:42:14 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)
        23:42:14 	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:49)
        23:42:14 	at hudson.security.ACL.impersonate(ACL.java:213)
        23:42:14 	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:47)
        23:42:14 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        23:42:14 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        23:42:14 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        23:42:14 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        23:42:14 	at java.lang.Thread.run(Thread.java:745)
        [Pipeline] }
        

        Attachments

          Issue Links

            Activity

            Hide
            mvk Max Kovgan added a comment -

            This could be the problem with issue 2.

            Show
            mvk Max Kovgan added a comment - This could be the problem with issue 2.
            Hide
            michaelcresswell Michael Cresswell added a comment -

            Ansible Adhoc command pipeline support will be covered by JENKINS-49056

            Show
            michaelcresswell Michael Cresswell added a comment - Ansible Adhoc command pipeline support will be covered by  JENKINS-49056
            Hide
            michaelcresswell Michael Cresswell added a comment -

            General build steps are currently blocked by JENKINS-43782.

            Show
            michaelcresswell Michael Cresswell added a comment - General build steps are currently blocked by  JENKINS-43782 .

              People

              • Assignee:
                sirot Jean-Christophe Sirot
                Reporter:
                mvk Max Kovgan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: