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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
ad17204e
Commit
ad17204e
authored
Apr 08, 2021
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/docker-no-cache-option' into integration_2021_w14
parents
3b187925
b263ff15
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
ci-scripts/Jenkinsfile-GitLab-Container
ci-scripts/Jenkinsfile-GitLab-Container
+10
-7
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+5
-2
No files found.
ci-scripts/Jenkinsfile-GitLab-Container
View file @
ad17204e
...
...
@@ -27,6 +27,9 @@ def nodeExecutor = params.nodeExecutor
def
doMandatoryTests
=
false
def
doFullTestsuite
=
false
//
def
gitCommitAuthorEmailAddr
pipeline
{
agent
{
label
nodeExecutor
...
...
@@ -177,15 +180,15 @@ pipeline {
post
{
always
{
script
{
def
eSubject
=
JOB_NAME
+
' - Build # '
+
BUILD_ID
+
' - '
+
currentBuild
.
result
+
'!'
def
eBody
=
"Hi,\n\n"
eBody
+=
"Here are attached HTML report files for "
+
JOB_NAME
+
" - Build # "
+
BUILD_ID
+
" - "
+
currentBuild
.
result
+
"!\n\n"
eBody
+=
"Regards,\n"
eBody
+=
"OAI CI Team"
emailext
attachmentsPattern:
'*results*.html'
,
body:
'''Hi,
Here are attached HTML report files for $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!
Regards,
OAI CI Team'''
,
body:
eBody
,
replyTo:
'no-reply@openairinterface.org'
,
subject:
'$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!'
,
subject:
eSubject
,
to:
gitCommitAuthorEmailAddr
if
(
fileExists
(
'.git/CI_COMMIT_MSG'
))
{
...
...
ci-scripts/cls_containerize.py
View file @
ad17204e
...
...
@@ -83,6 +83,7 @@ class Containerize():
self
.
flexranCtrlDeployed
=
False
self
.
flexranCtrlIpAddress
=
''
self
.
cli
=
''
self
.
cliBuildOptions
=
''
self
.
dockerfileprefix
=
''
self
.
host
=
''
self
.
allImagesSize
=
{}
...
...
@@ -124,9 +125,11 @@ class Containerize():
if
self
.
host
==
'Ubuntu'
:
self
.
cli
=
'docker'
self
.
dockerfileprefix
=
'.ubuntu18'
self
.
cliBuildOptions
=
'--no-cache'
elif
self
.
host
==
'Red Hat'
:
self
.
cli
=
'sudo podman'
self
.
dockerfileprefix
=
'.rhel8.2'
self
.
cliBuildOptions
=
'--no-cache --disable-compression'
imageNames
=
[]
result
=
re
.
search
(
'eNB'
,
self
.
imageKind
)
...
...
@@ -201,7 +204,7 @@ class Containerize():
# Build the shared image only on Push Events (not on Merge Requests)
if
(
not
self
.
ranAllowMerge
):
mySSH
.
command
(
self
.
cli
+
' build --target '
+
sharedimage
+
' --tag '
+
sharedimage
+
':'
+
sharedTag
+
' --file docker/Dockerfile.ran'
+
self
.
dockerfileprefix
+
' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1'
,
'\$'
,
1600
)
mySSH
.
command
(
self
.
cli
+
' build
'
+
self
.
cliBuildOptions
+
'
--target '
+
sharedimage
+
' --tag '
+
sharedimage
+
':'
+
sharedTag
+
' --file docker/Dockerfile.ran'
+
self
.
dockerfileprefix
+
' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1'
,
'\$'
,
1600
)
# First verify if the shared image was properly created.
status
=
True
mySSH
.
command
(
self
.
cli
+
' image inspect --format=
\'
Size = {{.Size}} bytes
\'
'
+
sharedimage
+
':'
+
sharedTag
,
'\$'
,
5
)
...
...
@@ -249,7 +252,7 @@ class Containerize():
# the archived Dockerfiles have "ran-build:latest" as base image
# we need to update them with proper tag
mySSH
.
command
(
'sed -i -e "s#'
+
sharedimage
+
':latest#'
+
sharedimage
+
':'
+
sharedTag
+
'#" docker/Dockerfile.'
+
pattern
+
self
.
dockerfileprefix
,
'\$'
,
5
)
mySSH
.
command
(
self
.
cli
+
' build --target '
+
image
+
' --tag '
+
image
+
':'
+
imageTag
+
' --file docker/Dockerfile.'
+
pattern
+
self
.
dockerfileprefix
+
' . > cmake_targets/log/'
+
image
+
'.log 2>&1'
,
'\$'
,
1200
)
mySSH
.
command
(
self
.
cli
+
' build
'
+
self
.
cliBuildOptions
+
'
--target '
+
image
+
' --tag '
+
image
+
':'
+
imageTag
+
' --file docker/Dockerfile.'
+
pattern
+
self
.
dockerfileprefix
+
' . > cmake_targets/log/'
+
image
+
'.log 2>&1'
,
'\$'
,
1200
)
# split the log
mySSH
.
command
(
'mkdir -p cmake_targets/log/'
+
image
,
'\$'
,
5
)
mySSH
.
command
(
'python3 ci-scripts/docker_log_split.py --logfilename=cmake_targets/log/'
+
image
+
'.log'
,
'\$'
,
5
)
...
...
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