-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
66 lines (59 loc) · 2.04 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
@Library('etn-ipm2-jenkins') _
pipeline {
// This job only does a spell-check so far, needs "aspell" in PATH
// but does no pushing, coverage or other time-consuming tasks
agent {
docker {
label 'docker-dev-1'
image infra.getDockerAgentImage()
args '--oom-score-adj=100 -v /etc/ssh/id_rsa_git-proxy-cache:/etc/ssh/id_rsa_git-proxy-cache:ro -v /etc/ssh/ssh_config:/etc/ssh/ssh_config:ro -v /etc/gitconfig:/etc/gitconfig:ro --security-opt seccomp=unconfined'
}
}
triggers {
pollSCM 'H/5 * * * *'
}
options {
disableConcurrentBuilds()
skipDefaultCheckout()
}
stages {
stage ('git') {
steps {
retry(3) {
checkout([
$class: 'GitSCM',
branches: scm.branches,
extensions: scm.extensions + [
[$class: 'CloneOption', noTags: true],
[$class: 'SubmoduleOption', recursiveSubmodules: true, parentCredentials: true]
],
userRemoteConfigs: scm.userRemoteConfigs
])
}
}
}
stage ('check-json-generation') {
steps {
sh """ make clean check-json """
archiveArtifacts(artifacts: 'latest.json', allowEmptyArchive: false)
}
}
stage ('check-spelling') {
steps {
script {
def ret = sh (returnStatus:true, script:"""
if ( command -v aspell) ; then
make clean spellcheck
else
echo "SKIPPED SPELLCHECK (no tools found)"
exit 42
fi
""")
if (ret == 42) {
unstable "SKIPPED SPELLCHECK"
}
}
}
}
}
}