Want to update or change a Preview build? Tugboat offers a few different ways to do that:
update
and build
phases.init
commands, you can
Rebuild it. Rebuilding a Preview pulls fresh Docker images, pulls in the latest code from the
connected Git repo, and runs all of the Tugboat config file’s init
, update
and build
commands.On a basic level, you can think of it as the difference between updating the code (Refresh) and making more substantial changes to the way a Service is configured (Rebuild). For more info on what exactly is happening under the covers, take a look at the Preview build process: explained.
When you’re updating a Preview that was built from a Base Preview, Rebuild does not pull fresh
Docker images and run commands from init
and update
. Instead, child Previews jump directly to the build
phase. For
more info, see:
rebuild Previews when working with a Base Preview.
When you Refresh a Preview, Tugboat:
update
section of the config file.build
section of the config file.When you’re not using a Base Preview, Refreshing is a faster process than building the
entire container again, as Tugboat doesn’t have to set up Services and complete all the init
processes again. However,
if you are using a Base Preview, Rebuild is the faster update process.
For more info about build phases, see: the build process: explained.
You’ll see a yellow refreshing status while Tugboat is running the update, which will change to a green ready once the update is complete.
Go to username -> My Projects at the upper-right of the Tugboat screen.
Select the project where you want to update a Preview.
Click the name of the repo that contains the code you want to use for the Preview update.
Select the Preview build you want to update.
Click the Actions drop-down menu for that Preview, and select Refresh.
Press the Yes button to confirm and start the Refresh process.
You’ll see a yellow refreshing status while Tugboat is running the update, which will change to a green ready once the update is complete.
When you Rebuild a Preview (that was not built using a Base Preview), Tugboat:
init
section of the configuration.update
section of the configuration.build
section of the configuration.When you’re not using a Base Preview, this process takes longer than a
Refresh, so you should mainly use this if you need to pull new Docker images, or run commands from
init
in your config.yml. However, if you are using a Base Preview, Rebuild is the faster update process.
For more info about build phases, see: the build process: explained.
You’ll see a yellow building status while Tugboat is rebuilding the Preview, which will change to a green ready once the build is complete.
When you Rebuild a Preview that was built from a Base Preview, Rebuild does not pull fresh Docker
images and run commands from init
and update
. Instead, child Previews jump directly to the build
phase. For more
info, see: updating Previews when working with a Base Preview.
To Rebuild a Preview:
Go to username -> My Projects at the upper-right of the Tugboat screen.
Select the project where you want to rebuild a Preview.
Click the name of the repo that contains the code you want to use for the Preview rebuild.
Select the Preview you want to rebuild.
Click the Actions drop-down menu for that Preview, and select Rebuild.
Press the Yes button to confirm and start the Rebuild process.
You’ll see a yellow building status while Tugboat is rebuilding the Preview, which will change to a green ready once the build is complete.