# Shared library for declarative stages?

**URL:** <https://community.jenkins.io/t/shared-library-for-declarative-stages/15462>\
**Category:** Using Jenkins\
**Created:** [May 26, 2024, 10:47am UTC](https://community.jenkins.io/t/shared-library-for-declarative-stages/15462 "2024-05-26T10:47:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skyhirider](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/skyhirider/32/8389_2.png) [@skyhirider](https://community.jenkins.io/u/skyhirider)\
**Post date:** [May 26, 2024, 10:47am UTC](https://community.jenkins.io/t/shared-library-for-declarative-stages/15462/1 "2024-05-26T10:47:54Z")

</div>

I started researching shared libraries and whenever I tried searching for a way to re-use stages, the answer was to create a groovy script in a shared library and call that.

But what if my original stage works quite nicely within a declarative pipeline and the only thing I need is to store it for re-use so that I do not have to copy paste the whole stage (with post actions) to every single repository after the stage needs to be updated?

I would like to avoid the complexity of using scripts if possible, but have not found a way yet to do that.

Thank you in advance for any pointers or suggestions. Jenkins is a very interesting tool, just need to learn how to more efficiently use it.
