Parametrized build for E2E testing in different environments

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Parametrized build for E2E testing in different environments

Alberto Scotto-2
Hi,

Long story short: is it possible to have a job which builds another job, in particular a parametrized one?

We have a Cucumber+Selenium project which runs E2E tests against our different test environments.
Something pretty standard.

For this kind of job, the parametrized build seems to be the best idea.
Otherwise we would have to create one job for each test environment. duplicating the job configuration.
Then it would be a nightmare to keep all the job configurations in sync, in case we need to change something.

But there's a problem with the build history.
I want to see a separate build history for each environment.
It doesn't make sense to have an interleaved history. It would be messy.

So an easy solution could be to have a job which calls the parametrized job passing the actual value for the environment.
This way the build histories would be kept separate, and at the same time we would also get to avoid duplication.

Is that possible? Or do you have any other idea/solution?

Thank you very much.

Alberto

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Parametrized build for E2E testing in different environments

Eric Pyle-3
Assuming you are using a Freestyle project (not Pipeline) you could use the Template Project Plugin https://plugins.jenkins.io/template-project/. You create a template job which contains all the common functionality, and then in the separate job for each environment you add the template job as a build step (Use builders from another project).

-Eric

On 5/28/2020 7:39 AM, Alberto Scotto wrote:
Hi,

Long story short: is it possible to have a job which builds another job, in particular a parametrized one?

We have a Cucumber+Selenium project which runs E2E tests against our different test environments.
Something pretty standard.

For this kind of job, the parametrized build seems to be the best idea.
Otherwise we would have to create one job for each test environment. duplicating the job configuration.
Then it would be a nightmare to keep all the job configurations in sync, in case we need to change something.

But there's a problem with the build history.
I want to see a separate build history for each environment.
It doesn't make sense to have an interleaved history. It would be messy.

So an easy solution could be to have a job which calls the parametrized job passing the actual value for the environment.
This way the build histories would be kept separate, and at the same time we would also get to avoid duplication.

Is that possible? Or do you have any other idea/solution?

Thank you very much.

Alberto
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0bca5d47-881f-4b61-1078-fc854c63a1dd%40cd-adapco.com.
Reply | Threaded
Open this post in threaded view
|

Re: Parametrized build for E2E testing in different environments

Alberto Scotto-2
Thanks Eric, I appreciate it.
Unfortunately the template plugin seems not be up-to-date.
I've just opened a new issue on JIRA, but I'm not really hopeful..

I noticed there seems to be a couple more template plugins, I might give them a try.

Assuming you are using a Freestyle project (not Pipeline)

What if we were to use Pipeline? Would it make things easier?


Thank you

Alberto

 

Il giorno venerdì 29 maggio 2020 00:17:42 UTC+2, Eric Pyle ha scritto:
Assuming you are using a Freestyle project (not Pipeline) you could use the Template Project Plugin <a href="https://plugins.jenkins.io/template-project/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.jenkins.io%2Ftemplate-project%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEIv1sBKD-NFa9BvktPlO-HYufi-Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.jenkins.io%2Ftemplate-project%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEIv1sBKD-NFa9BvktPlO-HYufi-Q&#39;;return true;">https://plugins.jenkins.io/template-project/. You create a template job which contains all the common functionality, and then in the separate job for each environment you add the template job as a build step (Use builders from another project).

-Eric

On 5/28/2020 7:39 AM, Alberto Scotto wrote:
Hi,

Long story short: is it possible to have a job which builds another job, in particular a parametrized one?

We have a Cucumber+Selenium project which runs E2E tests against our different test environments.
Something pretty standard.

For this kind of job, the parametrized build seems to be the best idea.
Otherwise we would have to create one job for each test environment. duplicating the job configuration.
Then it would be a nightmare to keep all the job configurations in sync, in case we need to change something.

But there's a problem with the build history.
I want to see a separate build history for each environment.
It doesn't make sense to have an interleaved history. It would be messy.

So an easy solution could be to have a job which calls the parametrized job passing the actual value for the environment.
This way the build histories would be kept separate, and at the same time we would also get to avoid duplication.

Is that possible? Or do you have any other idea/solution?

Thank you very much.

Alberto
--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="4L6jbmuaAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Parametrized build for E2E testing in different environments

