βΆDeclarative vs Scripted Pipelines β which should I learn first?
Start with Declarative Pipeline (YAML-based, structured, 95% of jobs). It's readable, enforces best practices, integrates with UI, and covers most use cases. Scripted Pipeline (Groovy-based) is for complex conditional logic, loops, and custom plugins β learn it after mastering Declarative. Declarative Pipeline was added in 2.0 (2016) to replace Scripted as the default; modern Jenkins jobs are 90% Declarative.
βΆHow do I manage Jenkins agents at scale?
Dynamic agents via Docker containers (one agent per build, spin up/down on demand) or Kubernetes pod templates. Keep the controller node agent-free (run-builds-only=false in config). Use Nexus or Artifactory for artifact caching across agents. Jenkins cloud plugins (EC2, Kubernetes, Azure, Docker) auto-scale agents based on queue depth. For regulated environments: dedicated agent pools by environment (dev/staging/prod) with RLS/RBAC per pool.
βΆHow do I handle secrets and credentials in Jenkins?
Credentials Plugin stores secrets encrypted in Jenkins (passwords, API keys, SSH keys, tokens). Reference them in Jenkinsfile via `withCredentials()` block β never log them. Use Jenkins Credentials Provider to mask secrets in console output. For cloud-native: inject secrets from Vault, AWS Secrets Manager, or Kubernetes secrets. CloudBees Secrets Plugin encrypts and rotates secrets automatically. Rule: all secrets outside Jenkins = vault-backed, all Jenkins secrets = encrypted in JENKINS_HOME.
βΆJenkins X vs vanilla Jenkins β what's the difference?
Jenkins (classic): self-hosted, UI-driven or pipeline-as-code, full control, high operational burden. Jenkins X: opinionated GitOps-first platform on Kubernetes, auto-scaling, preview environments per PR, faster feedback loops. Jenkins X is a separate distro (discontinued active development in 2021, now community-maintained). For Kubernetes-native teams: Jenkins X. For enterprises needing flexibility + self-hosted control: Jenkins classic. Jenkins remains market leader; Jenkins X is niche (tech-forward startups, cloud-native teams).
βΆJenkins vs GitHub Actions in 2026 β when do I pick which?
GitHub Actions: fast time-to-value, easy workflow syntax, free for public repos, hosted by GitHub, native GitHub integration, limited to 6h per job. Jenkins: maximum flexibility, self-hosted (control + cost), 1,800+ plugins, unlimited job duration, works with ANY git provider, good for complex/regulated builds. GitHub Actions wins for new teams/projects; Jenkins wins for enterprises, long-running builds, multi-language/multi-cloud. Market: GitHub Actions growing fast in greenfield, Jenkins entrenched in enterprise (70%+ of Fortune 500 still use Jenkins).
βΆWhat security plugins should I always enable?
Role-Based Access Control (RBAC) β matrix-based or project-based. Script Approval (sandbox Groovy in pipelines). Bouncy Castle β upgraded TLS/crypto. Authentication Tokens API β API-key access without plaintext passwords. Credentials Binding β masks secrets in logs. Log Parser β find errors/warnings in build logs. For regulated: integrate with LDAP/Active Directory + Kubernetes RBAC + audit logs to Splunk/ELK. Principle: never trust user input, sandbox all scripts, encrypt all secrets, log all access.
βΆHow do I migrate from Jenkins to GitHub Actions?
Parallel run (don't delete Jenkins yet): write `.github/workflows/*.yml` mirroring your Jenkinsfile stages. Test on feature branches first. Once Actions are stable, cut over mainβActions, keep Jenkins read-only for 2 weeks, then decommission. Expect 2-4 weeks depending on pipeline complexity. Tools: `jenkinsfile-runner` can execute Jenkinsfile on Actions, but translating groovy-heavy pipelines requires manual work. For complex Jenkins setups: stay on Jenkins or hybrid (Actions for simple jobs, Jenkins for complex orchestration).