Which statement best describes a key difference between GitLab CI and Jenkins pipelines?
Think about where the pipeline configuration files live and how they are managed.
GitLab CI pipeline definitions are stored as .gitlab-ci.yml files inside the project repository, making them easy to version control. Jenkins pipelines use a Jenkinsfile or UI setup, which may be stored separately.
Given this Jenkins pipeline snippet, what will be the output status of the Build stage if the sh command fails?
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'exit 1'
}
}
}
}Consider how Jenkins treats shell command exit codes in pipeline steps.
In Jenkins, if a shell command returns a non-zero exit code (like 1), the stage fails and the pipeline stops unless error handling is added.
What is the correct order of execution for the following GitLab CI stages defined in .gitlab-ci.yml?
Remember the typical order of stages in CI/CD pipelines.
Usually, the build stage runs first to create artifacts, then test runs to verify them, followed by deploy and finally cleanup.
A Jenkins pipeline is not triggering automatically when code is pushed to the Git repository. What is the most likely cause?
Think about how Jenkins knows when to start a pipeline on Git events.
Jenkins relies on webhooks from the Git server to trigger pipelines automatically. If the webhook is missing or unreachable, no trigger occurs.
Which approach is considered best practice for managing secrets securely in GitLab CI compared to Jenkins?
Consider how each tool supports secret masking and secure storage.
GitLab CI supports masked variables that hide secret values in logs. Jenkins uses a credentials plugin to securely store and inject secrets without exposing them in code.