Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Software is to be deployed to a live server using a declarative pipeline script. The server is connected as a jenkins node labeled LiveLinuxAgent. The
Software is to be deployed to a live server using a declarative pipeline script. The server is connected as a jenkins node labeled LiveLinuxAgent. The deploymen Commands, including a command that depends on a file's presence in the Jenkins workspace. This file contains sensitive information like API tokens and environment
What is the recommended approach for deploying this pipeline?
Pick ONE option
A
node Label: "LiveLinuxAgent"
stageDeploy to the server"
fetch file Secretfiles.secrets;
sh use $Secretfiles.secrets
B
node Label: "LivelinuxAgent"
stagedeploy to the server"
withCredentialsstringcredentialsId: 'Secrets', variable: 'Secrets.secrets
sh "use $Secrets.secrets
c
pipeline
agent
label 'LiveLinuxAgent'
stages
stagedeploy to the server"
steps
withCredentialsstringcredentialsId: 'Secrets', variable: 'Secrets.secrets
sh "use $Secrets.secrets
D
pipeline
agent
label 'LiveLinuxAgent'
stages
stagedeploy to the server"
steps
withCredentialsfilecredentialsId: 'Secrets', variable: 'Secrets.secrets
sh "use $Secrets.secrets
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started