Avoid minikube profile interference
The "stx" script calls helm without specifying which minikube profile to use, so it ends up using whichever profile was started last. TESTS ============================= * Create 2 different build environments * Make sure "stx-init-env" and "stx control start/stop/status" don't interfere with each other in different environments Closes-Bug: 2006622 Signed-off-by: Davlet Panech <davlet.panech@windriver.com> Change-Id: Ic92d7792f4a1baf374e9e8ce25b88d6aee7d2b62
This commit is contained in:
parent
16dd9d0a78
commit
714bb7cbf6
|
@ -131,7 +131,10 @@ class Config:
|
||||||
|
|
||||||
def _init_kubectl_cmd(self):
|
def _init_kubectl_cmd(self):
|
||||||
# helm
|
# helm
|
||||||
self.helm_cmd = 'helm'
|
if self.use_minikube:
|
||||||
|
self.helm_cmd = f'helm --kube-context {self.minikube_profile}'
|
||||||
|
else:
|
||||||
|
self.helm_cmd = 'helm'
|
||||||
# kubectl
|
# kubectl
|
||||||
if self.use_minikube:
|
if self.use_minikube:
|
||||||
self.kubectl_cmd = f'minikube -p {self.minikube_profile} kubectl --'
|
self.kubectl_cmd = f'minikube -p {self.minikube_profile} kubectl --'
|
||||||
|
|
|
@ -208,7 +208,7 @@ stx-pkgbuilder/configmap/')
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
# Update the dependency charts
|
# Update the dependency charts
|
||||||
cmd = 'helm dependency update ' + self.abs_helmchartdir
|
cmd = self.config.helm() + ' dependency update ' + self.abs_helmchartdir
|
||||||
self.logger.debug('Dependency build command: %s', cmd)
|
self.logger.debug('Dependency build command: %s', cmd)
|
||||||
subprocess.call(cmd, shell=True)
|
subprocess.call(cmd, shell=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue