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
Michael Black
OpenXG-RAN
Commits
3da7dafd
Commit
3da7dafd
authored
Nov 18, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/ci-slack-notifications-transition' into integration_2022_wk46
parents
d0edbd7b
e396af83
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
19 deletions
+29
-19
ci-scripts/Jenkinsfile-GitLab-Container
ci-scripts/Jenkinsfile-GitLab-Container
+14
-0
ci-scripts/Jenkinsfile-gitlab
ci-scripts/Jenkinsfile-gitlab
+0
-18
ci-scripts/Jenkinsfile-push-registry
ci-scripts/Jenkinsfile-push-registry
+15
-1
No files found.
ci-scripts/Jenkinsfile-GitLab-Container
View file @
3da7dafd
...
...
@@ -449,6 +449,10 @@ pipeline {
def
message
=
"OAI "
+
JOB_NAME
+
" build ("
+
BUILD_ID
+
"): passed ("
+
BUILD_URL
+
")"
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
addGitLabMRComment
comment:
message
def
message2
=
message
+
" -- MergeRequest #"
+
env
.
gitlabMergeRequestIid
+
" ("
+
env
.
gitlabMergeRequestTitle
+
")"
sendSocialMediaMessage
(
'ci-enb'
,
'good'
,
message2
)
}
else
{
sendSocialMediaMessage
(
'ci-enb'
,
'good'
,
message
)
}
echo
"Pipeline is SUCCESSFUL"
}
...
...
@@ -458,6 +462,10 @@ pipeline {
def
message
=
"OAI "
+
JOB_NAME
+
" build ("
+
BUILD_ID
+
"): failed ("
+
BUILD_URL
+
")"
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
addGitLabMRComment
comment:
message
def
message2
=
message
+
" -- MergeRequest #"
+
env
.
gitlabMergeRequestIid
+
" ("
+
env
.
gitlabMergeRequestTitle
+
")"
sendSocialMediaMessage
(
'ci-enb'
,
'danger'
,
message2
)
}
else
{
sendSocialMediaMessage
(
'ci-enb'
,
'danger'
,
message
)
}
echo
"Pipeline FAILED"
}
...
...
@@ -541,3 +549,9 @@ def finalizeSlaveJob(jobName) {
}
}
}
// Abstraction function to send social media messages:
// like on Slack or Mattermost
def
sendSocialMediaMessage
(
pipeChannel
,
pipeColor
,
pipeMessage
)
{
slackSend
channel:
pipeChannel
,
color:
pipeColor
,
message:
pipeMessage
}
ci-scripts/Jenkinsfile-gitlab
View file @
3da7dafd
...
...
@@ -20,16 +20,6 @@
* contact@openairinterface.org
*/
// Abstraction function to send social media messages:
// like on Slack or Mattermost
def
sendSocialMediaMessage
(
pipeChannel
,
pipeColor
,
pipeMessage
)
{
if
(
params
.
pipelineUsesSlack
!=
null
)
{
if
(
params
.
pipelineUsesSlack
)
{
slackSend
channel:
pipeChannel
,
color:
pipeColor
,
message:
pipeMessage
}
}
}
// Location of the executor node
def
nodeExecutor
=
params
.
nodeExecutor
...
...
@@ -389,10 +379,6 @@ OAI CI Team''',
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
echo
"This is a MERGE event"
addGitLabMRComment
comment:
message
def
message2
=
"OAI "
+
JOB_NAME
+
" build ("
+
BUILD_ID
+
"): passed ("
+
BUILD_URL
+
") -- MergeRequest #"
+
env
.
gitlabMergeRequestIid
+
" ("
+
env
.
gitlabMergeRequestTitle
+
")"
sendSocialMediaMessage
(
'ci-enb'
,
'good'
,
message2
)
}
else
{
sendSocialMediaMessage
(
'ci-enb'
,
'good'
,
message
)
}
}
}
...
...
@@ -402,10 +388,6 @@ OAI CI Team''',
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
echo
"This is a MERGE event"
addGitLabMRComment
comment:
message
def
message2
=
"OAI "
+
JOB_NAME
+
" build ("
+
BUILD_ID
+
"): failed ("
+
BUILD_URL
+
") -- MergeRequest #"
+
env
.
gitlabMergeRequestIid
+
" ("
+
env
.
gitlabMergeRequestTitle
+
")"
sendSocialMediaMessage
(
'ci-enb'
,
'danger'
,
message2
)
}
else
{
sendSocialMediaMessage
(
'ci-enb'
,
'danger'
,
message
)
}
}
}
...
...
ci-scripts/Jenkinsfile-push-registry
View file @
3da7dafd
...
...
@@ -65,13 +65,20 @@ pipeline {
WEEK_REF
=
WEEK_REF
.
trim
()
WEEK_TAG
=
sh
returnStdout:
true
,
script:
'python3 ./ci-scripts/provideUniqueImageTag.py --start_tag '
+
WEEK_REF
WEEK_TAG
=
WEEK_TAG
.
trim
()
if
((
params
.
forceTag
!=
null
)
&&
(
params
.
tagToUse
!=
null
))
{
if
(
params
.
forceTag
)
{
WEEK_TAG
=
params
.
tagToUse
echo
"Forced Tag is ${WEEK_TAG}"
}
}
WEEK_SHA
=
sh
returnStdout:
true
,
script:
'git log -n1 --pretty=format:"%h" origin/develop | cut -c 1-8'
WEEK_SHA
=
WEEK_SHA
.
trim
()
withCredentials
([
[
$class
:
'UsernamePasswordMultiBinding'
,
credentialsId:
"${params.DH_Credentials}"
,
usernameVariable:
'DH_Username'
,
passwordVariable:
'DH_Password'
]
])
{
def
listOfImages
=
[
"oai-enb"
,
"oai-gnb"
,
"oai-lte-ue"
,
"oai-nr-ue"
,
"proxy"
]
def
listOfImages
=
[
"oai-enb"
,
"oai-gnb"
,
"oai-lte-ue"
,
"oai-nr-ue"
]
// Logging in on both registries
sh
"docker login -u ${DH_Username} -p ${DH_Password} > /dev/null 2>&1"
sh
"docker login -u oaicicd -p oaicicd porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1"
listOfImages
.
eachWithIndex
{
item
,
iindex
->
...
...
@@ -82,6 +89,13 @@ pipeline {
sh
"docker push --quiet ${DH_Account}/${item}:develop"
sh
"docker rmi ${DH_Account}/${item}:${WEEK_TAG} ${DH_Account}/${item}:develop porcepix.sboai.cs.eurecom.fr/${item}:develop-${WEEK_SHA}"
}
// Proxy is not following the same pattern.
sh
"docker image tag proxy:develop ${DH_Account}/proxy:develop"
sh
"docker image tag proxy:develop ${DH_Account}/proxy:${WEEK_TAG}"
sh
"docker push --quiet ${DH_Account}/proxy:develop"
sh
"docker push --quiet ${DH_Account}/proxy:${WEEK_TAG}"
sh
"docker rmi ${DH_Account}/proxy:develop ${DH_Account}/proxy:${WEEK_TAG}"
// Logging out on both registries
sh
"docker logout porcepix.sboai.cs.eurecom.fr > /dev/null 2>&1"
sh
"docker logout > /dev/null 2>&1"
}
...
...
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