Complete the code to define a GitLab CI job that runs a script.
job_name:
script:
- [1]The script section in GitLab CI expects shell commands like echo Hello World.
Complete the code to specify the stage for a GitLab CI job.
job_name:
stage: [1]
script:
- echo Running jobThe stage keyword defines the phase like build, test, or deploy. build is a common stage name.
Fix the error in the GitLab CI job to correctly specify the image to use.
job_name:
image: [1]
script:
- echo HelloThe image keyword expects a valid Docker image name like alpine:latest.
Fill both blanks to create a GitLab CI job that runs only on the master branch and uses a specific runner tag.
job_name:
script:
- echo Deploying
only:
- [1]
tags:
- [2]The only keyword limits the job to the master branch. The tags specify which runner to use, like docker-runner.
Fill all three blanks to define a GitLab CI job with a cache path, a before_script, and a retry policy.
job_name:
before_script:
- [1]
script:
- echo Build
cache:
paths:
- [2]
retry: [3]before_script runs commands before the main script, like npm install. The cache saves directories like node_modules/ to speed up builds. The retry sets how many times to retry on failure.