Commit e154bc48 authored by Faizan Azim's avatar Faizan Azim 🤓

wip: branch not selected fix

parent 23d70cd4
DB_URI=sqlite:///./ilens_versions.db DB_URI=sqlite:///./ilens_versions.db
CONFIG_MAP_VARIABLES=MONGO_URI CONFIG_MAP_VARIABLES=MONGO_URI
HELM_REPO = https://gitlab-pm.knowledgelens.com/KnowledgeLens/Products/iLens-2.0/core/devops/helm-charts # HELM_REPO = https://gitlab-pm.knowledgelens.com/KnowledgeLens/Products/iLens-2.0/core/devops/helm-charts
HELM_REPO = https://gitlab-pm.knowledgelens.com/Harshavardhan.C/helm-charts
GIT_USERNAME = harshavardhan.c GIT_USERNAME = harshavardhan.c
GIT_TOKEN = FEMA6PnP63fJCs6DrtZJ GIT_TOKEN = FEMA6PnP63fJCs6DrtZJ
GLOBAL_VARIABLES_FILE=ilens-global-configmap.yml GLOBAL_VARIABLES_FILE=ilens-global-configmap.yml
...@@ -85,6 +85,8 @@ def push_helm_deployments(repo_link: str, private_token: str, branch: str, final ...@@ -85,6 +85,8 @@ def push_helm_deployments(repo_link: str, private_token: str, branch: str, final
pl = pl[0] pl = pl[0]
commit_actions = [] commit_actions = []
files_list = os.listdir(final_helm_path) files_list = os.listdir(final_helm_path)
branches = pl.branches.list()
if not files_list: if not files_list:
logging.debug('Files not found for pushing to git.') logging.debug('Files not found for pushing to git.')
for file in files_list: for file in files_list:
...@@ -211,7 +213,7 @@ if __name__ == '__main__': ...@@ -211,7 +213,7 @@ if __name__ == '__main__':
if k.lower() in {'port', 'service_port', 'module_port'} and v.get("value"): if k.lower() in {'port', 'service_port', 'module_port'} and v.get("value"):
global_config_vars["SERVICE_PORT"] = v['value'] global_config_vars["SERVICE_PORT"] = v['value']
continue continue
if "valueFrom" in existing_env_variables.get(k): if "valueFrom" in existing_env_variables.get(k, []):
existing_data['deployment']['environmentVar'].append(existing_env_variables[k]) existing_data['deployment']['environmentVar'].append(existing_env_variables[k])
else: else:
existing_data['deployment']['environmentVar'].append(v) existing_data['deployment']['environmentVar'].append(v)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment