Adding a Managed Build Stage
Add a Managed Build stage in the build pipeline.
You must add code repositories in this stage for the build. The repositories must be configured before adding the Managed Build stage. For creating repositories, see Managing Code Repositories.
Before you add a stage, you must have a build pipeline.
- Open the navigation menu and click Developer Services. Under DevOps, click Projects.
- Select a project and a build pipeline.
- To add a stage to the pipeline, click the + icon and select Add stage.
- For the stage type, select Managed Build, and then click Next.
- Enter a name and description for the stage. Adding a description is optional.
- Select the build runner shape.
You can select the default shape (quick start option) or you can customize by selecting the required number of OCPUs and amount of memory (in GB). The customization takes longer to provision.
- Select Oracle Linux 7 as the base container image.
- (Optional) To access private virtual network:
- Select a Virtual Cloud Network (VCN) and regional subnet in the tenancy.
- (Optional) For restricting access to your VCN, you can select Network security groups (NSGs) in your VCNs.
- (Optional) Enter the path for the build specification file.
The build specification contains build steps and settings that the build pipeline uses to run a build.Note
This step is required only if the build specification file,
build_spec.yamlis not located in the root directory of your primary code repository.
- Select the primary code repository for the build.
- Select the connection type and a connection for the repository.
Supported connection types are:
- OCI Code Repository
- Bitbucket Cloud
- Visual Builder Studio
- Bitbucket Server
- GitLab Server
Only the external connections that you have already configured are available for selection. If no connections exist, then click the Create a connection link.
- If you select GitHub or GitLab, then select a repository.
- If you select Bitbucket Cloud, then select a workspace and a repository.
- If you select Visual Builder Studio (VBS), then select an external VBS project and a repository.
- If you select Bitbucket Server or GitLab Server, then enter the repository URL that contains the build source.
- Select or enter a branch for the selected code repository.
The build usually happens on the branch which triggers the build run and not from the branch that is configured while adding the build stage. The configured branch can be used when the build run is manually triggered through the OCI Console.
- For Build Source Name, enter a unique name for the folder where
the source code is downloaded on the build runner. Examples:
- Save the changes.
- Select the connection type and a connection for the repository. Supported connection types are:
- To add more code repositories, click Add Build Source and select the repositories.
- (Optional) Enter a timeout value (in seconds) for the stage.
- (Optional) To add tags to the stage, click Show tagging options. Tagging
is a metadata system that lets you organize and track the resources in your
If you have permissions to create a resource, you also have permissions to add free-form tags to it.
To add a defined tag, you must have permissions to use the tag namespace.
For more information, see Resource Tags.
- To add the stage to the pipeline, click Add.
A stage preview provides a snapshot of the configuration.
You can add the following stages sequentially or in parallel to the pipeline:
- Deliver Artifacts: Store your software applications created from the Managed Build stage in the Oracle Cloud Infrastructure (OCI) Artifact Registry or OCI Container Registry repositories.
- Trigger Deployment: Start a deployment pipeline to deploy the output from the build pipeline.
- Wait: Pause a specific duration for testing the build pipeline.
You can manually run the build or automatically trigger a build run when you commit your changes to the code repository. Manual run uses the latest commit to your code repository. You can run the build based on specific commit by noting the commit details.
To create a build pipeline, run the
oci devops build-pipeline create --project-id
To add a Managed Build stage for the pipeline, run the
oci devops build-pipeline-stage create-build-stage
Required parameters are:
Optional parameter for configuring the build runner shape is:
To get all the commands for
oci devops build-pipeline -h
oci devops build-pipeline-stage -h
To get help for the
oci devops build-pipeline-stage create-build-stage -h
To create a build pipeline, use the
To add a Managed Build stage for the pipeline, use the
CreateBuildPipelineStageoperation. For the
buildPipelineStageTypeattribute, specify the value as
In addition to the CreateBuildStageDetails request, you must add one of the given attributes for customizing the build runner shape: