Complete the code to define a basic GitLab CI job named test_job.
test_job:
stage: test
script:
- [1]The script section runs shell commands. echo "Running tests" is a valid command to print a message.
Complete the code to specify the build stage in the GitLab CI configuration.
stages:
- [1]
- test
- deployThe stages section lists the pipeline stages. build is the standard name for the first stage.
Fix the error in the job definition by completing the missing keyword for the job name.
[1]: stage: build script: - echo "Building project"
job or stage as job names.The job name is build. It should be a simple identifier without extra keywords.
Fill both blanks to create a job that runs only on the main branch and uses the deploy stage.
deploy_job: stage: [1] script: - echo "Deploying application" only: - [2]
The stage must be deploy to match deployment. The job runs only on the main branch.
Fill all three blanks to define a job named lint that runs in the test stage, executes npm run lint, and runs only on merge requests.
lint: stage: [1] script: - [2] only: - [3]
only.The job lint runs in the test stage, executes the command npm run lint, and is limited to merge requests.