Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wenqing
ogs
Commits
2a24099d
Commit
2a24099d
authored
9 years ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
Added Jenkinsfile.
parent
5695c19c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Jenkinsfile
+4
-0
4 additions, 0 deletions
Jenkinsfile
scripts/jenkins/gcc.groovy
+24
-55
24 additions, 55 deletions
scripts/jenkins/gcc.groovy
with
28 additions
and
55 deletions
Jenkinsfile
0 → 100644
+
4
−
0
View file @
2a24099d
node
(
'master'
)
{
checkout
scm
load
'scripts/jenkins/gcc.groovy'
}
This diff is collapsed.
Click to expand it.
scripts/jenkins/gcc.groovy
+
24
−
55
View file @
2a24099d
defaultCMakeOptions
=
'-DOGS_LIB_BOOST=System -DOGS_LIB_VTK=System'
node
(
'docker'
)
node
(
'docker'
)
{
{
// Checks out into subdirectory ogs
stage
'Checkout'
stage
'Checkout'
checkout
([
$class
:
'GitSCM'
,
dir
(
'ogs'
)
{
branches:
[[
name:
'*/master'
]],
checkout
scm
doGenerateSubmoduleConfigurations:
false
,
}
extensions:
[[
$class
:
'RelativeTargetDirectory'
,
relativeTargetDir:
'ogs'
]],
submoduleCfg:
[],
userRemoteConfigs:
[[
url:
'https://github.com/ufz/ogs'
]]])
// Multiple configurations are build in parallel
parallel
linux:
{
docker
.
image
(
'ogs6/gcc-ogs-cli:latest'
).
inside
{
build
'build'
,
''
,
'package'
stage
'Test'
stage
'Build'
sh
'''cd build
docker
.
image
(
'ogs6/gcc-ogs-base:latest'
).
inside
{
make tests'''
build
'build'
,
''
,
'package tests ctest'
}
},
linux_gui:
{
docker
.
image
(
'ogs6/gcc-ogs-gui:latest'
).
inside
{
build
'build_gui'
,
'-DOGS_BUILD_GUI=ON -DOGS_BUILD_TESTS=OFF -DOGS_BUILD_CLI=OFF'
,
'package'
}
}
}
// windows: {
publishTestReports
'build/Testing/**/*.xml'
,
'build/Tests/testrunner.xml'
// docker.image('ogs6/mingw-ogs-gui:latest').inside
// {
// build 'build_win', '-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE', 'package'
//
// stage 'Test'
// sh '''cd build_win
// rm -rf tests/testrunner.xml
// wine bin/testrunner.exe --gtest_output=xml:./tests/testrunner.xml'''
// }
// },
//
// windows_gui: {
// docker.image('ogs6/mingw-ogs-gui:latest').inside
// {
// build 'build_win_gui',
// '-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DOGS_BUILD_GUI=ON -DOGS_BUILD_TESTS=OFF -DOGS_BUILD_CLI=OFF',
// 'package'
// }
// }
// end parallel
// archive 'build*/*.tar.gz'
}
step
([
$class
:
'JUnitResultArchiver'
,
testResults:
'build/tests/testrunner.xml,build_win/tests/testrunner.xml'
])
archive
'build*/*.tar.gz,build_win*/*.zip'
}
// end node
def
build
(
buildDir
,
cmakeOptions
,
target
)
{
def
build
(
buildDir
,
cmakeOptions
,
target
)
{
sh
"rm -rf ${buildDir} && mkdir ${buildDir}"
sh
"rm -rf ${buildDir} && mkdir ${buildDir}"
stage
'Configure'
stage
'Configure'
sh
"cd ${buildDir} && cmake ../ogs ${cmakeOptions}"
sh
"cd ${buildDir} && cmake ../ogs
${defaultCMakeOptions}
${cmakeOptions}"
stage
'Build'
stage
'Build'
sh
"cd ${buildDir} && make -j 2 ${target}"
sh
"cd ${buildDir} && make -j 4 ${target}"
}
def
publishTestReports
(
ctestPattern
,
gtestPattern
)
{
step
([
$class
:
'XUnitPublisher'
,
testTimeMargin:
'3000'
,
thresholdMode:
1
,
thresholds:
[
[
$class
:
'FailedThreshold'
,
failureNewThreshold:
''
,
failureThreshold:
''
,
unstableNewThreshold:
''
,
unstableThreshold:
''
],
[
$class
:
'SkippedThreshold'
,
failureNewThreshold:
''
,
failureThreshold:
''
,
unstableNewThreshold:
''
,
unstableThreshold:
''
]],
tools:
[
[
$class
:
'CTestType'
,
deleteOutputFiles:
true
,
failIfNotNew:
true
,
pattern:
"${ctestPattern}"
,
skipNoTestFiles:
false
,
stopProcessingIfError:
true
],
[
$class
:
'GoogleTestType'
,
deleteOutputFiles:
true
,
failIfNotNew:
true
,
pattern:
"${gtestPattern}"
,
skipNoTestFiles:
false
,
stopProcessingIfError:
true
]]
])
}
}
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