Complete the code to specify the agent launch method using SSH in Jenkins.
agent {
label 'linux'
[1] {
host '192.168.1.10'
credentialsId 'ssh-key'
}
}The ssh block defines the SSH launch method for the Jenkins agent.
Complete the code to launch a Jenkins agent using JNLP.
node('agent-node') { stage('Run') { steps { [1] { url 'http://jenkins.example.com' tunnel 'jenkins.example.com:50000' } } } }
The jnlpLauncher block configures the agent to connect via JNLP.
Fix the error in the Jenkins agent configuration to use the correct launch method.
agent {
label 'build-agent'
[1] {
credentialsId 'agent-creds'
host '10.0.0.5'
}
}The ssh block is needed here to correctly configure the SSH launch method for the agent.
Fill both blanks to configure a Jenkins agent with SSH launch and specify the correct host and credentials.
agent {
[1] {
host '[2]'
credentialsId 'ssh-key-123'
}
}The ssh block is used for SSH launch, and the host IP must be a valid address like 192.168.100.50.
Fill all three blanks to define a Jenkins agent using JNLP with the correct URL, tunnel, and launch method.
agent {
[1] {
url '[2]'
tunnel '[3]'
}
}The jnlpLauncher is used for JNLP agents, with the Jenkins URL and tunnel port specified correctly.