Eric Pyle-3
Using Pipeline you would take a different approach, like having a common script in source control that all the jobs could use to accomplish the common task.

I'm surprised that the Template plugin is not working for you, however. We're not at the very latest LTS but at 2.204.5, and it works fine for us. We use it in hundreds of jobs. A quick look at your stack trace suggests you are missing the Multiple SCM plugin as a dependency.

Regards,
Eric

On 6/4/2020 11:42 AM, Alberto Scotto wrote:
Thanks Eric, I appreciate it.
Unfortunately the template plugin seems not be up-to-date.
I've just opened a new issue on JIRA, but I'm not really hopeful..

I noticed there seems to be a couple more template plugins, I might give them a try.

Assuming you are using a Freestyle project (not Pipeline)

What if we were to use Pipeline? Would it make things easier?


Thank you

Alberto

 

Il giorno venerdì 29 maggio 2020 00:17:42 UTC+2, Eric Pyle ha scritto:
Assuming you are using a Freestyle project (not Pipeline) you could use the Template Project Plugin <a href="https://plugins.jenkins.io/template-project/" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.jenkins.io%2Ftemplate-project%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEIv1sBKD-NFa9BvktPlO-HYufi-Q';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.jenkins.io%2Ftemplate-project%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEIv1sBKD-NFa9BvktPlO-HYufi-Q';return true;" moz-do-not-send="true">https://plugins.jenkins.io/template-project/. You create a template job which contains all the common functionality, and then in the separate job for each environment you add the template job as a build step (Use builders from another project).

-Eric

On 5/28/2020 7:39 AM, Alberto Scotto wrote:
Hi,

Long story short: is it possible to have a job which builds another job, in particular a parametrized one?

We have a Cucumber+Selenium project which runs E2E tests against our different test environments.
Something pretty standard.

For this kind of job, the parametrized build seems to be the best idea.
Otherwise we would have to create one job for each test environment. duplicating the job configuration.
Then it would be a nightmare to keep all the job configurations in sync, in case we need to change something.

But there's a problem with the build history.
I want to see a separate build history for each environment.
It doesn't make sense to have an interleaved history. It would be messy.

So an easy solution could be to have a job which calls the parametrized job passing the actual value for the environment.
This way the build histories would be kept separate, and at the same time we would also get to avoid duplication.

Is that possible? Or do you have any other idea/solution?

Thank you very much.

Alberto
--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="4L6jbmuaAwAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;" moz-do-not-send="true">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" onclick="this.href='https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" moz-do-not-send="true">https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/cbde6bf8-45e1-8fa0-1b73-dabf63bd6fc0%40cd-adapco.com.
Reply | Threaded
Open this post in threaded view
|

Re: Parametrized build for E2E testing in different environments

Alberto Scotto-2
I see thanks!

I never really had the chance to look into pipelines, but now the time might have come.
Deprecated: Users should migrate to https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin
 
Anyway, back to the template plugin,
after installing the Multiple SCMs plugin now I can see the checkbox "Use build environment from another project", but I still can't seem to get it to work.
In the jobs console output I have:

Started by user admin
Running as SYSTEM
Building in workspace C:\Program Files (x86)\Jenkins\workspace\asd
[TemplateProject] Starting pre-checkout from: E2E Template
[TemplateProject] Successfully performed pre-checkout from: 'E2E Template'
Cloning the remote Git repository
[..]
[TemplateProject] Getting environment from: E2E Template
[TemplateProject] Successfully setup environment from: 'E2E Template'
Finished: SUCCESS

Any idea what could be wrong?
 


Il giorno giovedì 4 giugno 2020 17:53:39 UTC+2, Eric Pyle ha scritto:
Using Pipeline you would take a different approach, like having a common script in source control that all the jobs could use to accomplish the common task.

I'm surprised that the Template plugin is not working for you, however. We're not at the very latest LTS but at 2.204.5, and it works fine for us. We use it in hundreds of jobs. A quick look at your stack trace suggests you are missing the Multiple SCM plugin as a dependency.

Regards,
Eric

