This provides best practice of Jenkins pipeline coding convention .
Goal:
- Put all Jenkins jobs under source code.
- Dashboard shows different jobs according to role type.
- Put all the nodes in a resource pool.
For example, several stacks for continuous test, smoke test
Pipeline should lock a stack for smoke test, continuous test…
Developers should lock a stack before debug with the specified node.
Success Criteria:
- Implement functions and handy dashboard
- It’s convenience to check log. (Try to avoid triggering other job)
Code Convention & Guideline
- Avoid exposing sensitive information with Jenkins plugin: Credentials Binding Plugin
- If a pipeline is reused in other pipelines, try to reuse by code instead of re-use job like before, it can be implemented with groovy method(library file) or a runnable groovy script.
- adding comments for auto-generated groovy part
- Pipeline BEST_PRACTICES
Former user (Deleted) drafting.