Zhixiong Chi 8bcee26f1a stx tool: control: Add the support of control module
Implement the stx control module so that the developer could
manage the four containers with the 'stx control xxx' command.
Containers: (stx-builder|stx-pkgbuilder|stx-lat-tool|stx-repomgr)

Now we assume that we have a minikube env to be ready for this
module, we can use it directly. For the minikube env installation
we can build it with the stx-init-env script later.

Now support the action: [status|start|stop|enter|upgrade]

stx control status:  Check status of the containers
stx control start:   Boot the containers up
stx control stop:    Shutdown the containers
stx control enter:   Login the container(default builder)
stx control upgrade: Upgrade the containers

This module will be used after the developer have a minikube env,

Please refer to the more help information with the command
'stx control --help'

Story: 2008862
Task: 42514

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Change-Id: I0c25e0f784671e90c56d5d367b12a27c3f3fa7cf
2021-09-15 21:35:47 -04:00

55 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
git config --global user.name "$GITUSER"
git config --global user.email "$GITEMAIL"
git config --global color.ui false
cd $MY_REPO_ROOT_DIR
if [[ x"$PROXY" == x"true" ]]; then
ps aux|grep ssh|grep qTfnN 2>&1>/dev/null
ret=$?
if [[ x"$ret" != x"0" ]];then
echo "*************************************************************************************"
echo "Note: Next we will create the proxy and connect the proxyserver $PROXYSERVER!!!"
echo ""
echo ""
echo "*************************************************************************************"
ssh -D 8080 -qTfnN $HOSTUSERNAME@$PROXYSERVER
fi
proxychains repo init -u git://lxgit.wrs.com/stx-debian/manifest.git
proxychains repo sync
else
repo init -u git://lxgit.wrs.com/stx-debian/manifest.git
repo sync
fi
sudo apt-get update
if [[ x"$CENGNURL" != x"" ]]; then
repo_manage.py mirror --url $CENGNURL
fi
if [[ x"$SOURCESLIST" != x"" ]]; then
if [[ x"$DEBLIST" == x"" ]]; then
if [[ x"$DSCLIST" == x"" ]]; then
echo "Either deblist or dsclist must not NULL!!!!"
return 1
else
repo_manage.py download --sources_list=$SOURCESLIST --dsc_list=$DSCLIST
fi
else
if [[ x"$DSCLIST" == x"" ]]; then
repo_manage.py download --sources_list=$SOURCESLIST --deb_list=$DEBLIST
else
repo_manage.py download --sources_list=$SOURCESLIST --deb_list=$DEBLIST --dsc_list=$DSCLIST
fi
fi
fi
touch /home/$MYUNAME/prepare-build.done
echo "************************************************************************************************"
echo "Prepare Done!"
echo "************************************************************************************************"