How can I create global macros and templates in jenkins job builder

0 votes

This is my Jenkins Job Builder Directory structure:

jenkins
    ---global-defaults.yaml
    ---global-macros.yaml
    ---global-templates.yaml
    ---projectfolderA
     | ---projectA.yaml

over here my projectA.yaml can't find templates and macros if they are not int he projectAfolder, though it can still find global-defaults

Can I somehow get project.yaml files in sub folders to recognise upper level templates and macros?

Apr 2, 2018 in Jenkins by shubham
• 7,340 points
1,536 views

1 answer to this question.

0 votes

you can append the path to the directory where all the logic is stored when you want to update the jobs

jenkins-jobs --conf config_file update path_to_project_folder:path_to_globals_folder
answered Apr 2, 2018 by ajs3033
• 7,300 points

Related Questions In Jenkins

0 votes
2 answers

How to create backup and copy files in jenkins?

You would require to copy and take ...READ MORE

answered Aug 1, 2019 in Jenkins by Sirajul
• 59,230 points
6,404 views
0 votes
2 answers

How do I schedule job periodically in Jenkins?

The format is as follows: MINUTE (0-59), HOUR ...READ MORE

answered Aug 2, 2019 in Jenkins by Sirajul
• 59,230 points
9,029 views
0 votes
1 answer

Jenkins and Docker: How can I customize my jenkins pipeline to use docker?

Jenkins Pipeline is designed to easily use ...READ MORE

answered Aug 26, 2019 in Jenkins by Sirajul
• 59,230 points
1,330 views
0 votes
1 answer

How to create one Job in Jenkins from CLI?

Hi@akhtar, You need to download the jenkins-cli.jar file ...READ MORE

answered Jul 7, 2020 in Jenkins by MD
• 95,440 points
3,423 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,439 views
+2 votes
1 answer
+1 vote
2 answers

What possible return values are there in Jenkins plugin “Sonarqube scanner”

Use Webhooks in SonarQube Administration setup to ...READ MORE

answered Aug 3, 2018 in Jenkins by Nilesh
• 7,050 points
4,349 views
0 votes
1 answer

Which is better jenkins of TFS 2015 for CI/CD?

Visual Studio and TFS have been using ...READ MORE

answered Aug 21, 2018 in Jenkins by ajs3033
• 7,300 points
1,955 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP