1---2name: jenkins3description: Use when installing, configuring, or developing with Jenkins CI/CD — server administration (installation on RHEL, systemd, reverse proxy, backup), security (RBAC, LDAP/AD, credentials management, script approval), declarative and scripted pipelines (Jenkinsfile), shared libraries, multibranch pipelines, agent management (SSH/JNLP/Docker/Kubernetes agents), plugin management, job DSL, Blue Ocean, Jenkins Configuration as Code (JCasC), and pipeline best practices. Part of the cicd-* skill family.4---56# Jenkins CI/CD — Administration & Development78For Docker agent patterns see `docker-admin` and `docker-cicd`. For reverse proxy configuration see `rhel-web-servers` or `ubuntu-web-servers`.910<HARD-RULE>11Never store credentials in Jenkinsfile or pipeline code — always use the Credentials plugin with credential IDs and withCredentials() blocks.12</HARD-RULE>1314<HARD-RULE>15Never run builds on the Jenkins controller — always use agents; controller builds are a security risk and degrade controller performance.16</HARD-RULE>1718<HARD-RULE>19Always use declarative pipeline syntax for new pipelines — scripted pipelines are harder to maintain and lack built-in validation.20</HARD-RULE>2122<HARD-RULE>23Never skip the script approval process — unapproved scripts can execute arbitrary code on the controller with full system access.24</HARD-RULE>2526---2728## Reference Files2930Detailed code examples, patterns, and configuration are in the reference files below. Read the relevant file when working on that area.3132| File | Covers |33|---|---|34| [admin-security-agents.md](admin-security-agents.md) | architecture overview, RHEL 9 installation, security (RBAC, LDAP/AD, credentials), and agent management (SSH, Docker, Kubernetes) |35| [backup-jcasc-pipelines.md](backup-jcasc-pipelines.md) | backup/disaster recovery, Jenkins Configuration as Code (JCasC), and declarative pipeline syntax and patterns |36| [libraries-multibranch-patterns-dsl.md](libraries-multibranch-patterns-dsl.md) | shared libraries, multibranch pipelines, advanced pipeline patterns (parallel, matrix, docker agents), and Job DSL |3738---3940---4142## Anti-Patterns4344| Anti-Pattern | Why It Fails | Correct Approach |45|---|---|---|46| Configuring jobs through the UI instead of Jenkinsfile | No version control, no code review, no audit trail; configuration drift between environments | Use declarative Jenkinsfile in SCM; treat pipeline as code; review changes through PRs |47| Running builds on the Jenkins controller node | Controller becomes unstable; resource contention; security risk if builds have network access | Use dedicated agents (Docker, SSH, or cloud agents); controller should only orchestrate |48| Storing credentials in pipeline scripts or environment variables | Plaintext secrets in build logs, SCM history, and console output | Use Jenkins Credentials store with proper scoping; access via credentials() binding in Jenkinsfile |49| No pipeline timeout or resource limits | Stuck builds consume executor slots indefinitely; queue backs up; other builds starve | Set `timeout` in pipeline options; configure executor limits per node; use `lock` for shared resources |50| Not backing up Jenkins configuration | Controller disk failure loses all job configs, credentials, and build history; days of manual recreation | Schedule daily backups of JENKINS_HOME (or use SCM-based config with JCasC); test restore quarterly |5152---5354## Related Skills5556| Topic | Skill |57|---|---|58| Docker agent patterns, Dockerfile best practices | `docker-admin`, `docker-cicd` |59| Docker networking, storage, security | `docker-networking`, `docker-storage`, `docker-security` |60| Docker Compose for local Jenkins stacks | `docker-compose-patterns` |61| Reverse proxy (Nginx/Apache) for Jenkins | `rhel-web-servers`, `ubuntu-web-servers` |62| RHEL system admin (systemd, firewalld, SELinux) | `rhel-server-admin` |63| Kubernetes cluster management | (kubernetes skill — planned) |64| LDAP/AD/SSO configuration | `windows-sso`, `linux-centrify` |65| Git workflows and branching strategies | (git skill — planned) |66| IBM WebSphere deployments from Jenkins | `ibm-websphere` |67| IBM MQ integration in pipelines | `ibm-mq` |68| BMC Control-M job scheduling alongside Jenkins | `control-m` |