mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 15:47:17 +00:00
Implement optional BASEIMAGE_ONLY builds
This commit is contained in:
parent
9f2f5f8bfb
commit
5ea5f52630
@ -27,14 +27,19 @@ run()
|
|||||||
|
|
||||||
check_dependencies
|
check_dependencies
|
||||||
clone_repos_ask_ssh_or_https
|
clone_repos_ask_ssh_or_https
|
||||||
TAG="$(fetch_latest_tag)"
|
TAG="${BASEIMAGE_ONLY:-$(fetch_latest_tag)}"
|
||||||
TAG=$TAG pin_latest_baseimage
|
TAG=$TAG pin_latest_baseimage
|
||||||
TAG=$TAG build_latest_baseimage
|
TAG=$TAG build_latest_baseimage
|
||||||
|
|
||||||
|
if [ -z "${BASEIMAGE_ONLY:-}" ]; then
|
||||||
install_frontend_deps
|
install_frontend_deps
|
||||||
if [ "$TFWDEV" == "0" ]; then
|
if [ "$TFWDEV" == "0" ]; then
|
||||||
cleanup_repos
|
cleanup_repos
|
||||||
merge_repos
|
merge_repos
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
delete_repos
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "You can build & start TFW by executing the command: ${TEST}/hack/tfw.sh start"
|
echo "You can build & start TFW by executing the command: ${TEST}/hack/tfw.sh start"
|
||||||
@ -43,7 +48,7 @@ run()
|
|||||||
handle_exit()
|
handle_exit()
|
||||||
{
|
{
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
err_cleanup
|
delete_repos
|
||||||
showlog
|
showlog
|
||||||
fi
|
fi
|
||||||
cleanlog
|
cleanlog
|
||||||
@ -51,7 +56,7 @@ handle_exit()
|
|||||||
|
|
||||||
showlog() { echo && echo "Error! Showing logs:" && cat $LOGFILE; }
|
showlog() { echo && echo "Error! Showing logs:" && cat $LOGFILE; }
|
||||||
cleanlog() { rm $LOGFILE; }
|
cleanlog() { rm $LOGFILE; }
|
||||||
err_cleanup() { cd "$BASEDIR" && rm -rf "$BASEIMAGE" "$FRONTEND" "$TEST"; }
|
delete_repos() { pushd "$BASEDIR" && rm -rf "$BASEIMAGE" "$FRONTEND" "$TEST" && popd; }
|
||||||
|
|
||||||
check_dependencies()
|
check_dependencies()
|
||||||
{
|
{
|
||||||
@ -122,7 +127,7 @@ fetch_latest_tag()
|
|||||||
|
|
||||||
pin_latest_baseimage()
|
pin_latest_baseimage()
|
||||||
{
|
{
|
||||||
echo -n "Pinning latest TFW baseimage version... "
|
echo -n "Pinning TFW baseimage version... "
|
||||||
echo -n "which is ${TAG}... "
|
echo -n "which is ${TAG}... "
|
||||||
sed -i "1 s/.*/&:${TAG}/" "${TEST}/solvable/Dockerfile"
|
sed -i "1 s/.*/&:${TAG}/" "${TEST}/solvable/Dockerfile"
|
||||||
echo "Done!"
|
echo "Done!"
|
||||||
|
Loading…
Reference in New Issue
Block a user