Cross-project builds let you reference a build service from any project in your team or organization. A single build service can produce images consumed by deployment services and jobs across multiple projects.
Use this to organize resources so one build service powers multiple environments. For example, a shared CI build in a builds project can deploy to separate staging, qa, and production projects.
Enable cross-project access
Build services require explicit configuration to allow cross-project references. By default, a build service can only be referenced within its own project.
- Navigate to your build service.
- Click Build options.
- Scroll to Advanced build settings.
- Under Cross project access, enable Share build access to other projects.
- Select which projects can reference this build service (optional):
- By default, all projects in your team can reference this build service
- To restrict access, add specific project IDs to allow only those projects
- Enable Use as exclusion rule to allow all projects except the ones listed
- Click Update build options.
Once enabled, the build service can be referenced from deployment services, jobs, and workflows in the allowed projects.
Reference a shared build
After enabling cross-project access, you can reference the build service from deployment services through the UI or programmatically in templates and workflows.
Link to a deployment service in the UI
-
Create a new deployment service
-
Under Deployment, select Northflank as the deployment source
-
The Link build service section appears
-
Under Build service, select the project and build service you want to deploy
-
Select Branch to deploy from
-
Click Create service
The deployment service will now use builds from the selected cross-project build service.
Use in templates and workflows
Cross-project build references work in templates, workflows, and preview blueprints.
Reference a build service using its ID, prefixed with the project ID:
<project-id>/<build-service-id>
If the build service is in the same project, omit the project ID prefix:
<build-service-id>
For a deployment service node consuming a cross-project build:
{
"kind": "DeploymentService",
"spec": {
"type": "deployment",
"internal": {
"id": "builds-project/shared-build-service",
"branch": "main",
"buildSHA": "latest"
}
}
}
Access control
Build services can only be referenced by projects in the same team. Access can be controlled on the build service level by allowing access from all or specific projects.
Next steps
Build from a Git repository
Start building from your linked Git repositories in minutes.
Build a repository using a Dockerfile
Configure your application build process using a Dockerfile.
Inject secrets
Set build arguments and inject runtime variables into running deployments.
Upload a secret file
Add secret files that will be mounted in your container.