Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
a3e00c44
Unverified
Commit
a3e00c44
authored
Sep 16, 2022
by
Rhett Ying
Committed by
GitHub
Sep 16, 2022
Browse files
[CI] refine stage logic (#4565)
* [CI] refine stage logic * refine * refine
parent
795371ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
Jenkinsfile
Jenkinsfile
+11
-10
No files found.
Jenkinsfile
View file @
a3e00c44
...
...
@@ -136,7 +136,7 @@ def is_admin(name) {
pipeline
{
agent
any
triggers
{
issueCommentTrigger
(
'@dgl-bot
.*'
)
issueCommentTrigger
(
'@dgl-bot.*'
)
}
stages
{
// Below 2 stages are to authenticate the change/comment author.
...
...
@@ -157,9 +157,7 @@ pipeline {
def
prOpenTriggerCause
=
currentBuild
.
getBuildCauses
(
'jenkins.branch.BranchEventCause'
)
def
first_run
=
prOpenTriggerCause
&&
env
.
BUILD_ID
==
'1'
if
(
author
&&
!
is_authorized
(
author
))
{
if
(
first_run
)
{
pullRequest
.
comment
(
"Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment: \n - `@dgl-bot`"
)
}
error
(
"Authentication failed."
)
}
if
(
first_run
)
{
...
...
@@ -201,6 +199,15 @@ pipeline {
checkout
scm
script
{
def
comment
=
env
.
GITHUB_COMMENT
def
command_lists
=
comment
.
split
(
' '
)
if
(
command_lists
.
size
()
==
1
)
{
// CI command, not for regression
return
}
if
(
command_lists
.
size
()
!=
5
)
{
pullRequest
.
comment
(
'Cannot run the regression test due to unknown command'
)
error
(
'Unknown command'
)
}
def
author
=
env
.
GITHUB_COMMENT_AUTHOR
echo
(
"${env.GIT_URL}"
)
echo
(
"${env}"
)
...
...
@@ -212,14 +219,8 @@ pipeline {
userRemoteConfigs:
[[
credentialsId:
'github'
,
url:
'https://github.com/dglai/DGL_scripts.git'
]]])
}
sh
(
'cp benchmark_scripts_repo/benchmark/* benchmarks/scripts/'
)
def
command_lists
=
comment
.
split
(
' '
)
def
instance_type
=
command_lists
[
2
].
replace
(
'.'
,
''
)
if
(
command_lists
.
size
()
!=
5
)
{
pullRequest
.
comment
(
'Cannot run the regression test due to unknown command'
)
error
(
'Unknown command'
)
}
else
{
pullRequest
.
comment
(
"Start the Regression test. View at ${RUN_DISPLAY_URL}"
)
}
def
prNumber
=
env
.
BRANCH_NAME
.
replace
(
'PR-'
,
''
)
dir
(
'benchmarks/scripts'
)
{
sh
(
'python3 -m pip install boto3'
)
...
...
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