Appearance
Continuous Integration
Create automated, clean, and consistent application images with Turbo while keeping the build environment free from conflicting dependencies.
Existing build servers may have many varying libraries, runtimes, custom settings, and applications that are required for automated builds. These dependencies can collide and create inconsistent environments. With Turbo, all dependencies are captured into a container image, providing consistent and reproducible builds.
The recommended approach for CI builds is to use PowerShell build scripts from the powershell-builds repository.
PowerShell Build Scripts
The powershell-builds repo contains a collection of PowerShell scripts for automating the creation of Turbo images using Turbo Studio's capture workflow. Each application has its own folder with a BuildTurboImage.ps1 script that handles downloading the installer, running the capture, and building the final SVM image.
Prerequisites
On a clean packaging device:
- Download and unzip the powershell-builds repo
- Install Turbo Studio
- Install the Turbo Client (required only if importing or pushing images to a Turbo Server)
Running a Build
Launch TurboImageBuilder.hta to use the graphical interface, or run a script directly from an elevated PowerShell prompt:
powershell
powershell -ExecutionPolicy Bypass -File .\<vendor_appname>\BuildTurboImage.ps1To import the built image to the local repository after the build:
powershell
powershell -ExecutionPolicy Bypass -File .\<vendor_appname>\BuildTurboImage.ps1 -Import $trueTo import and push to a Turbo Server:
powershell
powershell -ExecutionPolicy Bypass -File .\<vendor_appname>\BuildTurboImage.ps1 -Import $true -PushURL https://<server> -ApiKey client:<client-id>:<client-secret>-ApiKey takes the credential the script signs in with:
client:<client-id>:<client-secret>for a Turbo Server 2.0: a registered client, which a Server Administrator creates with ts clientnew <client-id> --service-account=<account>. Its service account must be allowed to push to the Hub. Signing in as a client needs Turbo Client 26.10 or later.- An API key, for a Turbo Server before 2.0 only: Turbo Server 2.0 issues none. Turbo Client 26.10 or later no longer signs in with a key, so with that client the script exchanges the key for the server's sign-in itself.
Build Output
Completed builds are written to %USERPROFILE%\Desktop\Package\TurboCapture\:
Capture.xappl— unmodified configuration from the captureFinalCapture.xappl— configuration after post-capture modificationsbuild.svm— the completed Turbo image
Logs are written to %USERPROFILE%\Desktop\Package\Log\.
Script Structure
Each application folder follows the same structure:
<vendor_appname>\
BuildTurboImage.ps1 # Main build script
VersionCheck.ps1 # Checks if Hub version is already up to date
SupportFiles\
PostCaptureModifications.ps1 # XML customizations applied to the .xappl before buildThe scripts rely on shared helper functions in !include\GlobalBuildScript.ps1, which provides utilities for downloading installers, starting and stopping Turbo Studio capture, building the SVM, and pushing the image.
Integrating into a CI Server
Add the following steps to your CI pipeline:
- Check out or download the
powershell-buildsrepo to the build agent - Place your Turbo Studio license at
!include\License.txt - Run the build script for the target application
- Optionally push the resulting image to your Turbo Server using
-PushURLand-ApiKey
Example using environment variables for a registered client's credentials:
powershell
powershell -ExecutionPolicy Bypass -File .\<vendor_appname>\BuildTurboImage.ps1 `
-Import $true `
-PushURL $env:TURBO_SERVER_URL `
-ApiKey "client:${env:TURBO_CLIENT_ID}:${env:TURBO_CLIENT_SECRET}"Keep the secret in your CI server's secret store, and register a client for each pipeline so that you can revoke one without affecting the others.
See the Command Line Interface page for more information on turbo commands.
