Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
Bin He
openairinterface5G
Commits
f63920dc
Commit
f63920dc
authored
4 years ago
by
Raphael Defosseux
Browse files
Options
Downloads
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
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ci-scripts/Jenkinsfile-inria-r2lab
+16
-6
16 additions, 6 deletions
ci-scripts/Jenkinsfile-inria-r2lab
with
16 additions
and
6 deletions
ci-scripts/Jenkinsfile-inria-r2lab
+
16
−
6
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"'
}
}
}
}
...
...
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