New Year Special Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

CloudBees CJE Certified Jenkins Engineer (CJE) Exam Practice Test

Page: 1 / 19
Total 186 questions

Certified Jenkins Engineer (CJE) Questions and Answers

Question 1

You're a DevOps engineer in charge of configuring Jenkins for your team's CI/CD pipeline. You're utilizing the Jenkins pipeline and the Jenkinsfile. You want to define a stage for your build that utilizes the locally installed Ant and build.xml in the root of your project repository. Which is the correct syntax?

Options:

A.

step('build') { sh 'ant -f build.xml -v' } }

B.

stage('build') { sh 'ant -f build.xml -v' }

C.

stage('build') { steps { sh 'ant -f build-tools/build.xml -v' } }

D.

stage('build') { steps { sh 'ant -f build.xml -v' } }

Question 2

What's the commonly used Java code coverage plugin?

Options:

A.

Maven

B.

Cobertura

C.

Ant

D.

Gradle

Question 3

Which of the following is true about resuming a Declarative Pipeline?

Options:

A.

Declarative Pipelines cab be restarted after a Jenkins failure but not after a transient outage (such as a network failure or disk space exhaustion).

B.

Declarative Pipelines can be resumed only after a transient outage (such as a network failure or disk space exhaustion).

C.

All Declarative Pipelines are restartable by default, with the same inputs (commit to build, parameters, etc) as the original run. Any data that was built In the original run Is available only If the preserveStashes() option Is specified In the Jenkinsfile

D.

Declarative Pipelines that use Docker containers can not be resumed because the docker APIs that Jenkins calls to create the container are not serialized

E.

A Declarative Pipeline can be restarted only If the preserveStashes() option Is set In the pipeline.

Question 4

How can you organize Jenkins projects (or jobs)?

Options:

A.

Folders

B.

Relational databases

C.

Folders and views

D.

Views

Question 5

You are interested in integrating CI/CD in your work environment, but your team lead and several of your team members do not understand the concept. Your boss believes that continuous delivery will mean that someone (namely, you) will need to be on-call around the clock for constant monitoring and deployment of new code. You have a two-minute window to quickly explain what continuous delivery means. Out of the following answers, what is the clearest and most succinct correct answer?

Options:

A.

Continuous delivery means code will be tested and promoted to production environment automatically

B.

Continuous delivery is magic, and Jenkins will make everything work without having to worry about it much.

C.

You're right. Give me the on-call schedule.

D.

Continuous delivery is a software development discipline where software is built so that it can be released to production at any time, while continuous deployment means it is released into production continuously. CI/CD is meant to shorten the amount of time needed for QA while empowering developers to keep code as up-to-date as possible

Question 6

You are given the task to install Jenkins and its prerequisites as part of an initiative toimplement CI/CD. After installing the operating system, you will need to make sure what language is available for Jenkins to utilize before you can successfully install it?

Options:

A.

Perl

B.

Python

C.

Ruby

D.

Java

Question 7

How do you archive artifacts from a Jenkinsfile?

Options:

A.

artifact

B.

archiveArtifacts

C.

export

D.

save

Question 8

What's a fingerprint?

Options:

A.

User tracking in Jenkins

B.

The size of an artifact in bytes

C.

An md5sum for an artifact that's tracked between projects

D.

The name of a file

Question 9

What is a code coverage test?

Options:

A.

It tests components coming together

B.

It tests against the product specifications.

C.

It tests a small piece of functionality, usually at the class method level.

D.

It tests how well your code is tested.

Question 10

What's a benefit of incremental updates over a clean checkout?

Options:

A.

It ensures there are no mistakes

B.

None of these

C.

It's faster

D.

It's more thorough

Question 11

How do you use the Jenkins CLI?

Options:

A.

jcli

B.

There is no Jenkins CLI

C.

java -jar /var/lib/jenkins/jenkins-cli.jar -s http://:8080/

D.

jenkins

Question 12

Which of the following are true about credentials that are implemented in a Declarative Pipeline using the "credentials" or "withCredentials( )" method?

Choose 2 answers

Options:

A.

All credential bindings support the "Secret Text" and "Standard username and password" credential types.

B.

Credential IDs are case Insensitive.

C.

