[JIRA] (JENKINS-56598) Unable to bind withCredentials variables inside running pod

2019-03-21 Thread thomascoope...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-56598  
 
 
  Unable to bind withCredentials variables inside running pod   
 

  
 
 
 
 

 
Change By: 
 Thomas Cooper  
 

  
 
 
 
 

 
 When running via declarative pipeline, any variables bound via Credentials Binding plugin are empty and cannot be used on the running pod. The environment variable should be set via the `withCredentials` but never does. {code:java}pipeline {  agent { label 'my-pod-label-from-config' }  stages {...stage('Run Playbook') {   steps { script {   withCredentials([string(credentialsId: " ocp k8s - ${params.Environment}-ansible-sa- token -credential ", variable: 'K8S_AUTH_API_KEY')]) { sh "printenv" // K8S_AUTH_API_KEY env var is completely missing...ansiblePlaybook playbook: "playbooks/something.yml", extraVars: ... // the k8s Ansible module relies on K8S_AUTH_API_KEY being set and fails due to 401 UNAUTHORIZED{code}I've seen a number of PRs opened to address other environment variables set by Jenkins itself (ie. COMMIT_ID and other SCM related vars). However, no combination of withCredentials seems to work when running inside a pod.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from 

[JIRA] (JENKINS-56598) Unable to bind withCredentials variables inside running pod

2019-03-21 Thread thomascoope...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-56598  
 
 
  Unable to bind withCredentials variables inside running pod   
 

  
 
 
 
 

 
Change By: 
 Thomas Cooper  
 

  
 
 
 
 

 
 When running via declarative pipeline, any variables bound via Credentials Binding plugin are empty and cannot be used on the running pod. The environment variable should be set via the `withCredentials` but never does. {code:java} pipeline {  agent { label 'my-pod-label-from-config' }  stages {... stage('Run Playbook') {   steps { script {   withCredentials([string(credentialsId: "ocp-${params.Environment}-ansible-sa-token", variable: 'K8S_AUTH_API_KEY')]) { sh "printenv" // K8S_AUTH_API_KEY env var is completely missing...ansiblePlaybook playbook: "playbooks/something.yml", extraVars: ... // the k8s Ansible module relies on K8S_AUTH_API_KEY being set and fails due to 401 UNAUTHORIZED{code}I've seen a number of PRs opened to address other environment variables set by Jenkins itself (ie. COMMIT_ID and other SCM related vars). However, no combination of withCredentials seems to work when running inside a pod.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 

[JIRA] (JENKINS-56300) New step or option that does not block on individual job completion

2019-03-21 Thread thomascoope...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-56300  
 
 
  New step or option that does not block on individual job completion   
 

  
 
 
 
 

 
Change By: 
 Thomas Cooper  
 
 
Priority: 
 Major Minor  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-56598) Unable to bind withCredentials variables inside running pod

2019-03-18 Thread thomascoope...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-56598  
 
 
  Unable to bind withCredentials variables inside running pod   
 

  
 
 
 
 

 
Change By: 
 Thomas Cooper  
 

  
 
 
 
 

 
 When running via declarative pipeline, any variables bound via Credentials Binding plugin are empty and cannot be used on the running pod. The environment variable should be set via the `withCredentials` but never does.   {code:java}stage('Run Playbook') {   steps { script {   withCredentials([string(credentialsId: "ocp-${params.Environment}-ansible-sa-token", variable: 'K8S_AUTH_API_KEY')]) { sh "printenv" // K8S_AUTH_API_KEY env var is completely missing... ansiblePlaybook playbook: "playbooks / something.yml", extraVars: ... /  Any steps relying on K8S_AUTH_API_KEY ( / the k8s Ansible module  in this case) fails since that variable is never  relies on K8S_AUTH_API_KEY being  set .   and fails due to 401 UNAUTHORIZED {code}   I've seen a number of PRs opened to address other environment variables set by Jenkins itself (ie. COMMIT_ID and other SCM related vars). However, no combination of withCredentials seems to work when running inside a pod.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, 

[JIRA] (JENKINS-56598) Unable to bind withCredentials variables inside running pod

2019-03-18 Thread thomascoope...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-56598  
 
 
  Unable to bind withCredentials variables inside running pod   
 

  
 
 
 
 

 
Change By: 
 Thomas Cooper  
 
 
Issue Type: 
 Improvement Bug  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-56598) Unable to bind withCredentials variables inside running pod

2019-03-18 Thread thomascoope...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Cooper created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-56598  
 
 
  Unable to bind withCredentials variables inside running pod   
 

  
 
 
 
 

 
Issue Type: 
  Improvement  
 
 
Assignee: 
 Carlos Sanchez  
 
 
Components: 
 kubernetes-plugin  
 
 
Created: 
 2019-03-18 14:28  
 
 
Environment: 
 Jenkins 2.166  Kubernetes Plugin 1.14.8  Credentials Binding Plugin 1.18  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Thomas Cooper  
 

  
 
 
 
 

 
 When running via declarative pipeline, any variables bound via Credentials Binding plugin are empty and cannot be used on the running pod. The environment variable should be set via the `withCredentials` but never does.  

 

stage('Run Playbook') { 
  steps { 
script { 
  withCredentials([string(credentialsId: "ocp-${params.Environment}-ansible-sa-token", variable: 'K8S_AUTH_API_KEY')]) { 
sh "printenv" // K8S_AUTH_API_KEY env var is completely missing
...
// Any steps relying on K8S_AUTH_API_KEY (the k8s Ansible module in this case) fails since that variable is never set. 
 

   I've seen a number of PRs opened to address other environment variables set by Jenkins itself (ie. COMMIT_ID and other SCM related vars). However, no combination of withCredentials seems to work when running inside a pod.   
 

  
 
 
 
 
   

[JIRA] (JENKINS-56300) New step or option that does not block on individual job completion

2019-02-26 Thread thomascoope...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Cooper updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-56300  
 
 
  New step or option that does not block on individual job completion   
 

  
 
 
 
 

 
Change By: 
 Thomas Cooper  
 

  
 
 
 
 

 
 Using Ansible Tower in a pipeline, there is no way to trigger multiple Tower jobs to be run concurrently then poll each for completion status. I'd like some sort of option on the ansibleTower step that prevents the AnsibleTowerRunner from blocking on job completion before continuing. This might warrant a separate step. Below is my use case:  {noformat}script {  def myapps = [...]  def jobs = myapps.collect {ansibleTower(   jobTemplate: 'deploy-one-app',  extraVars: "---\napp_to_deploy: ${it}",  throwExceptionWhenFail: false,  waitForCompletion: false)  // return Job ID?   }  timeout(10) {waitUntil {  jobs.every { def job = ansibleTowerJob(id: it )job . JOB_RESULT status  == " SUCCESS successful "  }}  }}{noformat}   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-56300) New step or option that does not block on individual job completion

2019-02-26 Thread thomascoope...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Thomas Cooper created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-56300  
 
 
  New step or option that does not block on individual job completion   
 

  
 
 
 
 

 
Issue Type: 
  Improvement  
 
 
Assignee: 
 John Westcott  
 
 
Components: 
 ansible-tower-plugin  
 
 
Created: 
 2019-02-27 00:11  
 
 
Labels: 
 plugin  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Thomas Cooper  
 

  
 
 
 
 

 
 Using Ansible Tower in a pipeline, there is no way to trigger multiple Tower jobs to be run concurrently then poll each for completion status. I'd like some sort of option on the ansibleTower step that prevents the AnsibleTowerRunner from blocking on job completion before continuing. This might warrant a separate step. Below is my use case:     

 
script {
  def myapps = [...]
  def jobs = myapps.collect {
ansibleTower( 
  jobTemplate: 'deploy-one-app',
  extraVars: "---\napp_to_deploy: ${it}",
  throwExceptionWhenFail: false,
  waitForCompletion: false
)
  }
  timeout(10) {
waitUntil {
  jobs.every {
it.JOB_RESULT == "SUCCESS"
  }
}
  }
}