0
0
Jenkinsdevops~10 mins

GitLab CI comparison in Jenkins - Interactive Code Practice

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

Complete the code to define a GitLab CI job that runs a script.

Jenkins
job_name:
  script:
    - [1]
Drag options to blanks, or click blank then click option'
Aecho Hello World
Brun echo Hello
Cprint('Hello World')
Dexecute echo Hello
Attempts:
3 left
💡 Hint
Common Mistakes
Using programming language syntax instead of shell commands.
Adding extra keywords like 'run' or 'execute' which are not valid here.
2fill in blank
medium

Complete the code to specify the stage for a GitLab CI job.

Jenkins
job_name:
  stage: [1]
  script:
    - echo Running job
Drag options to blanks, or click blank then click option'
Abuild
Bexecute
Crun
Ddeploy
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid stage names like 'execute' or 'run'.
Confusing stage with script commands.
3fill in blank
hard

Fix the error in the GitLab CI job to correctly specify the image to use.

Jenkins
job_name:
  image: [1]
  script:
    - echo Hello
Drag options to blanks, or click blank then click option'
Adocker image:latest
Bdocker image
Calpine:latest
Ddocker_latest
Attempts:
3 left
💡 Hint
Common Mistakes
Using spaces in the image name.
Using underscores instead of colons.
4fill in blank
hard

Fill both blanks to create a GitLab CI job that runs only on the master branch and uses a specific runner tag.

Jenkins
job_name:
  script:
    - echo Deploying
  only:
    - [1]
  tags:
    - [2]
Drag options to blanks, or click blank then click option'
Amaster
Bmain
Cdocker-runner
Dshell-runner
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect branch names.
Using runner tags that do not exist.
5fill in blank
hard

Fill all three blanks to define a GitLab CI job with a cache path, a before_script, and a retry policy.

Jenkins
job_name:
  before_script:
    - [1]
  script:
    - echo Build
  cache:
    paths:
      - [2]
  retry: [3]
Drag options to blanks, or click blank then click option'
Anpm install
Bnode_modules/
C2
Dnpm run build
Attempts:
3 left
💡 Hint
Common Mistakes
Putting main build commands in before_script.
Using invalid cache paths.
Setting retry to a non-numeric value.