The credential types supported are defined by the binding plugin (or the resource being accessed.

D.

Most credentials called from a pipeline have Global scope, not System scope.

Question 13

Which of the following practices are recommended for a Declarative Pipeline? Choose 3 answers

Options:

A.

Use the pipeline DSL to implement intricate networking and computational tasks that your Pipeline needs to do.

B.

Simplify the test/debug process and improve performance of your pipeline by defining separate steps for each Important task performed by the pipeline.

C.

Encapsulate common Jenkins logic within shared libraries when leveraging Declarative Pipelines.

D.

Call scripts written In Shell, Batch, Groovy, or Python to implement any complex logic required for your pipeline; call these scripts as steps in your pipeline.

E.

Use took such as Maven, Gradle, NPM, Ant, and Make to define most of the build work; cad these executables as steps In your pipeline.

Question 14

Which enables you to use artifacts from a completed build in the workspace of the currently running build?

Options:

A.

Jenkins core

B.

Copy Artifact plugin.

C.

Rebuild plugin.

D.

ArtifactDeployer plugin.

Question 15

Which TIIKII of the following are considered best practices when setting up rules for notifications?

Options:

A.

Send notifications only when direct intervention is needed.

B.

Do not send developers too many email notifications.

C.

Make sure the notification's target Is the right person.

D.

Send notifications by multiple channels (email, chat room, PagerDuty, etc.) to make sure they are received.

E.

Periodically change the recipient of emails, to make sure they are not classified as spam.

Question 16

You are tasked by management to explain continuous deployment. Your explanation will be used in the company's annual report, so you need to ensure you understand it properly. Which is the best definition?

Options:

A.

Building in 60 minutes or less.

B.

A software development practice where contributors are integrating their work very frequently to production in an automated fashion.

C.

A software development discipline where software is built so that it can be released to production at any time.

D.

A software development discipline where software is built so that it can be released to production at any time.

Question 17

How can you configure a Declarative Pipeline to record the fingerprint of an artifact?

Options:

A.

CaII the fingerprintArtifact() step immediately after the archiveArtifacts( ) step.

B.

Enable the Declarative Pipeline 'enableFingerprints' 'option' .

C.

Set the Fingerprint Artifacts global configuration option.

D.

Set the "fingerprint: true" argument for the archiveArtifactsQ step.

E.

No action is required; Declarative Pipelines automatically record a fingerprint for each artifact.

Question 18

What's the Jenkinsfile?

Options:

A.

None of these

B.

It's only used for freestyle projects

C.

It contains the definition for a pipeline

D.

It contains the basic configuration for Jenkins

Question 19

You are using GitHub repository scanning (in a project of type "GitHub Organization") with the Pipeline lenkinsfile Project Recognizer. In this case, which repositories under the organization will have Multibranch projects automatically created for them?

Options:

A.

only repositories that contain a Jenkinsfile in all their branches

B.

only repositories that contain a Jenkinsfile in at least one branch

C.

all repositories that contain a Jenkinsfile in at least one branch or pull request

D.

all repositories

Question 20

What does the M# of executors" field on the Jenkins master control?

Options:

A.

Maximum number of jobs which can be run concurrently on attached agents.

B.

Number of Java threads that can run Jenkins jobs.

C.

Number of external build agents that can be used for jobs run on this Jenkins master.

D.

Number of CPU cores configured for this master.

E.

Number of jobs that can execute simultaneously on the Jenkins master

Question 21

Which menu option do you select to add a pipeline or other project?

Options:

A.

Credentials

B.

My Views

C.

New Item

D.

Manage Jenkins

Question 22

What's the difference between authentication and authorization?

Options:

A.

None of these

B.

Authorization is more strict

C.

Authorization identifies a user, while authentication dictates what a user is allowed to do.

D.

Authentication identifies a user, while authorization dictates what a user is allowed to do.

Question 23

You are a DevOps engineer in charge of your team's Jenkins server. Your project is on major version "1". You want to ensure that this variable, MAJOR_VERSION, is available throughout your pipeline that is defined in a Jenkinsfile. Which of the following ways could you accomplish that using the "environment" directive?

Options:

A.

environment(MAJOR_VERSION = 1)

B.

environment { steps { sh " export MAJOR_VERSION=1" }}

C.

environment { MAJOR_VERSION = 1 }

D.

environment [MAJOR_VERSION=1]

Question 24

Which of the following are true when using build parameters? Choose 3 answers

Options:

A.

If your Jenkinsfile specifies parameters with the "parameters'' directive, those are the only parameters recognized when the Pipeline executes; any parameters that were specified In the "Project is parameterized" section of the Job configuration are cleared.

B.

Use the "params" object to reference parameters that are defined on "The project is parameterized" section of the job configuration.

C.

Use the "parameters" directive to define parameters for your Pipeline Inside your Pipeline code.

D.

If you configure a build parameter of type File, then users can specify a file on the server as build input.

Question 25

You've been promoted at work and are now in charge of the system administrators that look after the Jenkins platform for your company. You no longer want to get notifications from Jenkins, but your subordinates don't know what settings to change in a Jenkinsfile. You give them a look, and say one of the following is what needs to be changed:

Options:

A.

notice

B.

alert

C.

email

D.

emailext

Question 26

You're a DevOps engineer in charge of your team's Jenkins server. You have a particular stage in your pipeline that you want to run on a particular build node. You have to have Apache installed on this node. Assuming the node has been appropriately labeled, "apache", how would you ensure this stage ran on that node?

Options:

A.

apache agent

B.

agent { label 'apache' }

C.

agent( 'apache' )

D.

apache' { agent }

Question 27

How do you navigate to the matrix-based security section of Jenkins?

Options:

A.

Manage Jenkins -> Configure Global Security

B.

Manage Jenkins -> Configure System

C.

None of these

D.

Manage Jenkins -> Configure Global Options

Page: 1 / 19
Total 186 questions