forked from hyperledger-iroha/iroha-python
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
81 lines (81 loc) · 2.16 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
pipeline {
environment {
DOCKER_NETWORK = ''
IROHA_VERSION = 'latest'
}
options {
skipDefaultCheckout()
buildDiscarder(logRotator(numToKeepStr: '20'))
timestamps()
}
agent any
stages {
stage ('Stop same job builds') {
agent { label 'master' }
steps {
script {
def scmVars = checkout scm
// need this for develop->master PR cases
// CHANGE_BRANCH is not defined if this is a branch build
try {
scmVars.CHANGE_BRANCH_LOCAL = scmVars.CHANGE_BRANCH
}
catch(MissingPropertyException e) { }
if (scmVars.GIT_LOCAL_BRANCH != "develop" && scmVars.CHANGE_BRANCH_LOCAL != "develop") {
def builds = load ".jenkinsci/cancel-builds-same-job.groovy"
builds.cancelSameJobBuilds()
}
}
}
}
stage('Linux') {
agent { label 'd3-build-agent||docker-build-agent' }
stages {
stage('Prepare') {
steps {
script {
iC = docker.image('hyperledger/iroha:develop-build')
iC.inside("") {
scmVars = checkout scm
sh(script: "./scripts/download-schema.py")
sh(script: "./scripts/compile-proto.py")
}
}
}
}
stage('Build wheels') {
steps {
script {
def wheels = load ".jenkinsci/linux-build-wheels.groovy"
wheels.doPythonWheels()
}
}
}
stage('Tests') {
steps {
script {
def wheels = load ".jenkinsci/linux-build-wheels.groovy"
wheels.testWheels()
}
}
}
stage('Publish wheels') {
steps {
script {
def wheels = load ".jenkinsci/linux-build-wheels.groovy"
archiveArtifacts artifacts: 'wheelhouse/iroha*.whl', allowEmptyArchive: true
if (currentBuild.currentResult == "SUCCESS") {
wheels.publishWheels()
}
}
}
}
}
}
}
post {
cleanup {
cleanWs()
}
}
}