Parameterized job. that will expose the parameter. you can have the
parameter be a drop-down with the two clusters (and even nice names)

On 15 June 2017 at 06:12, Idan Adar <[email protected]> wrote:

> Here's the situation:
>
> I have 2 clusters, each with its own unique URL, that do end-2-end testing.
> The code that does the tests is the same. It basically goes through a set
> of actions performed on a cluster.
>
> I have a job that basically does npm test which starts the process.
> Now I'd like to use the same code and the same job to be able to run the
> test for the second cluster.
>
> The URL of the cluster is inside the code. So without a way to change the
> URL in some way, I can't run the tests on the second cluster.
> Options thus far:
>
> 1. Use branches, one for each, but that means updating the tests twice...
> 2. Use external variable to update the URL value during runtime
> 3. Find out the job name during runtime and then use a different config
> file during runtime.
>
> 3 is a new option that I'd like to explore. Is there a way to retrieve the
> job name during a job runtime?
>
> On Thursday, June 15, 2017 at 4:00:27 PM UTC+3, Stephen Connolly wrote:
>>
>> It looks like you are trying to write a build script in pipeline...
>>
>>
>> I would think twice if that is actually what you are trying to do.
>>
>> Write your build script to be independent of Jenkins. That lets you test
>> thing from the command line.
>>
>> Pipeline is the glue to wire it all together at the end (same goes for
>> non-pipeline job types, except it is harder to fall into the trap and hence
>> less likely... but it can still happen)
>>
>>
>> On 15 June 2017 at 05:19, Idan Adar <[email protected]> wrote:
>>
>>> Currently I have in a node project a .json file with certain values.
>>> Is it possible to externalize these values into a Jenkins global
>>> variable and then consume these properties in my code?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jenkinsci-users/98e36806-f4b9-4b8d-964a-81ee0f71a66d%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/98e36806-f4b9-4b8d-964a-81ee0f71a66d%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/6c1ec535-68e5-4b77-a46d-a3b8a67d958d%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/6c1ec535-68e5-4b77-a46d-a3b8a67d958d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CA%2BnPnMzjHyXgi5Xkh1B_SC7BL3pHRRx%3Dmw2t%2BpVELO87wefjEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to