-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-34912] vSphere from Pipeline integation #45
Conversation
Thanks dude! |
@@ -3,7 +3,7 @@ | |||
<parent> | |||
<groupId>org.jenkins-ci.plugins</groupId> | |||
<artifactId>plugin</artifactId> | |||
<version>1.609.2</version><!-- which version of Jenkins is this plugin built against? --> | |||
<version>2.6</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary? This will require every user to be Jenkins 2.6 - not yet released. And not everyone is upgrading to the very latest and greatest immediately. Can a lower version be safely used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like org.jenkins-ci.plugins:plugin since ver. 2 decouples jenkins.version from pom version (see jenkinsci/plugin-pom/blob/master/README.md). For parent 2.6, the jenkins version to be build to is 1.625.3
A lower versión could be used, indeed.
Neverthless, I'm currently using a snapshot with this PR on a Jenkins 2.4
and is working (so there seems no API changes has been made).
Will try on Monday to lower that parent, rebuild and retest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed that the minimum version still targets 2.6. That works, but will force everyone to upgrade their Jenkins. And there's a security fix in the 2.x line that has broken several plugins, so the adoption rate isn't that good. Were you able to retest with a lower version of Jenkins than 2.6?
Have you tried exposing guest env vars in groovy code? On 2.5:
Log suggests that it 'Successfully exposed guest info for VM "foo"' |
Freestyle jobs and pipeline ones dont access to env vars in the same way. thus witokondoria/vsphere-cloud-plugin/blob/5eeffd8e1d506bf4aaa53ddfff47427762598796/src/main/java/org/jenkinsci/plugins/workflow/vSphereStep.java#L126 comes into action. Unfortunately, has just been tested for PowerOn, Clone and Deploy actions. Can add ExposeGuestInfo, but ommitting the envVariablePrefix element. WDYT? Edit: Edit2: |
Looks like just returning IP without prefix from a Edit: https://issues.jenkins-ci.org/browse/JENKINS-29144 is that about passing in existing EnvVar to steps? It could still output a new EnvVar (since its just a map) for each step. |
Certainly is a hacky and scope creep getter, but for the meantime, looks like a solution. Will keep publishing the VSPHERE_IP for ExposeGuestInfo. @noquirks, could you test that method? |
How would you get the instance of step (to run a getter on it), if
I thought of changing String run() to Map run() in Looks like this MR will define an API contract for workflows for this plugin making future changes major/difficult, trying to cover all bases here, but might be overdesign in the first place. |
Returning a Map instead of a String looks a littel bit confusing (IMHO) as tree of four possible methods returning (Clone, Deploy and PowerOn)values would just return a onekey- value Map. About getting a step instance, I think is not a nice usage. With the last commit, an env var is published, following the envVariablePrefix_value pattern |
@jswager what are your thoughts about this PR? could be merged? |
Sorry - didn't see that last code commit. I'm fine with merging and will do so shortly... |
Didn't notice it a first, but still using 2.6 as baseline Jenkins version. Can a lower version be used? |
I wrote a previous comment: Seems like org.jenkins-ci.plugins:plugin since ver. 2 decouples jenkins.version from pom version (see jenkinsci/plugin-pom/blob/master/README.md). For parent 2.6, the jenkins version to be build to is 1.625.3 |
Ah - I see. OK, then. Merging... |
@jswager AFAIK this PR also added support of vSphere 5.5 and above (as a part of the migration to yavijava). Maybe it deserves mentioning in the changelog |
@oleg-nenashev true that: we are up and running on vSphere 6 |
No description provided.