0
0
Jenkinsdevops~10 mins

Why plugins extend Jenkins - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to install a plugin in Jenkins using the CLI.

Jenkins
java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin [1]
Drag options to blanks, or click blank then click option'
Agit
Bdocker
Cnodejs
Dmaven
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a plugin unrelated to source control.
2fill in blank
medium

Complete the code to restart Jenkins after installing a plugin.

Jenkins
java -jar jenkins-cli.jar -s http://localhost:8080 [1]
Drag options to blanks, or click blank then click option'
Arestart-now
Breload-configuration
Csafe-restart
Dshutdown
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'shutdown' which stops Jenkins without restart.
3fill in blank
hard

Fix the error in the plugin installation command by choosing the correct option.

Jenkins
java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin [1] --deploy
Drag options to blanks, or click blank then click option'
A--plugin
Bgit
C--install
Ddocker
Attempts:
3 left
💡 Hint
Common Mistakes
Adding extra flags before the plugin name.
4fill in blank
hard

Fill both blanks to create a Jenkins pipeline step that uses a plugin to build a Docker image.

Jenkins
pipeline {
  agent any
  stages {
    stage('Build') {
      steps {
        [1] '[2]'
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
Adocker.build
Bsh
Cmy-image:latest
Decho
Attempts:
3 left
💡 Hint
Common Mistakes
Using shell commands instead of the docker plugin step.
5fill in blank
hard

Fill all three blanks to define a Jenkins pipeline that uses the Git plugin to clone a repository and then runs a shell command.

Jenkins
pipeline {
  agent any
  stages {
    stage('Checkout') {
      steps {
        [1] '[2]'
      }
    }
    stage('Build') {
      steps {
        [3] 'make build'
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
Agit
Bhttps://github.com/example/repo.git
Csh
Dcheckout
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'checkout' instead of 'git' for cloning.