[JIRA] [ansible-plugin] (JENKINS-34633) ansible-plugin with pipeline groovy multiple misbehaviours

12 views
Skip to first unread message

maxk@devopsent.biz (JIRA)

unread,
May 5, 2016, 5:22:01 PM5/5/16
to jenkinsc...@googlegroups.com
Max Kovgan created an issue
 
Jenkins / Bug JENKINS-34633
ansible-plugin with pipeline groovy multiple misbehaviours
Issue Type: Bug Bug
Assignee: Jean-Christophe Sirot
Components: ansible-plugin
Created: 2016/May/05 9:21 PM
Priority: Minor Minor
Reporter: Max Kovgan

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] }
    
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

maxk@devopsent.biz (JIRA)

unread,
May 5, 2016, 5:51:01 PM5/5/16
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages