Bird
0
0

Which of the following is the correct syntax to define a job named test in a GitLab CI/CD pipeline YAML file?

easy📝 Syntax Q12 of 15
Django - Deployment and Production
Which of the following is the correct syntax to define a job named test in a GitLab CI/CD pipeline YAML file?
Atest: script: - python manage.py test
Bjob test { run: python manage.py test }
C- job: test steps: - script: python manage.py test
Dtest => { script: 'python manage.py test' }
Step-by-Step Solution
Solution:
  1. Step 1: Recall GitLab CI YAML job syntax

    GitLab CI jobs are defined as job_name: followed by script: list with commands.
  2. Step 2: Compare options with correct YAML syntax

    test: script: - python manage.py test matches the correct YAML format for a job named test running the Django test command.
  3. Final Answer:

    test:\n script:\n - python manage.py test -> Option A
  4. Quick Check:

    GitLab CI job syntax uses job_name: and script: list = A [OK]
Quick Trick: GitLab CI jobs use job_name: and script: list [OK]
Common Mistakes:
MISTAKES
  • Using curly braces or other languages syntax
  • Missing the dash before script commands
  • Confusing job syntax with other CI tools

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Django Quizzes