# Shared library development in local

**URL:** <https://community.jenkins.io/t/shared-library-development-in-local/15810>\
**Category:** Community\
**Tags:** question\
**Created:** [June 8, 2024, 2:14pm UTC](https://community.jenkins.io/t/shared-library-development-in-local/15810 "2024-06-08T14:14:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![modusCell](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/moduscell/32/7600_2.png) [@modusCell](https://community.jenkins.io/u/modusCell)\
**Post date:** [June 8, 2024, 2:14pm UTC](https://community.jenkins.io/t/shared-library-development-in-local/15810/1 "2024-06-08T14:14:38Z")

</div>

Developing shared libraries using Jenkins environment is a bit cumbersome. Change something commit and build and repeat. I found some suggestions like using re-play function on UI but developing script in a text box in a web page not convenient.  
Is there any other way/s?

Thank you.

---

<div class="post-metadata">

**Author:** ![timja](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/timja/32/7_2.png) [@timja](https://community.jenkins.io/u/timja)\
**Post date:** [June 8, 2024, 7:01pm UTC](https://community.jenkins.io/t/shared-library-development-in-local/15810/2 "2024-06-08T19:01:32Z")

</div>

You could try this: [File System SCM](https://plugins.jenkins.io/filesystem_scm/)

Saves having to commit and push.

---

<div class="post-metadata">

**Author:** ![modusCell](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/moduscell/32/7600_2.png) [@modusCell](https://community.jenkins.io/u/modusCell)\
**Post date:** [June 8, 2024, 7:26pm UTC](https://community.jenkins.io/t/shared-library-development-in-local/15810/3 "2024-06-08T19:26:44Z")

</div>

@timja thank you very much for your reply. Yes that could cut one corner but still clunky. Make a change, build etc.  
Lack of development environment for Jenkins groovy scripts increase development time significantly. There should be a way but what 🙂

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [June 9, 2024, 12:38pm UTC](https://community.jenkins.io/t/shared-library-development-in-local/15810/4 "2024-06-09T12:38:52Z")

</div>

This may seem quite contrarian, but if a Jenkins user is spending a lot of time inside the development of a Pipeline script, then I think that they may be placing too much logic in the Pipeline script.

When logic is placed in the Pipeline script, it can only be verified from a running Pipeline. When that logic is placed in a shell script, batch file, or other scripting language, then it can be developed and diagnosed from the environments that are commonly used for shell scripts, batch files, and other scripting languages.

Jesse Glick gave a talk in 2017 that shares that as one of his guiding principles. Slides and demo code from the talk are available in a [GitHub repository](https://github.com/jglick/jk--).

[![](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/d/d90f0c5d89e22b6589dc6728b8a4a23f7b7114a6.jpeg "Jenkins World 2017: How to Use Jenkins Less") ](https://www.youtube.com/watch?v=Zeqc6--0eQw)

There are tasks that are best performed directly in Jenkins Pipeline, like declaring parallel stages, but many users mistakenly use facilities in Pipeline that would be better if they were implemented in a shell script or batch file.

---

<div class="post-metadata">

**Author:** ![modusCell](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/moduscell/32/7600_2.png) [@modusCell](https://community.jenkins.io/u/modusCell)\
**Post date:** [June 9, 2024, 2:44pm UTC](https://community.jenkins.io/t/shared-library-development-in-local/15810/5 "2024-06-09T14:44:48Z")

</div>

@MarkEWaite Thank you for your reply specially for on Sunday and sharing that video. It’s quite insightful and I understand the importance of keeping things simple.  
I have no intention to create complex logic/s in pipeline scripts declarative or scripted. For the things require complex logic I am using container to run Python/Java etc.

I just want to use the basic functions comes with [Pipeline Utility Steps](https://www.jenkins.io/doc/pipeline/steps/pipeline-utility-steps/#readjson-read-json-from-files-in-the-workspace) in a convenient way. Writing & debugging.

I guess I will keep using “re-play” button 🙂

Thank you,  
mo

---

<div class="post-metadata">

**Author:** ![jglick](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/jglick/32/77_2.png) [@jglick](https://community.jenkins.io/u/jglick)\
**Post date:** [June 10, 2024, 5:21pm UTC](https://community.jenkins.io/t/shared-library-development-in-local/15810/6 "2024-06-10T17:21:04Z")

</div>

> [@modusCell](#):
>
> I found some suggestions like using re-play function on UI but developing script in a text box in a web page not convenient.

There is a `replay-pipeline` CLI command which may be better suited to testing library changes made in a local text editor.

---

<div class="post-metadata">

**Author:** ![modusCell](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/moduscell/32/7600_2.png) [@modusCell](https://community.jenkins.io/u/modusCell)\
**Post date:** [June 11, 2024, 5:48pm UTC](https://community.jenkins.io/t/shared-library-development-in-local/15810/7 "2024-06-11T17:48:31Z")

</div>

@jglick thank you very much. This is way easier!