On 6/4/2020 11:42 AM, Alberto Scotto wrote:
Thanks Eric, I appreciate it.
Unfortunately the template plugin seems not be up-to-date.
I've just opened a new issue on JIRA, but I'm not really hopeful..
<a href="https://issues.jenkins-ci.org/browse/JENKINS-62568" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-62568\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdUeWvG07kal7XNU1bLJYttXWqiw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-62568\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdUeWvG07kal7XNU1bLJYttXWqiw&#39;;return true;">https://issues.jenkins-ci.org/browse/JENKINS-62568

I noticed there seems to be a couple more template plugins, I might give them a try.

Assuming you are using a Freestyle project (not Pipeline)

What if we were to use Pipeline? Would it make things easier?


Thank you

Alberto

 

Il giorno venerdì 29 maggio 2020 00:17:42 UTC+2, Eric Pyle ha scritto:
Assuming you are using a Freestyle project (not Pipeline) you could use the Template Project Plugin <a href="https://plugins.jenkins.io/template-project/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.jenkins.io%2Ftemplate-project%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEIv1sBKD-NFa9BvktPlO-HYufi-Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.jenkins.io%2Ftemplate-project%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEIv1sBKD-NFa9BvktPlO-HYufi-Q&#39;;return true;">https://plugins.jenkins.io/template-project/. You create a template job which contains all the common functionality, and then in the separate job for each environment you add the template job as a build step (Use builders from another project).

-Eric

On 5/28/2020 7:39 AM, Alberto Scotto wrote:
Hi,

Long story short: is it possible to have a job which builds another job, in particular a parametrized one?

We have a Cucumber+Selenium project which runs E2E tests against our different test environments.
Something pretty standard.

For this kind of job, the parametrized build seems to be the best idea.
Otherwise we would have to create one job for each test environment. duplicating the job configuration.
Then it would be a nightmare to keep all the job configurations in sync, in case we need to change something.

But there's a problem with the build history.
I want to see a separate build history for each environment.
It doesn't make sense to have an interleaved history. It would be messy.

So an easy solution could be to have a job which calls the parametrized job passing the actual value for the environment.
This way the build histories would be kept separate, and at the same time we would also get to avoid duplication.

Is that possible? Or do you have any other idea/solution?

Thank you very much.

