Jenkins pipeline #123
34
Jenkinsfile
vendored
34
Jenkinsfile
vendored
@@ -1,37 +1,9 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
tools {
|
stage('Run Tools Deployment Job') {
|
||||||
git 'Default'
|
|
||||||
}
|
|
||||||
parameters {
|
|
||||||
booleanParam(name: 'TERRAFORM', defaultValue: false)
|
|
||||||
}
|
|
||||||
stages {
|
|
||||||
stage('Clean workspace') {
|
|
||||||
steps {
|
steps {
|
||||||
cleanWs()
|
build(
|
||||||
}
|
job: '../tools-deployment'
|
||||||
}
|
|
||||||
stage('Checkout') {
|
|
||||||
steps {
|
|
||||||
checkout([
|
|
||||||
$class: 'GitSCM',
|
|
||||||
branches: [[name: 'master']],
|
|
||||||
extensions: [],
|
|
||||||
userRemoteConfigs: [[credentialsId: 'tools-deploy-key-gitea', url: '_gitea@gitea.release11.com:R11/release11-tools.git']]
|
|
||||||
])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Run Ansible playbook') {
|
|
||||||
steps {
|
|
||||||
sh '''
|
|
||||||
pwd
|
|
||||||
ls
|
|
||||||
'''
|
|
||||||
ansiblePlaybook(
|
|
||||||
playbook: 'TOOLS.yml',
|
|
||||||
inventory: 'inventory/hosts',
|
|
||||||
credentialsId: 'tools-deploy-key-netadm'
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user