forked from kushview/element
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
69 lines (62 loc) · 2.01 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
61
62
63
64
65
66
67
68
69
// Docs: https://github.com/jenkinsci/gitlab-plugin#scripted-pipeline-jobs
pipeline {
agent none
post {
failure {
updateGitlabCommitStatus name: 'build_linux64', state: 'failed'
}
success {
updateGitlabCommitStatus name: 'build_linux64', state: 'success'
}
aborted {
updateGitlabCommitStatus name: 'build_linux64', state: 'canceled'
}
}
options {
gitLabConnection ('LVTK-GitLab')
gitlabBuilds (builds: [
'build_linux64', 'test_linux64', 'deploy_linux64'
])
}
triggers {
gitlab(
triggerOnPush: true,
triggerOnMergeRequest: true,
branchFilterType: 'All')
}
stages {
stage('build_linux64') {
agent {
label 'linux64'
}
steps {
updateGitlabCommitStatus name: 'build_linux64', state: 'pending'
updateGitlabCommitStatus name: 'build_linux64', state: 'running'
sh 'sh tools/lindeploy/jenkins.sh'
updateGitlabCommitStatus name: 'build_linux64', state: 'success'
}
}
stage('test_linux64') {
agent {
label 'linux64'
}
steps {
updateGitlabCommitStatus name: 'test_linux64', state: 'pending'
updateGitlabCommitStatus name: 'test_linux64', state: 'running'
echo "Testing..."
updateGitlabCommitStatus name: 'test_linux64', state: 'success'
}
}
stage('deploy_linux64') {
agent {
label 'linux64'
}
steps {
updateGitlabCommitStatus name: 'deploy_linux64', state: 'pending'
updateGitlabCommitStatus name: 'deploy_linux64', state: 'running'
echo "Deploying..."
updateGitlabCommitStatus name: 'deploy_linux64', state: 'success'
}
}
}
}