-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
61 lines (59 loc) · 1.81 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
pipeline {
agent { label 'master'}
triggers {
pollSCM('* * * * *')
}
environment {
ANSIBLE_CONFIG = "Jenkins-LTS/ansible.cfg"
}
stages{
stage('Checkout') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'RelativeTargetDirectory',
relativeTargetDir: 'Jenkins-LTS'],
[$class: 'WipeWorkspace']],
submoduleCfg: [],
userRemoteConfigs: [[credentialsId: 'fd864bf0-5e33-4cf1-a130-67ac2c22bf17', url: 'https://github.com/MRDO5/jenkins-lts.git']]])
}
}
stage('Deploy') {
parallel {
stage('Syntax check') {
steps {
ansiColor('gnome-terminal') {
ansiblePlaybook become: true,
colorized: true,
credentialsId: '7980492c-7fa3-41b6-9c8e-b44d3f7ce236',
extras: '--syntax-check' ,
inventory: 'Jenkins-LTS/inventory',
playbook: 'Jenkins-LTS/main.yml'
}
}
}
stage('Check provision for virtual machines') {
steps {
ansiColor('gnome-terminal') {
ansiblePlaybook become: true,
colorized: true,
credentialsId: '7980492c-7fa3-41b6-9c8e-b44d3f7ce236',
installation: 'ansible',
inventory: 'Jenkins-LTS/inventory',
playbook: 'Jenkins-LTS/main.yml'
}
}
}
}
}
stage('Log-parser') {
steps {
step([$class: 'LogParserPublisher',
failBuildOnError: true,
parsingRulesPath: '/var/lib/jenkins/minimal-rules',
showGraphs: true,
useProjectRule: false])
}
}
}
}