Merge branch 'develop' of https://gitlab.eurecom.fr/oai/openairinterface5g into NR_F1C_F1U_extensions
This commit is contained in:
@@ -262,6 +262,7 @@ pipeline {
|
||||
echo "This is a MERGE event"
|
||||
addGitLabMRComment comment: message
|
||||
}
|
||||
echo "Pipeline is SUCCESSFUL"
|
||||
}
|
||||
}
|
||||
failure {
|
||||
@@ -271,6 +272,7 @@ pipeline {
|
||||
echo "This is a MERGE event"
|
||||
addGitLabMRComment comment: message
|
||||
}
|
||||
echo "Pipeline FAILED"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,6 +196,7 @@ class Containerize():
|
||||
# the potential merge. Note that merge conflicts should already been checked earlier
|
||||
imageTag = 'develop'
|
||||
sharedTag = 'develop'
|
||||
forceSharedImageBuild = False
|
||||
if (self.ranAllowMerge):
|
||||
imageTag = 'ci-temp'
|
||||
if self.ranTargetBranch == '':
|
||||
@@ -204,6 +205,13 @@ class Containerize():
|
||||
else:
|
||||
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
|
||||
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
|
||||
mySSH.command('git diff HEAD..origin/develop -- docker/Dockerfile.ran' + self.dockerfileprefix + ' | grep -i INDEX', '\$', 5)
|
||||
result = re.search('index', mySSH.getBefore())
|
||||
if result is not None:
|
||||
forceSharedImageBuild = True
|
||||
sharedTag = 'ci-temp'
|
||||
else:
|
||||
forceSharedImageBuild = True
|
||||
|
||||
# if asterix, copy the entitlement and subscription manager configurations
|
||||
if self.host == 'Red Hat':
|
||||
@@ -215,13 +223,14 @@ class Containerize():
|
||||
sharedimage = 'ran-build'
|
||||
# Let's remove any previous run artifacts if still there
|
||||
mySSH.command(self.cli + ' image prune --force', '\$', 30)
|
||||
if (not self.ranAllowMerge):
|
||||
mySSH.command(self.cli + ' image rm ' + sharedimage + ':' + sharedTag, '\$', 30)
|
||||
if forceSharedImageBuild:
|
||||
mySSH.command(self.cli + ' image rm ' + sharedimage + ':' + sharedTag + ' || true', '\$', 30)
|
||||
for image,pattern in imageNames:
|
||||
mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag, '\$', 30)
|
||||
mySSH.command(self.cli + ' image rm ' + image + ':' + imageTag + ' || true', '\$', 30)
|
||||
|
||||
# Build the shared image only on Push Events (not on Merge Requests)
|
||||
if (not self.ranAllowMerge):
|
||||
# On when the shared image docker file is being modified.
|
||||
if forceSharedImageBuild:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user