Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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-AMF
Commits
8341c820
Commit
8341c820
authored
Sep 22, 2020
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: the FED test run is now a GitLab notification
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
32ad1d24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
ci-scripts/Jenkinsfile-GitLab-Docker
ci-scripts/Jenkinsfile-GitLab-Docker
+18
-14
No files found.
ci-scripts/Jenkinsfile-GitLab-Docker
View file @
8341c820
...
@@ -52,7 +52,8 @@ pipeline {
...
@@ -52,7 +52,8 @@ pipeline {
gitlabBuilds
(
builds:
[
gitlabBuilds
(
builds:
[
"Build AMF Image"
,
"Build AMF Image"
,
"Static Code Analysis"
,
"Static Code Analysis"
,
"Code Formatting Checker"
"Code Formatting Checker"
,
"Test with DsTester"
])
])
}
}
...
@@ -79,6 +80,7 @@ pipeline {
...
@@ -79,6 +80,7 @@ pipeline {
}
else
{
}
else
{
echo
"Node is ${NODE_NAME}"
echo
"Node is ${NODE_NAME}"
}
}
echo
"Git URL is ${GIT_URL}"
}
}
}
}
}
}
...
@@ -90,7 +92,7 @@ pipeline {
...
@@ -90,7 +92,7 @@ pipeline {
gitCommitAuthorEmailAddr
=
env
.
gitlabUserEmail
gitCommitAuthorEmailAddr
=
env
.
gitlabUserEmail
echo
"GitLab Usermail is ${gitCommitAuthorEmailAddr}"
echo
"GitLab Usermail is ${gitCommitAuthorEmailAddr}"
sh
"./ci-scripts/doGitLabMerge.sh --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
sh
"./ci-scripts/doGitLabMerge.sh --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
amf_tag
=
"ci-t
e
mp"
amf_tag
=
"ci-tmp"
amf_branch
=
env
.
gitlabSourceBranch
amf_branch
=
env
.
gitlabSourceBranch
}
else
{
}
else
{
echo
"Git Branch is ${GIT_BRANCH}"
echo
"Git Branch is ${GIT_BRANCH}"
...
@@ -236,18 +238,20 @@ pipeline {
...
@@ -236,18 +238,20 @@ pipeline {
stage
(
'Testing in CN-5G-FED environment'
)
{
stage
(
'Testing in CN-5G-FED environment'
)
{
steps
{
steps
{
script
{
script
{
localStatus
=
build
job:
'CI-OpenAir-CN5G-FED'
,
gitlabCommitStatus
(
name:
"Test with DsTester"
)
{
parameters:
[
localStatus
=
build
job:
'CI-OpenAir-CN5G-FED'
,
string
(
name:
'AMF_TAG'
,
value:
String
.
valueOf
(
amf_tag
)),
parameters:
[
string
(
name:
'AMF_BRANCH'
,
value:
String
.
valueOf
(
amf_branch
))
string
(
name:
'AMF_TAG'
,
value:
String
.
valueOf
(
amf_tag
)),
],
propagate:
false
string
(
name:
'AMF_BRANCH'
,
value:
String
.
valueOf
(
amf_branch
))
localResult
=
localStatus
.
getResult
()
],
propagate:
false
localResult
=
localStatus
.
getResult
()
if
(
localStatus
.
resultIsBetterOrEqualTo
(
'SUCCESS'
))
{
if
(
localStatus
.
resultIsBetterOrEqualTo
(
'SUCCESS'
))
{
echo
"Federation Test Job is OK"
echo
"Federation Test Job is OK"
}
else
{
}
else
{
echo
"Federation Test Job is KO"
echo
"Federation Test Job is KO"
sh
"ci-scripts/fail.sh"
sh
"ci-scripts/fail.sh"
}
}
}
}
}
}
}
...
@@ -286,7 +290,7 @@ pipeline {
...
@@ -286,7 +290,7 @@ pipeline {
// Removing temporary / intermediate images
// Removing temporary / intermediate images
try
{
try
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
myShCmd
(
'docker image rm --force oai-amf:ci-t
e
mp'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker image rm --force oai-amf:ci-tmp'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
echo
"We failed to delete the OAI-AMF temp image"
echo
"We failed to delete the OAI-AMF temp image"
...
...
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