mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 22:07:17 +00:00
Implement optional BASEIMAGE_ONLY builds
This commit is contained in:
parent
9f2f5f8bfb
commit
5ea5f52630
@ -27,13 +27,18 @@ 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
|
||||||
install_frontend_deps
|
|
||||||
if [ "$TFWDEV" == "0" ]; then
|
if [ -z "${BASEIMAGE_ONLY:-}" ]; then
|
||||||
cleanup_repos
|
install_frontend_deps
|
||||||
merge_repos
|
if [ "$TFWDEV" == "0" ]; then
|
||||||
|
cleanup_repos
|
||||||
|
merge_repos
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
delete_repos
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@ -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