In a hybrid CI/CD approach, which of the following best describes the main advantage?
Think about how hybrid approaches balance different environments.
Hybrid CI/CD pipelines leverage both on-premises and cloud environments to improve speed and flexibility, unlike purely cloud or manual approaches.
Given this Jenkinsfile snippet using hybrid agents:
pipeline {
agent none
stages {
stage('Build') {
agent { label 'on-prem-agent' }
steps {
echo 'Building on on-premises agent'
}
}
stage('Deploy') {
agent { label 'cloud-agent' }
steps {
echo 'Deploying on cloud agent'
}
}
}
}What will be the console output when this pipeline runs?
pipeline {
agent none
stages {
stage('Build') {
agent { label 'on-prem-agent' }
steps {
echo 'Building on on-premises agent'
}
}
stage('Deploy') {
agent { label 'cloud-agent' }
steps {
echo 'Deploying on cloud agent'
}
}
}
}Each stage uses its own agent label to run steps.
The pipeline runs the 'Build' stage on the on-premises agent and the 'Deploy' stage on the cloud agent, printing messages accordingly.
Which Jenkins configuration snippet correctly sets up a hybrid pipeline that uses a Docker container on a cloud agent for testing and an on-premises agent for building?
Remember that Docker agent inside a stage requires both image and label separately.
Option B correctly assigns the on-premises agent for build and uses a Docker container on the cloud agent for testing. Other options misuse agent blocks or combine labels incorrectly.
A Jenkins hybrid pipeline fails with the error: java.lang.IllegalArgumentException: No agent found with label 'cloud-agent'. What is the most likely cause?
Check the agent labels configured in Jenkins nodes.
The error indicates Jenkins cannot find any agent with the label 'cloud-agent'. This usually means no node has that label assigned or the node is offline.
You have a hybrid CI/CD setup where builds run on-premises and deployments run in the cloud. Which workflow change will best reduce deployment downtime during updates?
Think about deployment strategies that minimize downtime.
Blue-green deployment allows switching traffic between two identical environments, reducing downtime during updates. Keeping builds on-premises maintains hybrid benefits.