forked from coreos/fedora-coreos-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cci.jenkinsfile
39 lines (33 loc) · 1.04 KB
/
.cci.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
// Documentation: https://github.com/coreos/coreos-ci/blob/master/README-upstream-ci.md
properties([
// abort previous runs when a PR is updated to save resources
disableConcurrentBuilds(abortPrevious: true)
])
node {
checkout scm
stage("Check Groovy") {
// hacky way to convert Jenkinsfiles into a "library" without executing it
shwrap("""
find . -type f -name '*.Jenkinsfile' -exec sed -i -e '1i\\return this' '{}' +
""")
def files = findFiles(glob: '**/*.groovy') + findFiles(glob: '**/*.Jenkinsfile')
def found_error = false
files.each {
try {
println("${it.path}")
load(it.path)
} catch (e) {
found_error = true
}
}
if (found_error) {
error "Syntax errors found"
}
}
stage("Check Manifests") {
// just sanity check all the manifests
shwrap("""
find manifests/ -iname '*.yaml' | xargs -n 1 oc create --dry-run -f
""")
}
}