-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathJenkinsfile
34 lines (32 loc) · 1.15 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
pipeline {
agent any
stages {
stage('Git Clone') {
steps {
rocketSend channel: 'network-build', message: 'Config Deploy Started'
git branch: 'master', url: 'https://github.com/ArctiqTeam/ansiblefest-sf-2017'
}
}
stage ('Clean up local env'){
steps {
sh '''#!/bin/bash
rm -rf /root/.ansible/*'''
}
}
stage ('Test Connectivity'){
steps {
ansiblePlaybook inventory: '${WORKSPACE}/ansible/inventory/jenkins/hosts', playbook: '${WORKSPACE}/ansible/test.yml', sudoUser: null
}
}
stage ('Configure OSPF'){
steps {
ansiblePlaybook inventory: '${WORKSPACE}/ansible/inventory/jenkins/hosts', playbook: '${WORKSPACE}/ansible/configure.yml', sudoUser: null
}
}
stage ('Build Complete'){
steps{
rocketSend attachments: [[audioUrl: '', authorIcon: '', authorName: '', color: '', imageUrl: '', messageLink: '', text: '', thumbUrl: '', title: 'lastBuild ', titleLink: 'http://127.0.0.1:8080/job/ansiblefest-sf-2017/job/master/lastBuild/', titleLinkDownload: '', videoUrl: '']], channel: 'network-build', message: 'Config Deploy Finised'
}
}
}
}