Build from sources
Introduction
Run simulations by simply plugging your git repository.
Pre-requisites
- Private Repository: Build from Sources requires a configured Private Repository to store build artifacts.
- Private Locations: Build from Sources is only compatible with Private Locations. Ensure these are configured first.
- Control Plane image: Use
gatlingcorp/control-plane:latest-builder
instead ofgatlingcorp/control-plane:latest
. - Allocate adequate CPU and memory resources according to your project’s compilation needs.
- Git repository with a compatible Gatling plugin version configured
Configuration
Git authentication
Cloning over SSH using an SSH key
Mount SSH Configuration
- Provide an SSH configuration mounted at
/app/.ssh
into the container. - Ensure the mounted folder is owned by the Gatling user (UID 1001):
chown -R 1001 /app/.ssh
.
Update SSH Config:
Edit /app/.ssh/config
to specify your identity file. For example (GitHub):
Host github.com
IdentityFile /app/.ssh/id_gatling
StrictHostKeyChecking no
Set Key Permissions:
Ensure /app/.ssh/id_gatling
has permissions 400:
- Owner: Read
- Group: -
- Others: -
Host Verification (Optional):
If you set StrictHostKeyChecking yes
, manually add hosts keys to /app/.ssh/known_hosts
.
Cloning over HTTPS using git credentials
When authenticating with Git over HTTPS (via password or token), you can specify credentials in the Control Plane configuration file (e.g., control-plane.conf):
control-plane {
# ...
builder {
git.global.credentials.https {
username = <username> # (optional)
password = <token>
}
}
}
Security Best Practices:
- Use personal access tokens instead of passwords whenever possible.
- Limit token permissions to read-only access.
- Never include credentials in repository URLs within Gatling Enterprise.
Build tools
Build Tool | Gatling Plugin Version | Image Cache Path |
---|---|---|
Maven | 4.16.3 |
/app/.m2 |
Gradle | 3.13.5.4 |
/app/.gradle |
SBT | 4.13.3 |
/app/.sbt |
NPM | 3.13.501 |
/app/.npm |
Gatling Plugin Version: The minimum compatible version of each build tool plugin that supports build from sources.
Image Cache Path: Ensure build tool caches persist across different upgrades by mounting a volume to the given path.
Usage
Git repositories
Navigate to Sources → Git repositories
Create a new repository by providing:
- Name
- Team (note: simulations built from this repository will inherit this team)
- URL (e.g:
git@github.com:gatling/gatling.git
)

From repository actions, you can create new simulations.
Creating simulations from sources
Go to Simulations → Create Simulation → Select Build from sources

Configure:
- Source repository
- Branch (defaults to repository default branch)
- Working directory (defaults to repository root)
- Build tool of your project
- Simulation class
- JVM projects: Enter the fully qualified name (example:
io.gatling.DemoSimulation
) - JavaScript projects: Use the simulation name (example:
demoSimulation
fordemoSimulation.gatling.js
)
- JVM projects: Enter the fully qualified name (example:
- Configure private locations and other simulation properties
- Save and launch your simulation
