this is my pipeline script:
//
// Setup up the Remote connection for SSH Build Pipeline step
//
def remote = [:]
remote.name = 'ststor01'
remote.host = 'ststor01'
remote.user = 'natasha'
remote.password = 'Bl@kW'
remote.allowAnyHosts = true
pipeline {
// Run on agent with label 'ststor01'
agent { label 'ststor01' }
// Pipeline stages
stages {
// Deploy stage
stage('Deploy') {
steps {
echo 'Deploying ...'
// Connect to GIT and download the repo code
// Use the Jenkins Credentials by ID: GIT_CREDS
git credentialsId: 'GIT_CREDS', url: 'http://git.stratos.xfusioncorp.com/sarah/web.git'
// Transfer all the files we downloaded to /tmp of ststor01
sshPut remote: remote, from: '.', into: '/tmp'
// Finally move all the files from /tmp to /data on ststor01
sshCommand remote: remote, command: "mv -f /tmp/${JOB_NAME}/* /data"
}
}
// Test stage
stage('Test') {
environment {
// Update the below value as per the text given in question
INDEX_CONTENT = 'Welcome to xFusionCorp Industries'
}
steps {
// Now test that the content from default page from HTTPD on each
// appservers is same as the index.html content required as
sh '((curl http://stapp01:8080/ | grep -F "$INDEX_CONTENT") && true)'
sh '((curl http://stapp02:8080/ | grep -F "$INDEX_CONTENT") && true)'
sh '((curl http://stapp03:8080/ | grep -F "$INDEX_CONTENT") && true)'
}
}
}
}
i try to setup storage server as build agent(install java etc) and use it to run the pipeline above.
and the fail msg of verification, i really dont know what to do: