You are managing a CI/CD pipeline in GitLab that needs to deploy to different environments based on the branch being merged (e.g., develop branch to staging, main branch to production). How would you configure the pipeline to ensure the correct deployment for each branch?
A DevOps engineer is setting up a GitLab Child Pipeline to dynamically trigger jobs based on changes in different components of their repository. Which of the following is required to correctly configure a child pipeline?
You are managing a CI/CD pipeline in GitLab for a monorepo containing multiple services. Some services need to be tested and deployed only when specific files are modified. How should you configure the pipeline to achieve this efficiently?
You have a CI/CD pipeline in GitLab with several jobs. One of your jobs, critical_task, must run and complete successfully before any other jobs in its stage can execute. You have configured the .gitlab-ci.yml as follows:stages: - setup - test critical_task: stage: setup script: - echo "Critical Task Running" secondary_task: stage: setup script: - echo "Secondary Task Running" needs: - critical_task unit_tests: stage: test script: - echo "Running unit tests"