Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
77899668
Commit
77899668
authored
Nov 08, 2018
by
mchrusci
Committed by
Michał Karzyński
Nov 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ONNX CI] ONNX CI fixes (#2024)
parent
29f23128
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
26 deletions
+42
-26
Jenkinsfile
.ci/onnx/jenkins/Jenkinsfile
+29
-13
Jenkinsfile.groovy
.ci/onnx/jenkins/Jenkinsfile.groovy
+7
-2
utils.groovy
.ci/onnx/jenkins/utils/utils.groovy
+6
-11
No files found.
.ci/onnx/jenkins/Jenkinsfile
View file @
77899668
...
...
@@ -24,17 +24,21 @@ DOCKER_CONTAINER_NAME = "jenkins_${PROJECT_NAME}_ci"
NGRAPH_GIT_ADDRESS
=
"https://github.com/NervanaSystems/ngraph.git"
ONNX_GIT_ADDRESS
=
"https://github.com/NervanaSystems/ngraph-onnx.git"
JENKINS_GITHUB_CREDENTIAL_ID
=
"7157091e-bc04-42f0-99fd-dc4da2922a55"
ONNX_BRANCH
=
"$ghprbSourceBranch"
ONNX_BRANCH
=
"$CHANGE_BRANCH"
GIT_PR_AUTHOR_EMAIL
=
""
GIT_COMMIT_AUTHOR_EMAIL
=
""
GIT_COMMIT_HASH
=
""
GIT_COMMIT_SUBJECT
=
""
def
CloneRepository
(
String
jenkins_github_credential_id
,
String
ngraph_git_address
,
String
onnx_git_address
)
{
stage
(
'Clone Repos'
)
{
try
{
sh
"git clone $onnx_git_address -b $
ghprbSourceBranch
."
sh
"git clone $onnx_git_address -b $
CHANGE_BRANCH
."
}
catch
(
Exception
e
)
{
ONNX_BRANCH
=
"master"
sh
"""
echo "WARNING! Failed to clone ngraph-onnx branch $
ghprbSourceBranch
! Falling back to master."
echo "WARNING! Failed to clone ngraph-onnx branch $
CHANGE_BRANCH
! Falling back to master."
echo "EXCEPTION: $e"
"""
checkout
([
$class
:
'GitSCM'
,
...
...
@@ -45,10 +49,14 @@ def CloneRepository(String jenkins_github_credential_id, String ngraph_git_addre
}
dir
(
"ngraph"
)
{
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"$
ghprbSourceBranch
"
]],
branches:
[[
name:
"$
CHANGE_BRANCH
"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[[
$class
:
'CloneOption'
,
timeout:
30
]],
submoduleCfg:
[],
userRemoteConfigs:
[[
credentialsId:
"${jenkins_github_credential_id}"
,
url:
"${ngraph_git_address}"
]]])
GIT_PR_AUTHOR_EMAIL
=
sh
(
script:
'git log -1 --pretty="format:%ae" '
,
returnStdout:
true
).
trim
()
GIT_COMMIT_AUTHOR_EMAIL
=
sh
(
script:
'git log -1 --pretty="format:%ce" '
,
returnStdout:
true
).
trim
()
GIT_COMMIT_HASH
=
sh
(
script:
'git log -1 --pretty="format:%H" '
,
returnStdout:
true
).
trim
()
GIT_COMMIT_SUBJECT
=
sh
(
script:
'git log -1 --pretty="format:%s" '
,
returnStdout:
true
).
trim
()
}
}
}
...
...
@@ -122,20 +130,20 @@ def Notify() {
configurationMaps
.
add
([
"name"
:
"notify"
])
String
notifyPeople
=
"$
ghprbPullAuthorEmail, $ghprbActualCommitAuthorEmail
"
String
notifyPeople
=
"$
GIT_PR_AUTHOR_EMAIL, $GIT_COMMIT_AUTHOR_EMAIL
"
Closure
notifyMethod
=
{
configMap
->
if
(
currentBuild
.
result
==
"FAILURE"
)
{
blue_ocean
=
"https://crackerjack.intel.com/blue/organizations/jenkins/onnx%2Fngraph_onnx_integration_ci/detail/ngraph_onnx_integration_ci/${BUILD_NUMBER}/pipeline"
emailext
(
subject:
"NGraph-Onnx CI: NGraph PR $
ghprbPullId
$currentBuild.result!"
,
subject:
"NGraph-Onnx CI: NGraph PR $
CHANGE_ID
$currentBuild.result!"
,
body:
"""
<table style="width:100%">
<tr><td>Status:</td> <td>${currentBuild.result}</td></tr>
<tr><td>Repository</td> <td>$ghprbGhRepository</td></tr>
<tr><td>Branch:</td> <td>$ghprbSourceBranch</td></tr>
<tr><td>Jenkins Build:</td> <td> <a href=$blue_ocean> ${BUILD_NUMBER} </a> </td></tr>
<tr><td>Pull Request:</td> <td><a href=$ghprbPullLink>$ghprbPullId</a> </td></tr>
<tr><td>Commit SHA:</td> <td>$ghprbActualCommit</td></tr>
<tr><td>Pull Request Title:</td> <td>$CHANGE_TITLE</td></tr>
<tr><td>Pull Request:</td> <td><a href=$CHANGE_URL>$CHANGE_ID</a> </td></tr>
<tr><td>Branch:</td> <td>$CHANGE_BRANCH</td></tr>
<tr><td>Commit Hash:</td> <td>$GIT_COMMIT_SUBJECT</td></tr>
<tr><td>Commit Subject:</td> <td>$GIT_COMMIT_HASH</td></tr>
<tr><td>Jenkins Build:</td> <td> <a href=$RUN_DISPLAY_URL> ${BUILD_NUMBER} </a> </td></tr>
<tr><td>nGraph-ONNX Branch:</td> <td>${ONNX_BRANCH}</td></tr>
</table>
"""
,
...
...
@@ -148,7 +156,7 @@ def Notify() {
def
main
(
String
label
,
String
projectName
,
String
projectRoot
,
String
dockerContainerName
,
String
jenkins_github_credential_id
,
String
ngraph_git_address
,
String
onnx_git_address
)
{
node
(
label
)
{
timeout
(
activity:
true
,
time:
60
)
{
timeout
(
activity:
true
,
time:
15
)
{
WORKDIR
=
"${WORKSPACE}/${BUILD_NUMBER}"
def
configurationMaps
;
try
{
...
...
@@ -166,6 +174,14 @@ def main(String label, String projectName, String projectRoot, String dockerCont
RunToxTests
(
configurationMaps
)
}
}
catch
(
e
)
{
// Set result to ABORTED if exception contains exit code of a process interrupted by SIGTERM
if
(
"$e"
.
contains
(
"143"
))
{
currentBuild
.
result
=
"ABORTED"
}
else
{
currentBuild
.
result
=
"FAILURE"
}
}
finally
{
Cleanup
(
configurationMaps
)
Notify
()
...
...
.ci/onnx/jenkins/Jenkinsfile.groovy
View file @
77899668
...
...
@@ -174,8 +174,13 @@ def main(String label, String projectName, String projectRoot, String dockerCont
RunToxTests
(
configurationMaps
)
}
}
catch
(
hudson
.
AbortException
e
)
{
currentBuild
.
result
=
'ABORTED'
catch
(
e
)
{
// Set result to ABORTED if exception contains exit code of a process interrupted by SIGTERM
if
(
"$e"
.
contains
(
"143"
))
{
currentBuild
.
result
=
"ABORTED"
}
else
{
currentBuild
.
result
=
"FAILURE"
}
}
finally
{
Cleanup
(
configurationMaps
)
...
...
.ci/onnx/jenkins/utils/utils.groovy
View file @
77899668
...
...
@@ -86,10 +86,13 @@ def CreateStage(String stageName, Closure method, configurationMaps) {
try
{
def
prepareEnvMap
=
GenerateMap
(
genericBodyMethod
,
configurationMaps
)
parallel
prepareEnvMap
}
catch
(
hudson
.
AbortException
e
)
{
AbortedException
(
e
)
}
catch
(
e
)
{
Exception
(
e
)
// Set result to ABORTED if exception contains exit code of a process interrupted by SIGTERM
if
(
"$e"
.
contains
(
"143"
))
{
currentBuild
.
result
=
"ABORTED"
}
else
{
currentBuild
.
result
=
"FAILURE"
}
}
}
}
...
...
@@ -136,12 +139,4 @@ def ShowStatusMap() {
echo
"${STAGES_STATUS_MAP}"
}
def
Exception
(
e
)
{
currentBuild
.
result
=
'FAILURE'
}
def
AbortedException
(
e
)
{
currentBuild
.
result
=
'ABORTED'
}
return
this
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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