CJE study materials
CJE study resources

CJE common mistakes

CJE · Understand the traps and how to avoid them.

Mistake 1

Treating declarative Pipeline like scripted Pipeline by placing Groovy loops, variable assignments, or method definitions directly inside the pipeline block instead of inside script blocks or steps.

Candidates learned Pipeline from scripted examples or older tutorials and do not internalize that declarative syntax is a constrained DSL with a fixed structure; the error surfaces only at runtime validation, so they misdiagnose it as a plugin problem.

What to do instead

Memorize the declarative skeleton (pipeline, agent, stages, stage, steps, post) and the rule that arbitrary Groovy must sit in a script block or a shared library step. Practice converting a scripted pipeline into declarative and back, and rehearse reading the validation error that points to the offending line.

Mistake 2

Assuming a job automatically runs when a webhook arrives, without checking whether SCM polling, the multibranch scan, or the trigger configuration is actually in place.

Webhooks feel like the whole mechanism, but Jenkins still needs the matching trigger (for example a GitHub hook trigger on a freestyle job, or branch indexing for a multibranch project) and reachable credentials; candidates skip the end-to-end chain.

What to do instead

Trace the full path: SCM webhook delivery, Jenkins endpoint reachability, trigger configured on the job, credentials valid, and job indexed or triggered. Know that multibranch projects rely on branch indexing plus the scan trigger, and be able to read the hook delivery log and Jenkins system log to locate the break.

Mistake 3

Configuring agents by hostname and labels without verifying remoting connectivity, Java version compatibility, or that the label expression on the job actually matches an online agent.

Candidates memorize the agent configuration screens but not the runtime failure modes: agent offline, wrong Java, port blocked, label expression evaluated as an AND of labels that no single agent has.

What to do instead

Practice bringing an SSH or inbound agent online from scratch and reading the agent log. Learn label expression syntax including && and || and the built-in labels, and know how to confirm which node a build ran on from the console output and the build page.

Mistake 4

Granting broad permissions such as Overall/Administer or Job/Configure through the matrix or role strategy to make a failing build work, instead of diagnosing the missing specific permission.

Permission errors are terse, and candidates default to escalation rather than mapping the failing action to the exact permission; they also confuse authentication (who you are) with authorization (what you may do).

What to do instead

Learn the permission groups and which action each guards, then read the 403 or stack trace to identify the missing one. Practice with matrix authorization and a role-based strategy, and know that agent-to-controller access control and script approval are separate security layers.

Mistake 5

Storing credentials as plain text in job configuration, pipeline scripts, or global environment variables rather than using the credentials store and withCredentials.

It is the fastest way to get a build green locally, and candidates do not connect secret handling to masking, scoping, and the credential-binding syntax that the exam tests.

What to do instead

Drill the credentials binding patterns for username/password, secret text, SSH keys, and files, including withCredentials in Pipeline and the freestyle binding plugin. Understand credential scoping, masking in console output, and why credentials should never be committed to a Jenkinsfile.

Mistake 6

Ignoring workspace and artifact lifecycle: expecting files from a previous build to persist, or expecting archived artifacts to be available on a different agent without copying them.

Candidates conflate the workspace, the build record, and the artifact store; they also assume distributed builds share a filesystem, which they do not.

What to do instead

Learn that workspaces are per-agent and reusable but not guaranteed clean, that archived artifacts live with the build record and are retrievable by URL, and that stash/unstash or artifact copy is needed to move files between stages on different agents. Know the clean checkout and workspace cleanup options.

Mistake 7

Upgrading Jenkins core or plugins on a production instance without checking plugin compatibility, backup, or the plugin manager's pending update warnings.

Candidates treat upgrades as routine and skip the dependency and compatibility checks that the administration domain emphasizes; they also forget that a core upgrade can disable incompatible plugins.

What to do instead

Know the safe upgrade sequence: back up JENKINS_HOME, review plugin update warnings and core requirements, upgrade plugins and core in a compatible order, and restart and verify. Understand the update center, the plugin manager, and how to roll back by restoring the home directory.

Mistake 8

Misconfiguring the SCM section of a freestyle job, such as wrong branch specifier, missing credentials, or shallow clone settings, and then blaming the build step for a checkout failure.

The checkout failure appears in the console as a build error, so candidates debug the build step rather than the SCM configuration; branch specifier syntax and credential binding are easy to get subtly wrong.

What to do instead

Read the console output from the top, where the checkout is logged, and verify repository URL, credentials ID, branch specifier (including the refs/heads/ prefix), and additional behaviors such as clean before checkout. Practice with Git and at least one other SCM so the pattern is transferable.

Mistake 9

Treating a Pipeline failure as a Jenkins bug without reading the full console log, the pipeline steps trace, or the stage view to locate the failing step.

Pipeline errors are often a wrapped exception from a shell step or a plugin, and candidates stop at the first red line instead of following the cause chain; they also skip the replay feature that would let them test a fix.

What to do instead

Develop a routine: open the full log, find the first error, check the exit code of the shell step, inspect the pipeline steps view, and use replay to iterate on a Jenkinsfile without committing. Know how to enable timestamps and how to read a stack trace for the originating plugin.

Mistake 10

Overlooking retention and disk hygiene, letting build records, artifacts, and old workspaces accumulate until the controller runs out of disk and jobs fail.

Retention is invisible until it breaks something, and candidates do not connect the log rotation and build discarder settings to the maintenance domain; they also ignore monitoring of disk and queue health.

What to do instead

Learn the build discarder and log rotation configuration at job and global level, the artifact retention implications, and how to inspect disk usage under JENKINS_HOME. Know the monitoring options for queue length, node health, and disk space, and what to clean safely.