Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
centreon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
centreon
Commits
75e36a3a
Commit
75e36a3a
authored
Apr 23, 2018
by
Kevin Duret
Browse files
Options
Downloads
Patches
Plain Diff
update jenkinsfile
parent
ccac673a
Branches
limitedBuild
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Jenkinsfile
+15
-143
15 additions, 143 deletions
Jenkinsfile
with
15 additions
and
143 deletions
Jenkinsfile
+
15
−
143
View file @
75e36a3a
stage
(
'Source'
)
{
stage
(
'Source'
)
{
node
{
node
{
sh
'
cd /opt/
centreon
-
build
&& git pull && cd -
'
sh
'
setup_
centreon
_
build
.sh
'
dir
(
'centreon-web'
)
{
dir
(
'centreon-web'
)
{
checkout
scm
checkout
scm
}
}
sh
'
/opt
/centreon-build/jobs/web/3.5/mon-web-source.sh'
sh
'
.
/centreon-build/jobs/web/3.5/mon-web-source.sh'
source
=
readProperties
file:
'source.properties'
source
=
readProperties
file:
'source.properties'
env
.
VERSION
=
"${source.VERSION}"
env
.
VERSION
=
"${source.VERSION}"
env
.
RELEASE
=
"${source.RELEASE}"
env
.
RELEASE
=
"${source.RELEASE}"
...
@@ -12,83 +12,17 @@ stage('Source') {
...
@@ -12,83 +12,17 @@ stage('Source') {
}
}
try
{
try
{
stage
(
'Unit tests'
)
{
parallel
'centos6'
:
{
node
{
sh
'cd /opt/centreon-build && git pull && cd -'
sh
'/opt/centreon-build/jobs/web/3.5/mon-web-unittest.sh centos6'
step
([
$class
:
'XUnitBuilder'
,
thresholds:
[
[
$class
:
'FailedThreshold'
,
failureThreshold:
'0'
],
[
$class
:
'SkippedThreshold'
,
failureThreshold:
'0'
]
],
tools:
[[
$class
:
'PHPUnitJunitHudsonTestType'
,
pattern:
'ut.xml'
]]
])
}
},
'centos7'
:
{
node
{
sh
'cd /opt/centreon-build && git pull && cd -'
sh
'/opt/centreon-build/jobs/web/3.5/mon-web-unittest.sh centos7'
step
([
$class
:
'XUnitBuilder'
,
thresholds:
[
[
$class
:
'FailedThreshold'
,
failureThreshold:
'0'
],
[
$class
:
'SkippedThreshold'
,
failureThreshold:
'0'
]
],
tools:
[[
$class
:
'PHPUnitJunitHudsonTestType'
,
pattern:
'ut.xml'
]]
])
step
([
$class
:
'CloverPublisher'
,
cloverReportDir:
'.'
,
cloverReportFileName:
'coverage.xml'
])
step
([
$class
:
'hudson.plugins.checkstyle.CheckStylePublisher'
,
pattern:
'codestyle.xml'
,
usePreviousBuildAsReference:
true
,
useDeltaValues:
true
,
failedNewAll:
'0'
])
}
},
'debian9'
:
{
node
{
sh
'cd /opt/centreon-build && git pull && cd -'
sh
'/opt/centreon-build/jobs/web/3.5/mon-web-unittest.sh debian9'
step
([
$class
:
'XUnitBuilder'
,
thresholds:
[
[
$class
:
'FailedThreshold'
,
failureThreshold:
'0'
],
[
$class
:
'SkippedThreshold'
,
failureThreshold:
'0'
]
],
tools:
[[
$class
:
'PHPUnitJunitHudsonTestType'
,
pattern:
'ut.xml'
]]
])
}
}
if
((
currentBuild
.
result
?:
'SUCCESS'
)
!=
'SUCCESS'
)
{
error
(
'Unit tests stage failure.'
);
}
}
stage
(
'Package'
)
{
stage
(
'Package'
)
{
parallel
'centos6'
:
{
parallel
'centos6'
:
{
node
{
node
{
sh
'
cd /opt/
centreon
-
build
&& git pull && cd -
'
sh
'
setup_
centreon
_
build
.sh
'
sh
'
/opt
/centreon-build/jobs/web/3.5/mon-web-package.sh centos6'
sh
'
.
/centreon-build/jobs/web/3.5/mon-web-package.sh centos6'
}
}
},
},
'centos7'
:
{
'centos7'
:
{
node
{
node
{
sh
'cd /opt/centreon-build && git pull && cd -'
sh
'setup_centreon_build.sh'
sh
'/opt/centreon-build/jobs/web/3.5/mon-web-package.sh centos7'
sh
'./centreon-build/jobs/web/3.5/mon-web-package.sh centos7'
}
},
'debian9'
:
{
node
{
sh
'cd /opt/centreon-build && git pull && cd -'
sh
'/opt/centreon-build/jobs/web/3.5/mon-web-package.sh debian9'
}
}
}
}
if
((
currentBuild
.
result
?:
'SUCCESS'
)
!=
'SUCCESS'
)
{
if
((
currentBuild
.
result
?:
'SUCCESS'
)
!=
'SUCCESS'
)
{
...
@@ -99,14 +33,14 @@ try {
...
@@ -99,14 +33,14 @@ try {
stage
(
'Bundle'
)
{
stage
(
'Bundle'
)
{
parallel
'centos6'
:
{
parallel
'centos6'
:
{
node
{
node
{
sh
'
cd /opt/
centreon
-
build
&& git pull && cd -
'
sh
'
setup_
centreon
_
build
.sh
'
sh
'
/opt
/centreon-build/jobs/web/3.5/mon-web-bundle.sh centos6'
sh
'
.
/centreon-build/jobs/web/3.5/mon-web-bundle.sh centos6'
}
}
},
},
'centos7'
:
{
'centos7'
:
{
node
{
node
{
sh
'
cd /opt/
centreon
-
build
&& git pull && cd -
'
sh
'
setup_
centreon
_
build
.sh
'
sh
'
/opt
/centreon-build/jobs/web/3.5/mon-web-bundle.sh centos7'
sh
'
.
/centreon-build/jobs/web/3.5/mon-web-bundle.sh centos7'
}
}
}
}
if
((
currentBuild
.
result
?:
'SUCCESS'
)
!=
'SUCCESS'
)
{
if
((
currentBuild
.
result
?:
'SUCCESS'
)
!=
'SUCCESS'
)
{
...
@@ -117,8 +51,8 @@ try {
...
@@ -117,8 +51,8 @@ try {
stage
(
'Critical tests'
)
{
stage
(
'Critical tests'
)
{
parallel
'centos6'
:
{
parallel
'centos6'
:
{
node
{
node
{
sh
'
cd /opt/
centreon
-
build
&& git pull && cd -
'
sh
'
setup_
centreon
_
build
.sh
'
sh
'
/opt
/centreon-build/jobs/web/3.5/mon-web-acceptance.sh centos6 @critical'
sh
'
.
/centreon-build/jobs/web/3.5/mon-web-acceptance.sh centos6 @critical'
step
([
step
([
$class
:
'XUnitBuilder'
,
$class
:
'XUnitBuilder'
,
thresholds:
[
thresholds:
[
...
@@ -132,8 +66,8 @@ try {
...
@@ -132,8 +66,8 @@ try {
},
},
'centos7'
:
{
'centos7'
:
{
node
{
node
{
sh
'
cd /opt/
centreon
-
build
&& git pull && cd -
'
sh
'
setup_
centreon
_
build
.sh
'
sh
'
/opt
/centreon-build/jobs/web/3.5/mon-web-acceptance.sh centos7 @critical'
sh
'
.
/centreon-build/jobs/web/3.5/mon-web-acceptance.sh centos7 @critical'
step
([
step
([
$class
:
'XUnitBuilder'
,
$class
:
'XUnitBuilder'
,
thresholds:
[
thresholds:
[
...
@@ -149,68 +83,6 @@ try {
...
@@ -149,68 +83,6 @@ try {
error
(
'Critical tests stage failure.'
);
error
(
'Critical tests stage failure.'
);
}
}
}
}
if
(
env
.
BRANCH_NAME
==
'master'
)
{
stage
(
'Acceptance tests'
)
{
parallel
'centos6'
:
{
node
{
sh
'cd /opt/centreon-build && git pull && cd -'
sh
'/opt/centreon-build/jobs/web/3.5/mon-web-acceptance.sh centos6 ~@critical'
step
([
$class
:
'XUnitBuilder'
,
thresholds:
[
[
$class
:
'FailedThreshold'
,
failureThreshold:
'0'
],
[
$class
:
'SkippedThreshold'
,
failureThreshold:
'0'
]
],
tools:
[[
$class
:
'JUnitType'
,
pattern:
'xunit-reports/**/*.xml'
]]
])
archiveArtifacts
allowEmptyArchive:
true
,
artifacts:
'acceptance-logs/*.txt, acceptance-logs/*.png'
}
},
'centos7'
:
{
node
{
sh
'cd /opt/centreon-build && git pull && cd -'
sh
'/opt/centreon-build/jobs/web/3.5/mon-web-acceptance.sh centos7 ~@critical'
step
([
$class
:
'XUnitBuilder'
,
thresholds:
[
[
$class
:
'FailedThreshold'
,
failureThreshold:
'0'
],
[
$class
:
'SkippedThreshold'
,
failureThreshold:
'0'
]
],
tools:
[[
$class
:
'JUnitType'
,
pattern:
'xunit-reports/**/*.xml'
]]
])
archiveArtifacts
allowEmptyArchive:
true
,
artifacts:
'acceptance-logs/*.txt, acceptance-logs/*.png'
}
}
if
((
currentBuild
.
result
?:
'SUCCESS'
)
!=
'SUCCESS'
)
{
error
(
'Critical tests stage failure.'
);
}
}
stage
(
'Delivery'
)
{
node
{
sh
'cd /opt/centreon-build && git pull && cd -'
sh
'/opt/centreon-build/jobs/web/3.5/mon-web-delivery.sh'
}
if
((
currentBuild
.
result
?:
'SUCCESS'
)
!=
'SUCCESS'
)
{
error
(
'Delivery stage failure.'
);
}
}
build
job:
'centreon-license-manager/master'
,
wait:
false
build
job:
'centreon-poller-display/master'
,
wait:
false
build
job:
'centreon-pp-manager/master'
,
wait:
false
build
job:
'centreon-bam/master'
,
wait:
false
build
job:
'des-mbi-bundle-centos6'
,
wait:
false
build
job:
'des-mbi-bundle-centos7'
,
wait:
false
}
}
catch
(
e
)
{
}
catch
(
e
)
{
if
(
env
.
BRANCH_NAME
==
'master'
&&
!(
$
{
e
}
=~
/^.+FlowInterruptedException\$/
))
{
slackSend
channel:
"#monitoring-metrology"
,
color:
"#F30031"
,
message:
"*FAILURE*: `CENTREON WEB` <${env.BUILD_URL}|build #${env.BUILD_NUMBER}> on branch ${env.BRANCH_NAME}\n"
+
"*COMMIT*: <https://github.com/centreon/centreon/commit/${source.COMMIT}|here> by ${source.COMMITTER}\n"
+
"*INFO*: ${e}"
}
currentBuild
.
result
=
'FAILURE'
currentBuild
.
result
=
'FAILURE'
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment