Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
18287ee0
Commit
18287ee0
authored
Mar 01, 2017
by
Peter van 't Hof
Browse files
Adding a timeout to testing
parent
dbbe4fba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Jenkinsfile
View file @
18287ee0
node
(
'local'
)
{
try
{
timeout
(
45
)
{
node
(
'local'
)
{
try
{
stage
(
'Init'
)
{
tool
'JDK 8u102'
tool
'Apache Maven 3.3.9'
}
stage
(
'Init'
)
{
tool
'JDK 8u102'
tool
'Apache Maven 3.3.9'
}
stage
(
'Checkout'
)
{
checkout
scm
sh
'git submodule update --init --recursive'
}
stage
(
'Checkout'
)
{
checkout
scm
sh
'git submodule update --init --recursive'
}
stage
(
'Build and Test'
)
{
withMaven
(
maven:
'Apache Maven 3.3.9'
,
jdk:
'JDK 8u102'
)
{
sh
'mvn -B -T 2 -Dmaven.test.failure.ignore clean package'
stage
(
'Build and Test'
)
{
withMaven
(
maven:
'Apache Maven 3.3.9'
,
jdk:
'JDK 8u102'
)
{
sh
'mvn -B -T 2 -Dmaven.test.failure.ignore clean package'
}
}
}
stage
(
'Report Tests'
)
{
junit
'*/target/surefire-reports/*.xml'
}
stage
(
'Report Tests'
)
{
junit
'*/target/surefire-reports/*.xml'
}
stage
(
'Check Documentation'
)
{
sh
'mkdocs build --clean --strict'
}
stage
(
'Check Documentation'
)
{
sh
'mkdocs build --clean --strict'
}
if
(
currentBuild
.
result
==
null
||
"SUCCESS"
.
equals
(
currentBuild
.
result
))
{
currentBuild
.
result
=
"SUCCESS"
slackSend
(
color:
'#00FF00'
,
message:
"${currentBuild.result}: Job '${env.JOB_NAME} #${env.BUILD_NUMBER}' (<${env.BUILD_URL}|Open>)"
,
channel:
'#biopet-bot'
,
teamDomain:
'lumc'
,
tokenCredentialId:
'lumc'
)
}
else
{
slackSend
(
color:
'#FFFF00'
,
message:
"${currentBuild.result}: Job '${env.JOB_NAME} #${env.BUILD_NUMBER}' (<${env.BUILD_URL}|Open>)"
,
channel:
'#biopet-bot'
,
teamDomain:
'lumc'
,
tokenCredentialId:
'lumc'
)
}
if
(
currentBuild
.
result
==
null
||
"SUCCESS"
.
equals
(
currentBuild
.
result
))
{
currentBuild
.
result
=
"SUCCESS"
slackSend
(
color:
'#00FF00'
,
message:
"${currentBuild.result}: Job '${env.JOB_NAME} #${env.BUILD_NUMBER}' (<${env.BUILD_URL}|Open>)"
,
channel:
'#biopet-bot'
,
teamDomain:
'lumc'
,
tokenCredentialId:
'lumc'
)
}
else
{
slackSend
(
color:
'#FFFF00'
,
message:
"${currentBuild.result}: Job '${env.JOB_NAME} #${env.BUILD_NUMBER}' (<${env.BUILD_URL}|Open>)"
,
channel:
'#biopet-bot'
,
teamDomain:
'lumc'
,
tokenCredentialId:
'lumc'
)
}
}
catch
(
e
)
{
if
(
currentBuild
.
result
==
null
||
"FAILED"
.
equals
(
currentBuild
.
result
))
{
currentBuild
.
result
=
"FAILED"
}
slackSend
(
color:
'#FF0000'
,
message:
"${currentBuild.result}: Job '${env.JOB_NAME} #${env.BUILD_NUMBER}' (<${env.BUILD_URL}|Open>)"
,
channel:
'#biopet-bot'
,
teamDomain:
'lumc'
,
tokenCredentialId:
'lumc'
)
}
catch
(
e
)
{
if
(
currentBuild
.
result
==
null
||
"FAILED"
.
equals
(
currentBuild
.
result
))
{
currentBuild
.
result
=
"FAILED"
}
slackSend
(
color:
'#FF0000'
,
message:
"${currentBuild.result}: Job '${env.JOB_NAME} #${env.BUILD_NUMBER}' (<${env.BUILD_URL}|Open>)"
,
channel:
'#biopet-bot'
,
teamDomain:
'lumc'
,
tokenCredentialId:
'lumc'
)
throw
e
throw
e
}
}
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment