-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
69 lines (64 loc) · 2.21 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
// -*- mode: groovy; fill-column: 120; groovy-indent-offset: 4; -*-
def isReview() {
return env.JOB_NAME == "aql-examples-review-pipeline"
}
pipeline {
environment {
GERRIT_CREDENTIALS_ID="srv-jenkins-io"
}
agent {
kubernetes {
inheritFrom 'page-size-jenkins-agent'
yaml '''
spec:
containers:
- name: artools
image: docker.corp.arista.io/artools-eos-trunk-x86_64_el7:latest
command: ["cat"]
tty: true
'''
}
}
stages {
stage('checks') {
environment {
// Explicitly set HOME, cause some containers don't have one.
// This specific value is used so that we have the same HOME in all stages,
// regardless of the container.
// This is needed so that git config --global for the safe dirs can be applied
// once and stay set forever.
HOME= "${WORKSPACE}"
}
stages {
stage ('aql syntaxcheck') {
steps {
container('artools') {
dir("${WORKSPACE}") {
sh "PATH=${env.PATH} a4 scp arastra@distcvp:/dist/storage/aql/latest/aql-v* /tmp/aql"
sh "AQLBIN=/tmp/aql ./aqlcheck.sh"
}
}
}
}
}
}
stage('Build and Publish Documentation') {
steps {
container('artools') {
dir("${WORKSPACE}") {
sh "pip install -r requirements.txt"
sh "sphinx-build docsrc _build"
publishHTML (target: [
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: '_build',
reportFiles: 'index.html',
reportName: 'Documentation'
])
}
}
}
}
}
}