Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常顺宇
OpenXG-RAN
Commits
f63920dc
Commit
f63920dc
authored
May 15, 2020
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: taking care of the case if R2LAB is not available
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
6a0e50c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
ci-scripts/Jenkinsfile-inria-r2lab
ci-scripts/Jenkinsfile-inria-r2lab
+16
-6
No files found.
ci-scripts/Jenkinsfile-inria-r2lab
View file @
f63920dc
...
...
@@ -62,6 +62,7 @@ def r2labUE0IpAddr = r2labBaseIpAddr + r2labUE0Idx
def
r2labENB1Idx
=
'16'
def
r2labENB1
=
'fit'
+
r2labENB1Idx
def
r2labENB1IpAddr
=
r2labBaseIpAddr
+
r2labENB1Idx
def
r2labDoAllOff
=
true
pipeline
{
agent
{
...
...
@@ -136,15 +137,22 @@ pipeline {
sh
"python3 /home/eurecom/inria-scripts/booking-lease.py --book-lease --from ${BOOK_TIMESTAMP}T${r2labStartTime} --duration ${r2labDuration} --slice inria_oaici ${r2labuser} ${r2labpassword}"
sh
"python3 /home/eurecom/inria-scripts/booking-lease.py --get-leases ${r2labuser} ${r2labpassword} | grep -v nightly"
}
// Adding a tempo after booking leases
sh
"sleep 10"
LEASE_STATUS
=
sh
returnStdout:
true
,
script:
"ssh -t inria_oaici@faraday.inria.fr 'rleases --check'"
LEASE_STATUS
=
LEASE_STATUS
.
trim
()
if
(
LEASE_STATUS
==~
/.*Access currently denied to inria_oaici.*/
)
{
r2labDoAllOff
=
false
currentBuild
.
result
=
'ABORTED'
error
(
'Stopping early because R2LAB not available'
)
}
}
}
}
stage
(
"Load Images"
)
{
steps
{
script
{
// Adding a tempo after booking leases
sh
"sleep 10"
sh
"ssh -t inria_oaici@faraday.inria.fr 'rleases --check'"
sh
"ssh -t inria_oaici@faraday.inria.fr 'all-off'"
sh
"sleep 10"
...
...
@@ -441,9 +449,11 @@ pipeline {
post
{
always
{
script
{
echo
'\u2705 \u001B[32mShutdown every node\u001B[0m'
sh
'ssh -t inria_oaici@faraday.inria.fr "all-off"'
sh
'ssh -t inria_oaici@faraday.inria.fr "all-off"'
if
(
r2labDoAllOff
)
{
echo
'\u2705 \u001B[32mShutdown every node\u001B[0m'
sh
'ssh -t inria_oaici@faraday.inria.fr "all-off"'
sh
'ssh -t inria_oaici@faraday.inria.fr "all-off"'
}
}
}
}
...
...
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