I have written the following code to execute the ansible playbook, but got
the following error:
stage('Artifacts') {
when {
expression {
params.version =~ /SNAPSHOT/
}
}
steps {
dir('feature') {
checkout resolveScm(source: [$class: 'GitSCMSource',
credentialsId: 'svcPsdGit-ssh', id: '_', remote:
'ssh://git@psdgit.:7999/tt040/it-infra.git', traits:
[gitBranchDiscovery()]], targets: [params.main_branch])
sh '''
echo "`pwd`"
env | sort
cd ansible/playbooks
ansible-playbook
--extra-vars="artifactory_folder=gssd-dev-snapshots-local"
playbooks/deploy.yml
'''
}
}
}
Error:
cd ansible/playbooks + ansible-playbook
--extra-vars=artifactory_folder=gssd-dev-snapshots-local
playbooks/deploy.yml
/home/centos/workspace/MY/Snapshot_deployment/feature@tmp/durable-1c0f5688/script.sh:
line 5: ansible-playbook: command not found [Pipeline] } [Pipeline] // dir
[Pipeline] }
Note: ssh://[email protected]:7999/tt040/it-infra.git
Can you please help me out?
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/bb39b5da-001f-46e1-a250-c64e20bf51c6n%40googlegroups.com.