Jump to content

Jenkins scripted pipeline courses using shared libraries


Rubbarollu

Recommended Posts

@ramudu @Spartan Bro's this is just the basics. We have a 10 to 15 Java and Nodejs apps for which we would like to create a scripted shared library and call it through Jenkins file

But need help to understand on how to create the groovy scripts in Vars and methods/functions in src directory for maven projects and npm projects

when Jenkins calls it looks for the groovy script in Vars subdirectory, How do we write steps in Vars/groovy.script

I did not find any videos on how we can we create a groovy script for Java/Node js apps 

All the videos are for hello world

Link to comment
Share on other sites

13 minutes ago, Rubbarollu said:

@ramudu @Spartan Bro's this is just the basics. We have a 10 to 15 Java and Nodejs apps for which we would like to create a scripted shared library and call it through Jenkins file

But need help to understand on how to create the groovy scripts in Vars and methods/functions in src directory for maven projects and npm projects

when Jenkins calls it looks for the groovy script in Vars subdirectory, How do we write steps in Vars/groovy.script

I did not find any videos on how we can we create a groovy script for Java/Node js apps 

All the videos are for hello world

second tutorial lo explain chesadu, how you can write that anedi..

its easy once you get going. we are maintining almost 150+ pipelines with single custom library

neeku reference ga..: https://github.com/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin

Link to comment
Share on other sites

We want to keep build options.yaml file in code repo along with Jenkins file which weill @referring t o the shared library

after this step, we want to read the build options.yaml and from there we want to write the groovy script in vars 

Also based on the buildTech mentioned in the build options file we want to use that particular groovy like if it is maven then use maven if it is nodejs then use nodejs.groovy

Problem antha ikkadey vostundi bro, e script ala rayali how do i do it

also when we run the mvn command it needs to have the build number from jenkins

ivvi anni rayali antey starting point dorakatla

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...