You might consider JenkinsPipelineUnit (refer to
https://issues.jenkins-ci.org/browse/JENKINS-33925 for comparisons of
various alternatives for automated testing of pipeline scripts).

If that doesn't meet your needs, could you create a test repository with
one branch per test scenario, then have it use your pipeline shared library
for its tests?  A multi-branch pipeline would then monitor all the branches
in that repository and report failures for the behaviors you're checking
that are related to that specific run.

Mark Waite

On Sat, Sep 16, 2017 at 2:06 AM red 888 <fakemailred...@gmail.com> wrote:

> Need to have a good dev workflow for developing share libraries my jobs
> depend on.
>
> Right now when a shared Lib is edited all jobs depending on it
> automatically run. I want to control and test this code somewhat like I do
> with regular apps with Jenkins.
>
> I don't want to have to manually point my jobs to specific versions
> (branches) of my shared Lib repo to test it and them have to point them
> back.
>
> I have an idea but not sure it is supported or too nutty.
>
> Can I have jobs automatically scan and execute once for each branch of
> each shared Lib repo? Just Like multibranch pipelines but the branches they
> track are from the shared libraries they import? Because this is my plan:
>
> * Create a test job for each language/platform I currently deploy with
> Jenkins. These jobs are designed expressly to mirror my real apps and do
> test runs of my shared libs for all my platforms without impacting my prod
> apps/jobs
> * These test jobs don't point to specific shared library branches
> (versions) but track ALL of there shared lib branches
> * when we branch one of the shared lib repos and commit our changes to our
> individual test/feature/hotfix branches all the test jobs execute for each
> of our branches.
> * We don't step on each other and can work in parallel because each branch
> gets its own test runs
> * the prod jobs just point to master so they are not impacted and
> deploying to all the jobs is as easy as merging to master
>
> --
> 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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/9b98e145-5a9f-4b88-ab37-f91077fa2217%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtFUJjx5Srd9eFvcY8%3DXfnDEPRVEhqE3iHjW4mdrFG33Rg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to