openshift / jenkins-plugin

Apache License 2.0
81 stars 50 forks source link

Set variables after completed OpenShift Jenkins Build Step #44

Closed ullgren closed 8 years ago

ullgren commented 8 years ago

Would be useful if the OpenShift Jenkins plugin could set environment variables after a completed jenkins "Build Step".

For instance after triggering a new build it would be useful if the build instance number/name in OSE or the hash of the resulting image in OpenShift would be available as environment variables in Jenkins.

Similar other "Build Steps" such as "Verify Deployment" could extract information about the resource queried and add these to the environment.

gabemontero commented 8 years ago

I've looked into this in the past and found that EnvVars I set in one step were not available in subsequent steps. But since then, I've learned that I might have needed something like the EnvInject plugin to get this to work.

Now, we've got a bunch of in-progress work around Jenkins Pipelines that are for example setting annotations on the OpenShift builds themselves to allow for the type of correlations I believe you are referring to.

So, moving forward on this issue would entail 1) gathering/receiving intel on the mechanics needed to set/receive env vars between classic jenkinst freestyle steps 2) discussions with OpenShift architecture on reconciling the different ways we want to correlate environment information in our jenkins scenarios

@bparees @smarterclayton @spadgett @jimmidyson @rawlingsj FYI

bparees commented 8 years ago

@gabemontero let's open this as a card on the trello backlog and close this issue.

gabemontero commented 8 years ago

trello card on devexp backlog: https://trello.com/c/uPfbMfwT/986-exchange-environment-variable-between-jenkins-build-steps