CI: Provide possibility to pass in flexricTag

This commit is contained in:
Raphael Defosseux
2024-11-22 08:23:48 +01:00
committed by Robert Schmidt
parent df9aec167e
commit 3e51fcdf33
3 changed files with 20 additions and 7 deletions
+5 -3
View File
@@ -176,10 +176,10 @@ def ExistEnvFilePrint(ssh, wd, prompt='env vars in existing'):
logging.info(f'{prompt} {wd}/.env: {env_vars}')
return True
def WriteEnvFile(ssh, services, wd, tag):
def WriteEnvFile(ssh, services, wd, tag, flexric_tag):
ret = ssh.run(f'cat {wd}/.env', silent=True, reportNonZero=False)
registry = "oai-ci" # pull_images() gives us this registry path
envs = {"REGISTRY":registry, "TAG": tag}
envs = {"REGISTRY":registry, "TAG": tag, "FLEXRIC_TAG": flexric_tag}
if ret.returncode == 0: # it exists, we have to update
# transforms env file to dictionary
old_envs = {}
@@ -340,6 +340,8 @@ class Containerize():
#checkers from xml
self.ran_checkers={}
self.flexricTag = ''
#-----------------------------------------------------------
# Container management functions
#-----------------------------------------------------------
@@ -859,7 +861,7 @@ class Containerize():
return False
ExistEnvFilePrint(ssh, wd)
WriteEnvFile(ssh, services, wd, self.deploymentTag)
WriteEnvFile(ssh, services, wd, self.deploymentTag, self.flexricTag)
logging.info(f"will start services {services}")
status = ssh.run(f'docker compose -f {wd}/docker-compose.y*ml up -d -- {services}')