-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathJenkinsfile
87 lines (87 loc) · 3.4 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
pipeline {
agent {
dockerfile {
label 'docker'
additionalBuildArgs '--build-arg K_COMMIT=$(cd ext/k && git tag --points-at HEAD | cut --characters=2-) --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g)'
}
}
options { ansiColor('xterm') }
environment {
GITHUB_TOKEN = credentials('rv-jenkins-access-token')
LONG_REV = """${sh(returnStdout: true, script: 'git rev-parse HEAD').trim()}"""
}
stages {
stage('Init title') {
when { changeRequest() }
steps { script { currentBuild.displayName = "PR ${env.CHANGE_ID}: ${env.CHANGE_TITLE}" } }
}
stage('Build') {
parallel {
stage('K') { steps { sh 'make build-k -j8 RELEASE=true' } }
}
}
stage('Test') {
options { timeout(time: 15, unit: 'MINUTES') }
parallel {
stage('Unit') { steps { sh 'make test-unit -j8' } }
stage('Symbolic') { steps { sh 'make test-symbolic -j2' } }
stage('Prove') { steps { sh 'make test-prove -j2' } }
stage('Tezos-Utils') { steps { sh 'make test-cfg -j8' } }
}
}
stage('Integration Proofs') {
options { timeout(time: 180, unit: 'MINUTES') }
stages {
stage('Audit Proofs') { steps { sh 'make dexter-prove lqt-prove lb-prove -j4' } }
}
}
stage('Cross Test') {
stages {
stage('Build Tezos') { steps { sh 'make deps-tezos' } }
stage('Build Compat') { steps { sh 'make build-compat -j8 RELEASE=true' } }
stage('Cross-Validation') { steps { sh 'make test-cross -j8' } }
}
}
stage('Deploy') {
when { branch 'master' }
stages {
stage('Update Dependents') {
steps {
build job: 'DevOps/master', propagate: false, wait: false \
, parameters: [ booleanParam ( name: 'UPDATE_DEPS' , value: true ) \
, string ( name: 'UPDATE_DEPS_REPO' , value: 'runtimeverification/michelson-semantics' ) \
, string ( name: 'UPDATE_DEPS_VERSION' , value: "${env.LONG_REV}") \
]
}
}
stage('GitHub Pages') {
steps {
sshagent(['rv-jenkins-github']) {
dir('project-site') {
sh '''
git clone 'ssh://github.com/runtimeverification/michelson-semantics.git'
cd michelson-semantics
git checkout -B gh-pages origin/master
git submodule update --init --recursive -- ./web
cd web
npm install
npm run build
npm run build-sitemap
cd -
mv web/public_content ./
rm -rf $(find . -maxdepth 1 -not -name public_content -a -not -name .git -a -not -path . -a -not -path .. -a -not -name CNAME)
mv public_content/* ./
rm -rf public_content
git add ./
git commit -m 'gh-pages: Updated the website'
git merge --strategy ours origin/gh-pages --allow-unrelated-histories
git push origin gh-pages
'''
}
}
}
}
}
}
}
}