Job Pipeline Jenkins 1.x -> 2.x

11 views
Skip to first unread message

Fabian Cenedese

unread,
Dec 11, 2020, 5:44:00 AM12/11/20
to jenkins...@googlegroups.com
Hello

We have used Jenkins 1.x for a number of build jobs because
of some old system requirements. Now that some of those systems
were retired we could finally upgrade Jenkins to a 2.x version,
including plugins of course.
Most jobs look fine and seem to work like before. However we have
one case that doesn't and I don't know how to fix it.

We have two jobs that are meant to run after another, combined
in a job pipeline. The first job is parametrized, so the user first
has to enter some information before the job is run. That part
still works.
If the first job is successful then the user can start the second job
in the pipeline view if he wants to. The second job also uses these
parametrized variables from the first job. That used to work fine
with Jenkins 1.x but not with 2.x. The variables are not resolved
and therefore the build fails, like checking out with svn:

>Location 'https://.../tags/${FW_SVN_PATH}/${FW_VERSION}/bin' does not exist
>Cleaning local Directory .
>Checking out https://.../tags/$%7BFW_SVN_PATH%7D/$%7BFW_VERSION%7D/bin at revision '2020-12-11T11:06:44.042 +0100'

What do I need to do to resolve the parametrized variables in the
second job with the values from the first job?

Remember I'm not talking about the new pipeline scripts from 2.x,
this is a job pipeline that already existed in 1.x, and I don't want to
rewrite it. After all Jenkins 2.x is advertised as a drop-in replacement.

Thanks

bye Fabi

Slide

unread,
Dec 11, 2020, 8:30:36 AM12/11/20
to Jenkins User Mailing List
You need to give more information about what version you are upgrading from and upgrading to. Be aware that moving from Jenkins 1.x to a recent 2.x is NOT a drop-in replacement, can you tell me where you saw this? The last Jenkins 1.x release was over 4 years ago, there have been lots of changes in that time, so expecting things to work perfect after that amount of time is not really reasonable. You'll need to give more information about what plugin you are using and check the logs for error messages. It is possible you will need to rework stuff since you are moving from 1.x to 2.x.

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/20201211104337.06986437584E%40macserver.private.


--

Fabian Cenedese

unread,
Dec 11, 2020, 9:12:12 AM12/11/20
to Jenkins User Mailing List
At 14:30 11.12.2020, Slide wrote:

>You need to give more information about what version you are upgrading from and upgrading to. Be aware that moving from Jenkins 1.x to a recent 2.x is NOT a drop-in replacement, can you tell me where you saw this?

Well, it doesn't mention a specific version unless it's really only 2.0[00]
https://www.jenkins.io/2.0/#compat

>The last Jenkins 1.x release was over 4 years ago, there have been lots of changes in that time, so expecting things to work perfect after that amount of time is not really reasonable. You'll need to give more information about what plugin you are using and check the logs for error messages. It is possible you will need to rework stuff since you are moving from 1.x to 2.x.

Thanks for the information. I first updated to the last 1.658 and wanted to
continue from there. I checked 2.0 or so and everything still looked fine.
As the underlying linux was also ancient I decided to make a completely
new Jenkins Master with a current Ubuntu 20, install whatever Jenkins
it has in its repositories (using now 2.269) and copy the whole Jenkins
home folder from the old master over to the new.
Of course the plugins were now all old and I had to update them as
well. Apart from that it was quite effortless.

I checked the log and found messages like this:

Skipped parameter `FW_VERSION` as it is undefined on `FW_GENERIC_Copy2Desktop`. Set `-Dhudson.model.ParametersAction.keepUndefinedParameters=true` to allow undefined parameters to be injected as environment variables or `-Dhudson.model.ParametersAction.safeParameters=[comma-separated list]` to whitelist specific parameter names, even though it represents a security breach or `-Dhudson.model.ParametersAction.keepUndefinedParameters=false` to no longer show this message.

I'm not sure if one of these arguments would help in my case or if it
would rather mask the problem. If the problem is easily solvable
then I can apply it to the current system. If not then I can also start
over again as I still have the old one and if you can tell me the best
way to go about.

Thanks

bye Fabi

Slide

unread,
Dec 11, 2020, 10:02:03 AM12/11/20
to Jenkins User Mailing List
See this post about this change in behavior, it was made for security reasons. https://www.jenkins.io/blog/2016/05/11/security-update/

--
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 jenkinsci-use...@googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages