Check to see if a Pipeline step exist?

25 views
Skip to first unread message

Cuong Tran

unread,
Apr 14, 2017, 9:23:17 PM4/14/17
to Jenkins Users
All,

I need to be able to run the same pipeline code under Jenkins 1.x and Jenkins 2.x servers so I want to detect if a step exists and provide alternative.  

For example, the "archiveArtifacts" step doesn't exist in Jenkins 1.x.  Does anyone have a similar problem?

Thanks.

Sam K

unread,
Apr 17, 2017, 2:37:24 PM4/17/17
to Jenkins Users
Hi

   You can use this link to keep track of what is already available and what is not.  https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md

Sam

R. Tyler Croy

unread,
Apr 17, 2017, 3:36:20 PM4/17/17
to jenkins...@googlegroups.com
(replies inline)

On Mon, 17 Apr 2017, Sam K wrote:

> Hi
>
> You can use this link to keep track of what is already available and
> what is not.
> https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md


This resource is a much more comprehensive reference: https://jenkins.io/doc/pipeline/steps/

A background process searches all plugins which extend Pipeline extension
points and generates that page. Unless there has been some failure to generate,
which rarely happens, that page will be very up to date.



Now to the original poster's original question:


> > For example, the "archiveArtifacts" step doesn't exist in Jenkins 1.x.
> > Does anyone have a similar problem?


https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#code-archive-code-archive-artifacts

As the documentation mentions, archiveArtifacts is only supported on Jenkins
2.x


I strongly recommend upgrading to the latest Jenkins 2.46.1 LTS, there are a
tremendous number of bugs fixed and security issues addressed which are only
available in more current LTS releases.



Cheers
- R. Tyler Croy

------------------------------------------------------
Code: <https://github.com/rtyler>
Chatter: <https://twitter.com/agentdero>
xmpp: rty...@jabber.org

% gpg --keyserver keys.gnupg.net --recv-key 1426C7DC3F51E16F
------------------------------------------------------
signature.asc
Reply all
Reply to author
Forward
0 new messages