Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
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
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-SMF
Commits
78b39c24
Commit
78b39c24
authored
Apr 14, 2020
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: fix pipeline in MR case
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
701f1d20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
ci-scripts/Jenkinsfile-GitLab-Docker
ci-scripts/Jenkinsfile-GitLab-Docker
+20
-3
No files found.
ci-scripts/Jenkinsfile-GitLab-Docker
View file @
78b39c24
...
...
@@ -130,7 +130,7 @@ pipeline {
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
// Building a temporary image
myShCmd
(
'docker image prune --force'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker build --target oai-smf --tag oai-smf:ci-temp --file ci-scripts/Dockerfile.private.ubuntu18.04 --build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" --build-arg GITLAB_USERNAME="'
+
git_username
+
'" --build-arg GITLAB_PASSWORD="'
+
git_password
+
'" --build-arg BUILD_FOR_CI="True" --build-arg CI_SRC_BRANCH="'
+
env
.
g
hprbSourceBranch
+
'" --build-arg CI_SRC_COMMIT="'
+
env
.
ghprbActualCommit
+
'" --build-arg CI_DEST_BRANCH="develop
" . > archives/smf_docker_image_build.log 2>&1'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker build --target oai-smf --tag oai-smf:ci-temp --file ci-scripts/Dockerfile.private.ubuntu18.04 --build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" --build-arg GITLAB_USERNAME="'
+
git_username
+
'" --build-arg GITLAB_PASSWORD="'
+
git_password
+
'" --build-arg BUILD_FOR_CI="True" --build-arg CI_SRC_BRANCH="'
+
env
.
g
itlabSourceBranch
+
'" --build-arg CI_SRC_COMMIT="'
+
env
.
gitlabMergeRequestLastCommit
+
'" --build-arg CI_DEST_BRANCH="'
+
env
.
gitlabTargetBranch
+
'
" . > archives/smf_docker_image_build.log 2>&1'
,
new_host_flag
,
new_host_user
,
new_host
)
}
else
{
// Currently this pipeline only runs for pushes to `develop` branch
// First clean image registry
...
...
@@ -213,7 +213,7 @@ pipeline {
// We install a dedicated version (installed on our CI server).
myShCmd
(
'docker cp /opt/clang-format/9.0.0/bin/clang-format ci-cn-clang-formatter:/usr/local/bin'
,
new_host_flag
,
new_host_user
,
new_host
)
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
myShCmd
(
'docker exec -it ci-cn-clang-formatter /bin/bash -c "cd /home && ./ci-scripts/checkCodingFormattingRules.sh --src-branch '
+
env
.
g
hprbSourceBranch
+
' --target-branch '
+
env
.
ghpr
bTargetBranch
+
'"'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker exec -it ci-cn-clang-formatter /bin/bash -c "cd /home && ./ci-scripts/checkCodingFormattingRules.sh --src-branch '
+
env
.
g
itlabSourceBranch
+
' --target-branch '
+
env
.
gitla
bTargetBranch
+
'"'
,
new_host_flag
,
new_host_user
,
new_host
)
}
else
{
myShCmd
(
'docker exec -it ci-cn-clang-formatter /bin/bash -c "cd /home && ./ci-scripts/checkCodingFormattingRules.sh"'
,
new_host_flag
,
new_host_user
,
new_host
)
}
...
...
@@ -242,6 +242,24 @@ pipeline {
}
}
post
{
success
{
script
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
def
message
=
"OAI "
+
JOB_NAME
+
" build ("
+
BUILD_ID
+
"): passed ("
+
BUILD_URL
+
")"
echo
"This is a MERGE event"
addGitLabMRComment
comment:
message
}
}
}
unsuccessful
{
script
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
def
message
=
"OAI "
+
JOB_NAME
+
" build ("
+
BUILD_ID
+
"): failed ("
+
BUILD_URL
+
")"
echo
"This is a MERGE event"
addGitLabMRComment
comment:
message
}
}
}
cleanup
{
script
{
// Removing temporary / intermediate images
...
...
@@ -302,7 +320,6 @@ def copyTo2ndServer(filename, flag, user, host) {
sh
"ssh ${user}@${host} 'cd /tmp/CI-CN-SMF && tar -xjf ${filename}'"
sh
"ssh ${user}@${host} 'mkdir -p /tmp/CI-CN-SMF/archives'"
sh
"ssh ${user}@${host} 'mkdir -p /tmp/CI-CN-SMF/archives/oai-smf-cfg'"
sh
"ssh ${user}@${host} 'mkdir -p /tmp/CI-CN-SMF/archives/oai-mme-cfg'"
}
}
}
...
...
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