Alberto
--
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 [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="NCTAZ6hAAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/25e331fc-9c59-4490-874d-6feab43a2504%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Parametrized build for E2E testing in different environments

Eric Pyle-3
Go to the Build section of the job config, and add a build step of type "Use builders from another project". Your job will now use all the Build steps configured in the other job you specify there.

The configuration you added would use the "Build Environment" settings from the job you specified, which may also be useful, but I think you were looking for build steps.

Regarding Multiple SCM plugin, that is indeed deprecated, and I don't recommend using it directly.

-Eric

On 6/4/2020 12:30 PM, Alberto Scotto wrote:
I see thanks!

I never really had the chance to look into pipelines, but now the time might have come.
Deprecated: Users should migrate to https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin
 
Anyway, back to the template plugin,
after installing the Multiple SCMs plugin now I can see the checkbox "Use build environment from another project", but I still can't seem to get it to work.
In the jobs console output I have:

Started by user admin
Running as SYSTEM
Building in workspace C:\Program Files (x86)\Jenkins\workspace\asd
[TemplateProject] Starting pre-checkout from: E2E Template
[TemplateProject] Successfully performed pre-checkout from: 'E2E Template'
Cloning the remote Git repository
[..]
[TemplateProject] Getting environment from: E2E Template
[TemplateProject] Successfully setup environment from: 'E2E Template'
Finished: SUCCESS

Any idea what could be wrong?
 


Il giorno giovedì 4 giugno 2020 17:53:39 UTC+2, Eric Pyle ha scritto:
Using Pipeline you would take a different approach, like having a common script in source control that all the jobs could use to accomplish the common task.

I'm surprised that the Template plugin is not working for you, however. We're not at the very latest LTS but at 2.204.5, and it works fine for us. We use it in hundreds of jobs. A quick look at your stack trace suggests you are missing the Multiple SCM plugin as a dependency.

Regards,
Eric

On 6/4/2020 11:42 AM, Alberto Scotto wrote:
Thanks Eric, I appreciate it.
Unfortunately the template plugin seems not be up-to-date.
I've just opened a new issue on JIRA, but I'm not really hopeful..
<a href="https://issues.jenkins-ci.org/browse/JENKINS-62568" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-62568\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdUeWvG07kal7XNU1bLJYttXWqiw';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-62568\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdUeWvG07kal7XNU1bLJYttXWqiw';return true;" moz-do-not-send="true">https://issues.jenkins-ci.org/browse/JENKINS-62568

I noticed there seems to be a couple more template plugins, I might give them a try.

Assuming you are using a Freestyle project (not Pipeline)

What if we were to use Pipeline? Would it make things easier?


Thank you

Alberto

 

Il giorno venerdì 29 maggio 2020 00:17:42 UTC+2, Eric Pyle ha scritto:
Assuming you are using a Freestyle project (not Pipeline) you could use the Template Project Plugin <a href="https://plugins.jenkins.io/template-project/" rel="nofollow" target="_blank" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.jenkins.io%2Ftemplate-project%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEIv1sBKD-NFa9BvktPlO-HYufi-Q';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.jenkins.io%2Ftemplate-project%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEIv1sBKD-NFa9BvktPlO-HYufi-Q';return true;" moz-do-not-send="true">https://plugins.jenkins.io/template-project/. You create a template job which contains all the common functionality, and then in the separate job for each environment you add the template job as a build step (Use builders from another project).

-Eric

On 5/28/2020 7:39 AM, Alberto Scotto wrote:
Hi,

Long story short: is it possible to have a job which builds another job, in particular a parametrized one?

We have a Cucumber+Selenium project which runs E2E tests against our different test environments.
Something pretty standard.

For this kind of job, the parametrized build seems to be the best idea.
Otherwise we would have to create one job for each test environment. duplicating the job configuration.
Then it would be a nightmare to keep all the job configurations in sync, in case we need to change something.

But there's a problem with the build history.
I want to see a separate build history for each environment.
It doesn't make sense to have an interleaved history. It would be messy.

So an easy solution could be to have a job which calls the parametrized job passing the actual value for the environment.
This way the build histories would be kept separate, and at the same time we would also get to avoid duplication.

Is that possible? Or do you have any other idea/solution?

Thank you very much.

Alberto
--
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 [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" onclick="this.href='https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" moz-do-not-send="true">https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="NCTAZ6hAAwAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;" moz-do-not-send="true">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" onclick="this.href='https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter';return true;" moz-do-not-send="true">https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/25e331fc-9c59-4490-874d-6feab43a2504%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7339d923-dd74-0b38-fca3-4bd92cd5e7ab%40cd-adapco.com.
Reply | Threaded
Open this post in threaded view
|

Re: Parametrized build for E2E testing in different environments

Alberto Scotto-2
Thanks, works now!

I was also reading about the pipeline, and I've found out that it's based upon the old plugin Build Flow, which used to do exactly what I was hoping for:

You can pass parameters to jobs, and get the resulting AbstractBuild when required :

b = build( "job1", param1: "foo", param2: "bar" )
build( "job2", param1: b.build.number )

Yet another sign the pipeline is the best way to go.

Thank you very much Eric,

Alberto



Il giorno giovedì 4 giugno 2020 21:52:46 UTC+2, Eric Pyle ha scritto:
Go to the Build section of the job config, and add a build step of type "Use builders from another project". Your job will now use all the Build steps configured in the other job you specify there.

The configuration you added would use the "Build Environment" settings from the job you specified, which may also be useful, but I think you were looking for build steps.

Regarding Multiple SCM plugin, that is indeed deprecated, and I don't recommend using it directly.

-Eric

On 6/4/2020 12:30 PM, Alberto Scotto wrote:
I see thanks!

I never really had the chance to look into pipelines, but now the time might have come.
Even <a href="https://plugins.jenkins.io/multiple-scms/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.jenkins.io%2Fmultiple-scms%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEUth6S4PrT-lTR-qMYqUfxgKwi1Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.jenkins.io%2Fmultiple-scms%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEUth6S4PrT-lTR-qMYqUfxgKwi1Q&#39;;return true;">Multiple SCM is stating:
Deprecated: Users should migrate to <a href="https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins-ci.org%2Fdisplay%2FJENKINS%2FPipeline%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKPb-FFZbzv9x1nTyMOROsGVAJkA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins-ci.org%2Fdisplay%2FJENKINS%2FPipeline%2BPlugin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKPb-FFZbzv9x1nTyMOROsGVAJkA&#39;;return true;">https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin
 
Anyway, back to the template plugin,
after installing the Multiple SCMs plugin now I can see the checkbox "Use build environment from another project", but I still can't seem to get it to work.
In the jobs console output I have:

Started by user admin
Running as SYSTEM
Building in workspace C:\Program Files (x86)\Jenkins\workspace\asd
[TemplateProject] Starting pre-checkout from: E2E Template
[TemplateProject] Successfully performed pre-checkout from: 'E2E Template'
Cloning the remote Git repository
[..]
[TemplateProject] Getting environment from: E2E Template
[TemplateProject] Successfully setup environment from: 'E2E Template'
Finished: SUCCESS

Any idea what could be wrong?
 


Il giorno giovedì 4 giugno 2020 17:53:39 UTC+2, Eric Pyle ha scritto:
Using Pipeline you would take a different approach, like having a common script in source control that all the jobs could use to accomplish the common task.

I'm surprised that the Template plugin is not working for you, however. We're not at the very latest LTS but at 2.204.5, and it works fine for us. We use it in hundreds of jobs. A quick look at your stack trace suggests you are missing the Multiple SCM plugin as a dependency.

Regards,
Eric

On 6/4/2020 11:42 AM, Alberto Scotto wrote:
Thanks Eric, I appreciate it.
Unfortunately the template plugin seems not be up-to-date.
I've just opened a new issue on JIRA, but I'm not really hopeful..
<a href="https://issues.jenkins-ci.org/browse/JENKINS-62568" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-62568\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdUeWvG07kal7XNU1bLJYttXWqiw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fissues.jenkins-ci.org%2Fbrowse%2FJENKINS-62568\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFdUeWvG07kal7XNU1bLJYttXWqiw&#39;;return true;">https://issues.jenkins-ci.org/browse/JENKINS-62568

I noticed there seems to be a couple more template plugins, I might give them a try.

Assuming you are using a Freestyle project (not Pipeline)

What if we were to use Pipeline? Would it make things easier?


Thank you

Alberto

 

Il giorno venerdì 29 maggio 2020 00:17:42 UTC+2, Eric Pyle ha scritto:
Assuming you are using a Freestyle project (not Pipeline) you could use the Template Project Plugin <a href="https://plugins.jenkins.io/template-project/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.jenkins.io%2Ftemplate-project%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEIv1sBKD-NFa9BvktPlO-HYufi-Q&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fplugins.jenkins.io%2Ftemplate-project%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEIv1sBKD-NFa9BvktPlO-HYufi-Q&#39;;return true;">https://plugins.jenkins.io/template-project/. You create a template job which contains all the common functionality, and then in the separate job for each environment you add the template job as a build step (Use builders from another project).

-Eric

On 5/28/2020 7:39 AM, Alberto Scotto wrote:
Hi,

Long story short: is it possible to have a job which builds another job, in particular a parametrized one?

We have a Cucumber+Selenium project which runs E2E tests against our different test environments.
Something pretty standard.

For this kind of job, the parametrized build seems to be the best idea.
Otherwise we would have to create one job for each test environment. duplicating the job configuration.
Then it would be a nightmare to keep all the job configurations in sync, in case we need to change something.

But there's a problem with the build history.
I want to see a separate build history for each environment.
It doesn't make sense to have an interleaved history. It would be messy.

So an easy solution could be to have a job which calls the parametrized job passing the actual value for the environment.
This way the build histories would be kept separate, and at the same time we would also get to avoid duplication.

Is that possible? Or do you have any other idea/solution?

Thank you very much.

Alberto
--
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 [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/5f64c8d1-db57-4002-9aa7-5e574638b76c%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/b75ccb32-b748-4af1-8331-ace29a2c6074%40googlegroups.com.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="I2T01rRNAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/25e331fc-9c59-4490-874d-6feab43a2504%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/25e331fc-9c59-4490-874d-6feab43a2504%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/25e331fc-9c59-4490-874d-6feab43a2504%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/25e331fc-9c59-4490-874d-6feab43a2504%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/162f6f7a-aed6-4f5c-83c8-2c1b6925e746o%40googlegroups.com.