-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile.ruby-1.8.hpitug
95 lines (94 loc) · 4.03 KB
/
Jenkinsfile.ruby-1.8.hpitug
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
pipeline {
agent any
stages {
stage('checkout') {
steps {
checkout([$class: 'GitSCM',
branches: [[name: '*/bob']],
extensions: [
[$class: 'CleanBeforeCheckout']],
doGenerateSubmoduleConfigurations: false, extensions: [
[$class: 'CleanCheckout'],
[$class: 'CloneOption', timeout: 60, shallow: true],
[$class: 'CheckoutOption', timeout: 60],
],
userRemoteConfigs: [[url: '/home/git/ruby1.8']]])
}
}
stage('autoconf') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib']) {
sh 'autoconf'
}
}
}
stage('config') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib']) {
sh 'CFLAGS="-c99 -O0" LIBS="-lput" conf_script_floss_cc --disable-shared --with-static-linked-ext'
sh 'sed -i "/HAVE_GETPRIORITY/d" config.h'
}
}
}
stage('build') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib']) {
sh 'make SHELL=/usr/coreutils/bin/bash'
}
}
}
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 || echo "This probably will fail"'
}
}
}
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('install') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib']) {
sh 'make install DESTDIR=${PWD}/install INSTALLED_LIST=instlist'
}
}
}
stage('deploy_src') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib',
'BASENAME=ruby',
'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('deploy') {
steps {
withEnv(['PATH=/usr/coreutils/bin:/usr/local/bin:/usr/bin:/bin:/usr/ucb',
'_RLD_LIB_PATH=:/usr/local/lib',
'BASENAME=ruby',
'DEST=/web/stage']) {
sh 'export INSTALL_LOCATION="${WORKSPACE}/install/usr/local" && export VERSION_PATH="${INSTALL_LOCATION}/bin/ruby" && . ${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: ${env.CHANGE_TITLE}\n More info at: ${env.BUILD_URL}", cc: '', from: '[email protected]', replyTo: '', subject: "[Jenkins HPITUG] ${currentBuild.currentResult}: job ${env.JOB_NAME}", to: '[email protected]'
}
}
}