stx tool: Create mirrors directory and record the minikube variables
Create the mirror directory before the minikube cluster is created otherwise it will be automatically created with root permission. Log the minikube varibales MINIKUBE_HOME, MINIKUBENAME and STX_BUILD_HOME into minikube_history.log. Story: 2008862 Task: 43862 Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Change-Id: I72c877cc171f49633d8b1802834cf7da48a9e7b5
This commit is contained in:
parent
4d6d519de8
commit
01d2929e49
12
stx-init-env
12
stx-init-env
@ -137,6 +137,12 @@ if [[ ! -d "$STX_BUILD_HOME" ]] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure mirror directory exists. If this directory doesn't exist,
|
||||
# it will be automatically created with root permission.
|
||||
if [[ ! -d "$STX_BUILD_HOME/mirrors/starlingx" ]] ; then
|
||||
mkdir -p $STX_BUILD_HOME/mirrors/starlingx || exit 1
|
||||
fi
|
||||
|
||||
# --nuke: just delete the cluster and exit
|
||||
if [[ $DELETE_MINIKUBE -eq 1 ]] ; then
|
||||
if minikube_exists ; then
|
||||
@ -175,6 +181,12 @@ if [[ $WANT_START_MINIKUBE -eq 1 ]] ; then
|
||||
|| exit 1
|
||||
fi
|
||||
|
||||
# Record the project environment variables
|
||||
echo "The last minikube cluster startup date: `date`" > minikube_history.log
|
||||
echo "MINIKUBE_HOME: $MINIKUBE_HOME" >> minikube_history.log
|
||||
echo "MINIKUBENAME: $MINIKUBENAME" >> minikube_history.log
|
||||
echo "STX_BUILD_HOME: $STX_BUILD_HOME" >> minikube_history.log
|
||||
|
||||
# Import minikube's docker environment
|
||||
eval $(minikube -p $MINIKUBENAME docker-env)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user