-
Notifications
You must be signed in to change notification settings - Fork 43
Home
The jenkins_pipeline_builder gem is designed to help you build jenkins jobs from json or yaml files. These files can (and should) be checked in with the code the are building or deploying. This solves a few problems. First, since all of the job config is stored in version control you can see every change made and easily revert. No more trying to remember what you changed in the job to fix it last time. Second, it means that if your build/deploy process changed and you need to run against an old version you can build the jobs that were stored for that version and run them, then run with your current jobs.
When using the gem there are a few things you need to know. There are two main types of files: project and job files. A project file sets everything up. It declares any dependencies, sets the default values and then lists the jobs that are part of that project. A project file can declare multiple projects that all share the same defaults and dependencies. At its simplest, a job file defines a single job. However, if you have a number of similar jobs (perhaps they run the same commands on different repos, or run at different times) then a single job file can specify both through the use of variables.
Setting up to use jenkins_api_client
-
Extension types
- For Jobs and Promotions:
- Job Attributes (`job_attribute`)
- Conditional Blocks
- For Jobs:
- Builders (`#builder`)
- Wrappers (`#wrapper`)
- Triggers (`#trigger`)
- Publishers (`#publisher`)
- For Promotions:
- Promotion Conditions (`#promotion_condition`)
- Build Steps (`#build_step`)
- For Jobs and Promotions:
Creating views
- Extensions folder
- Pull Requests
- Versioning Extensions
- pipeline
- pull_request
- introspection