[JIRA] (JENKINS-60352) Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1
Title: Message Title Frederic Leroux commented on JENKINS-60352 Re: Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1 Thanks for the feedback, I'll do the test in a couple of days and keep you posted Add Comment This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203369.1575384648000.11360.1584984660439%40Atlassian.JIRA.
[JIRA] (JENKINS-60352) Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1
Title: Message Title John Westcott commented on JENKINS-60352 Re: Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1 This appears to have been an issue specifically with AWX v8.0.0 which reported its version as 8.0.0.0 (a 4 part notation instead of a three part notation). Jenkins 0.14.1 has been released which should hopefully address this scenario. It may take a couple days to be available for download. Please test and let me know if this now works. Add Comment This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203369.1575384648000.11333.1584982440395%40Atlassian.JIRA.
[JIRA] (JENKINS-60352) Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1
Title: Message Title John Westcott commented on JENKINS-60352 Re: Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1 Thanks you for the details, I believe I know what is going on now and am working on a fix. I'll let you know when that has been pushed and is ready for testing. Hopefully that will be later today. Add Comment This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203369.1575384648000.11189.1584974580228%40Atlassian.JIRA.
[JIRA] (JENKINS-60352) Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1
Title: Message Title Frederic Leroux commented on JENKINS-60352 Re: Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1 Hi, This patch cause a NullPointerException (with AWX) because towerVersion attribute is apparently not properly filled. Cheers java.lang.NullPointerException at org.jenkinsci.plugins.ansible_tower.util.TowerConnector.processCredentials(TowerConnector.java:518) at org.jenkinsci.plugins.ansible_tower.util.TowerConnector.submitTemplate(TowerConnector.java:564) at org.jenkinsci.plugins.ansible_tower.AnsibleTowerRunner.runJobTemplate(AnsibleTowerRunner.java:184) at org.jenkinsci.plugins.ansible_tower.AnsibleTowerStep$AnsibleTowerStepExecution.run(AnsibleTowerStep.java:266) at org.jenkinsci.plugins.ansible_tower.AnsibleTowerStep$AnsibleTowerStepExecution.run(AnsibleTowerStep.java:202) Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203369.1575384648000.4926.1578505500231%40Atlassian.JIRA.
[JIRA] (JENKINS-60352) Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1
Title: Message Title John Westcott closed an issue as Fixed Jenkins / JENKINS-60352 Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1 Change By: John Westcott Status: Resolved Closed Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203369.1575384648000.4828.1578495600588%40Atlassian.JIRA.
[JIRA] (JENKINS-60352) Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1
Title: Message Title John Westcott resolved as Fixed Please reopen the ticket if the latest release does not resolve this issue. Jenkins / JENKINS-60352 Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1 Change By: John Westcott Status: Open Resolved Resolution: Fixed Released As: 0.14.0 Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) --
[JIRA] (JENKINS-60352) Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1
Title: Message Title kyle fattig edited a comment on JENKINS-60352 Re: Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1 [~clover1983] That was the change I tried initially, but 'credentials' takes a list while 'credential' takes an int so tower throws a type error. That's jist of the issue though - Tower 3.6 removed the 'credential' field which is what the plugin sends. Here's the smallest change I could make that seems to work for now. There's already logic in place to account for this, it just needs to be used. Note this will break compatibility with old versions of the API that don't support 'credentials' field. We built this code and are using it for now as a stop-gap since Tower 3.6 supports only 'credentials': [https://github.com/jenkinsci/ansible-tower-plugin/compare/master...kfattig:master] [~johnwestcottiv] I believe [this code segment|https://github.com/jenkinsci/ansible-tower-plugin/blob/ea9541646df260ac7ca4c8c626867c96419f2751/src/main/java/org/jenkinsci/plugins/ansible_tower/util/TowerConnector.java#L499-L526] needs to be revisited. The comment explains the logic, but I believe it's flawed. Tower only accepts 1 machine credential currently, so the 'if' statement is never entered. Since the accepted fields change based on the API version - maybe that should be taken into account here instead? Happy to contribute or test as necessary, just didn't feel confident submitting a full PR without more information & testing. Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To
[JIRA] (JENKINS-60352) Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1
Title: Message Title kyle fattig edited a comment on JENKINS-60352 Re: Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1 [~clover1983] That was the change I tried initially, but 'credentials' takes a list while 'credential' takes a list an int so tower throws a type error. That's jist of the issue though - Tower 3.6 removed the 'credential' field which is what the plugin sends. Here's the smallest change I could make that seems to work for now. There's already logic in place to account for this, it just needs to be used. Note this will break compatibility with old versions of the API that don't support 'credentials' field. We built this code and are using it for now as a stop-gap since Tower 3.6 supports only 'credentials':[https://github.com/jenkinsci/ansible-tower-plugin/compare/master...kfattig:master] [~johnwestcottiv] I believe [this code segment|https://github.com/jenkinsci/ansible-tower-plugin/blob/ea9541646df260ac7ca4c8c626867c96419f2751/src/main/java/org/jenkinsci/plugins/ansible_tower/util/TowerConnector.java#L499-L526] needs to be revisited. The comment explains the logic, but I believe it's flawed. Tower only accepts 1 machine credential currently, so 'if' statement is never entered. Since the accepted fields change based on the API version - maybe that should be taken into account here instead? Happy to contribute or test as necessary, just didn't feel confident submitting a full PR without more information & testing. Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
[JIRA] (JENKINS-60352) Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1
Title: Message Title kyle fattig commented on JENKINS-60352 Re: Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1 Lili Wang That was the change I tried initially, but 'credentials' takes a list while 'credential' takes a list so tower throws a type error. That's jist of the issue though - Tower 3.6 removed the 'credential' field which is what the plugin sends. Here's the smallest change I could make that seems to work for now. There's already logic in place to account for this, it just needs to be used. Note this will break compatibility with old versions of the API that don't support 'credentials' field. We built this code and are using it for now as a stop-gap since Tower 3.6 supports only 'credentials': https://github.com/jenkinsci/ansible-tower-plugin/compare/master...kfattig:master John Westcott I believe this code segment needs to be revisited. The comment explains the logic, but I believe it's flawed. Tower only accepts 1 machine credential currently, so 'if' statement is never entered. Since the accepted fields change based on the API version - maybe that should be taken into account here instead? Happy to contribute or test as necessary, just didn't feel confident submitting a full PR without more information & testing. Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit
[JIRA] (JENKINS-60352) Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1
Title: Message Title Lili Wang commented on JENKINS-60352 Re: Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1 Hi ALL, I find the issue, issue is in the source code: ../ansible-tower-plugin/src/main/java/org/jenkinsci/plugins/ansible_tower/util/TowerConnector.java Line:517 Before Change // We need to pass individual fields if(credentials.get("machine").size() > 0) { postBody.put("credential", credentials.get("machine").get(0)); } if(credentials.get("vault").size() > 0) { postBody.put("vault_credential", credentials.get("vault").get(0)); } After Change: // We need to pass individual fields if(credentials.get("machine").size() > 0) { postBody.put("credentials", credentials.get("machine")); } if(credentials.get("vault").size() > 0) { postBody.put("vault_credential", credentials.get("vault")); } Then it should works. Thank you. Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203369.1575384648000.2428.1575765060207%40Atlassian.JIRA.
[JIRA] (JENKINS-60352) Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1
Title: Message Title Viv Cheolu created an issue Jenkins / JENKINS-60352 Ansible Tower Plugin does not pass credentials from job to Ansible tower 3.6.1 Issue Type: Bug Assignee: John Westcott Components: ansible-tower-plugin Created: 2019-12-03 14:50 Environment: CloudBees Jenkins : 1.11.22 Managed Master Version: 2.176.4 Priority: Critical Reporter: Viv Cheolu Jenkins job is not passing credentials to job template in Tower for Ansible tower version 3.6.1. This used to work with Tower version 2.9 Add Comment