-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile.openssl-1.0.tcmvns
114 lines (113 loc) · 4.64 KB
/
Jenkinsfile.openssl-1.0.tcmvns
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/* OpenSSL 1.0.2 TNS/X Pipeline */
pipeline {
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '2'))
}
triggers {
pollSCM('H H * * *')
}
stages {
stage('checkout') {
steps {
checkout([$class: 'GitSCM',
branches: [[name: '*/ituglib_release']],
extensions: [
[$class: 'CleanBeforeCheckout']],
doGenerateSubmoduleConfigurations: false, extensions: [
[$class: 'CleanCheckout'],
[$class: 'CloneOption', timeout: 120, shallow: true],
[$class: 'CheckoutOption', timeout: 120],
],
userRemoteConfigs: [[url: 'ssh://[email protected]/home/git/openssl']]])
}
}
stage('config') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib']) {
sh './config --prefix=/usr/local shared'
}
}
}
stage('fix_version') {
steps {
withEnv([]) {
sh 'sh ${WORKSPACE}/../Ituglib_Build/unsetdev.sh Makefile "^VERSION=" -dev'
sh 'sh ${WORKSPACE}/../Ituglib_Build/unsetdev.sh crypto/opensslv.h "OPENSSL_VERSION_TEXT" -dev'
sh 'echo "Should report no -dev entries" && fgrep -R -e "-dev" .'
}
}
}
stage('make_depend') {
steps {
withEnv(['PREFIX=/usr/local',
'PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib']) {
sh 'make depend || echo "makedepend is not support on TNS/X"'
}
}
}
stage('build') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib']) {
sh 'make LDFLAGS=-lrld'
}
}
}
stage('findcall_floss') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib']) {
sh 'findcall_floss'
}
}
}
stage('test') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib']) {
sh 'make test'
}
}
}
stage('deploy_src') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib',
'BASENAME=openssl',
'DEST=/web/stage',
'SRC_EXCLUDES=-not -path "CVS/*" -not -path "*/CVS/*" -not -name CVS -not -name .cvsignore -not -name STATUS -not -name TABLE']) {
sh '. ${WORKSPACE}/../Ituglib_Build/dist.info && bash ${WORKSPACE}/../Ituglib_Build/package.src.std'
}
}
}
stage('install') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib']) {
sh 'make install INSTALL_PREFIX=${WORKSPACE}/install'
}
}
}
stage('deploy') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib',
'BASENAME=openssl',
'DEST=/web/stage']) {
sh 'export INSTALL_LOCATION="${WORKSPACE}/install/usr/local" && export VERSION_PATH="${INSTALL_LOCATION}/usr/local/bin/openssl" && . ${WORKSPACE}/../Ituglib_Build/dist.info.nse && bash ${WORKSPACE}/../Ituglib_Build/package.bin.nomanifest'
}
}
}
}
post {
always {
mail bcc: '', body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\nDuration: ${currentBuild.durationString}\nChange: ${currentBuild.changeSets}\n More info at: ${env.BUILD_URL}", cc: '', from: '[email protected]', replyTo: '', subject: "[Jenkins TCMVNS] ${currentBuild.currentResult}: job ${env.JOB_NAME}", to: '[email protected]'
}
success {
cleanWs()
}
}
}