Update dev setup with small improvements
- ripgrep (rg) and rsync can both be invoked from some stx/docs tox targets and utilities. - override the default editor (nano) with vi. In the future this will be driven by a yaml variable - pass in --rebuild when stx-init-env is run. The build containers are not always up to date with the latest code. --rebuild does not seem to work until after the env has been initialized at least once. Story: 2010547 Task: 47211 Signed-off-by: Al Bailey <al.bailey@windriver.com> Change-Id: I1e3b17d57fd537432bc3780759c8a47a2e3b2a5b
This commit is contained in:
parent
5271eca7ed
commit
253a7f1cd6
|
@ -79,10 +79,12 @@ $package_setup = <<PACKAGE_SETUP
|
||||||
# libxslt1-dev (config)
|
# libxslt1-dev (config)
|
||||||
# ostree (update)
|
# ostree (update)
|
||||||
# python3-all-dev (config)
|
# python3-all-dev (config)
|
||||||
|
# ripgrep (docs)
|
||||||
|
# rsync (docs)
|
||||||
# ruby-dev (stx-puppet)
|
# ruby-dev (stx-puppet)
|
||||||
# ruby-rubygems (stx-puppet)
|
# ruby-rubygems (stx-puppet)
|
||||||
# tox (all)
|
# tox (all)
|
||||||
apt-get install -y bc libffi-dev libldap2-dev libsasl2-dev libxml2-dev libxslt1-dev ostree python3-all-dev ruby-rubygems ruby-dev tox
|
apt-get install -y bc libffi-dev libldap2-dev libsasl2-dev libxml2-dev libxslt1-dev ostree python3-all-dev ripgrep rsync ruby-rubygems ruby-dev tox
|
||||||
|
|
||||||
# pip install some additional components that are helpful for development
|
# pip install some additional components that are helpful for development
|
||||||
pip3 install bindep
|
pip3 install bindep
|
||||||
|
@ -164,6 +166,8 @@ $user_setup = <<-'USER_SETUP'
|
||||||
su - ${DEV_USER} -c "mkdir -p ${PATCHES_DIR}"
|
su - ${DEV_USER} -c "mkdir -p ${PATCHES_DIR}"
|
||||||
echo "export PATCHES_DIR=${PATCHES_DIR}" >> ${PROFILE}
|
echo "export PATCHES_DIR=${PATCHES_DIR}" >> ${PROFILE}
|
||||||
|
|
||||||
|
# override default editor (nano)
|
||||||
|
echo "export EDITOR=vi" >> ${PROFILE}
|
||||||
|
|
||||||
# STX_BUILD_HOME is the same as the project workspace
|
# STX_BUILD_HOME is the same as the project workspace
|
||||||
MY_WORKSPACE="${MY_LOCALDISK}/WORKSPACE/${PROJECT}"
|
MY_WORKSPACE="${MY_LOCALDISK}/WORKSPACE/${PROJECT}"
|
||||||
|
@ -223,9 +227,9 @@ $repo_setup = <<-'REPO_SETUP'
|
||||||
su - ${DEV_USER} -c "cd ${MY_REPO_ROOT_DIR};
|
su - ${DEV_USER} -c "cd ${MY_REPO_ROOT_DIR};
|
||||||
repo sync -j $(nproc --all)"
|
repo sync -j $(nproc --all)"
|
||||||
|
|
||||||
# Step 3) stx-init-env
|
# Step 3) stx-init-env --rebuild
|
||||||
date
|
date
|
||||||
echo "stx-init-env. This can take some time (approximately 6 min)"
|
echo "stx-init-env --rebuild. This can take some time (approximately 10 min)"
|
||||||
# initialize minikube env
|
# initialize minikube env
|
||||||
su - ${DEV_USER} -c "cd ${STX_TOOLS};
|
su - ${DEV_USER} -c "cd ${STX_TOOLS};
|
||||||
source import-stx;
|
source import-stx;
|
||||||
|
@ -236,6 +240,8 @@ $repo_setup = <<-'REPO_SETUP'
|
||||||
stx config --add project.gitemail ${USER_EMAIL};
|
stx config --add project.gitemail ${USER_EMAIL};
|
||||||
# stx-init-env spams stdout, so we will redirect that command to a log
|
# stx-init-env spams stdout, so we will redirect that command to a log
|
||||||
./stx-init-env > ${MY_WORKSPACE}/stx-init-env.log 2>&1 ;
|
./stx-init-env > ${MY_WORKSPACE}/stx-init-env.log 2>&1 ;
|
||||||
|
# we need to initialize normally, before we can rebuild
|
||||||
|
./stx-init-env --rebuild > ${MY_WORKSPACE}/stx-init-env.log 2>&1 ;
|
||||||
|
|
||||||
# Display the last new lines of the log
|
# Display the last new lines of the log
|
||||||
tail ${MY_WORKSPACE}/stx-init-env.log;
|
tail ${MY_WORKSPACE}/stx-init-env.log;
|
||||||
|
@ -243,7 +249,7 @@ $repo_setup = <<-'REPO_SETUP'
|
||||||
# status should indicate success rather than 'ContainerCreating'
|
# status should indicate success rather than 'ContainerCreating'
|
||||||
stx control status"
|
stx control status"
|
||||||
|
|
||||||
# Step 3) Support minikube auto-start on reboot for this user
|
# Step 4) Support minikube auto-start on reboot for this user
|
||||||
date
|
date
|
||||||
# override contents of /usr/lib/systemd/system/minikube.service
|
# override contents of /usr/lib/systemd/system/minikube.service
|
||||||
MINIKUBE_SERVICE="/usr/lib/systemd/system/minikube.service"
|
MINIKUBE_SERVICE="/usr/lib/systemd/system/minikube.service"
|
||||||
|
@ -271,7 +277,7 @@ WantedBy=multi-user.target
|
||||||
systemctl enable minikube
|
systemctl enable minikube
|
||||||
systemctl start minikube
|
systemctl start minikube
|
||||||
|
|
||||||
# Step 4) Run the downloader
|
# Step 5) Run the downloader
|
||||||
date
|
date
|
||||||
echo "Waiting 60 seconds before running the downloader to ensure all containers are running"
|
echo "Waiting 60 seconds before running the downloader to ensure all containers are running"
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
Loading…
Reference in New Issue