mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-12-05 02:11:32 +00:00
Implement optional BASEIMAGE_ONLY builds
This commit is contained in:
parent
9f2f5f8bfb
commit
5ea5f52630
@ -27,13 +27,18 @@ run()
|
||||
|
||||
check_dependencies
|
||||
clone_repos_ask_ssh_or_https
|
||||
TAG="$(fetch_latest_tag)"
|
||||
TAG="${BASEIMAGE_ONLY:-$(fetch_latest_tag)}"
|
||||
TAG=$TAG pin_latest_baseimage
|
||||
TAG=$TAG build_latest_baseimage
|
||||
install_frontend_deps
|
||||
if [ "$TFWDEV" == "0" ]; then
|
||||
cleanup_repos
|
||||
merge_repos
|
||||
|
||||
if [ -z "${BASEIMAGE_ONLY:-}" ]; then
|
||||
install_frontend_deps
|
||||
if [ "$TFWDEV" == "0" ]; then
|
||||
cleanup_repos
|
||||
merge_repos
|
||||
fi
|
||||
else
|
||||
delete_repos
|
||||
fi
|
||||
|
||||
echo
|
||||
@ -43,7 +48,7 @@ run()
|
||||
handle_exit()
|
||||
{
|
||||
if [[ $? -ne 0 ]]; then
|
||||
err_cleanup
|
||||
delete_repos
|
||||
showlog
|
||||
fi
|
||||
cleanlog
|
||||
@ -51,7 +56,7 @@ handle_exit()
|
||||
|
||||
showlog() { echo && echo "Error! Showing logs:" && cat $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()
|
||||
{
|
||||
@ -122,7 +127,7 @@ fetch_latest_tag()
|
||||
|
||||
pin_latest_baseimage()
|
||||
{
|
||||
echo -n "Pinning latest TFW baseimage version... "
|
||||
echo -n "Pinning TFW baseimage version... "
|
||||
echo -n "which is ${TAG}... "
|
||||
sed -i "1 s/.*/&:${TAG}/" "${TEST}/solvable/Dockerfile"
|
||||
echo "Done!"
|
||||
|
Loading…
Reference in New Issue
Block a user