Set Up the Project to Deploy to Production
By default, a project deploys extensions to the Development environment, which is the Oracle Cloud Application instance you were using when you clicked Edit Page in Visual Builder Studio. Follow these steps to deploy to the PROD instance, so users can deploy to it after their development and test cycles are complete.
The Oracle Cloud Applications PROD instance resides in a different identity domain from the DEV and TEST instances, which means you’ll need the URL for the PROD instance, as well as user credentials that VB Studio can use to deploy to this instance. These credentials must be those of a local user, not a federated identity, and must not require multi-factor authentication.
To set up a project to deploy to PROD:
Add the Oracle Cloud Application's Production Instance to an Environment
Only one Oracle Cloud Applications instance can be added to an environment. As the Development environment already points to the TEST instance (or DEV, if you asked Oracle to re-associate it), you must create a new environment for the PROD instance.
To create a new environment for the PROD instance:
- In the VB Studio navigator, click Environments.
- Click + Create Environment.
- In the Service Instances tab, click + Add Instance.
- In the Add Service Instances dialog box, select the Oracle Cloud Applications option button.
- Under Authentication Method, select the Application Credentials option.
- In Base URL, enter the Oracle Cloud Application's base URL.
- In Instance Name, if required, update the instance's display name. The name will be displayed in the Service Instances tab.
-
In Username and Password, enter the credentials of a user who can access this Oracle Cloud Applications instance.
These credentials must be those of a local user, not a federated identity, and must not require multi-factor authentication.
- Click Add.
If the newly added instance stays in the Unknown status for some time, it usually indicates that the IDCS Application provisioning may have failed. VB Studio added the Oracle Cloud Applications instance, but can't access it. In this case, click Actions and select Remove to remove the Oracle Cloud Applications instance from the environment, and then click Add to add it again.
Create a Production Branch
Follow your organization's guidelines to create a branch and protect it from unverified changes. To protect the branch, you can set merge restrictions, make the branch private, and restrict who can push commits to it, or freeze it.
- In the left navigator, click Git .
- Click the Refs view and then click Branches .
- From the Repositories drop-down list, select the repository.
- Click + Create Branch.
- In the New Branch dialog box, in Name, enter the branch name. From the Base drop-down list, select the
main
branch as the base branch. - Click Create.
After creating the production branch, any changes pushed to the main
branch aren't automatically available in the production branch. You must create a merge request or manually push the changes to the production branch.
If you want to set merge restrictions on the production branch, see Set Review and Merge Restrictions on a Repository Branch. To freeze the branch or make it private, or set other restrictions, see Protect a Branch.
Create and Configure Production Build Jobs
You need to set up some packaging and deployment jobs before you can deploy extensions to your Oracle Cloud Application's PROD instance. Follow this process:
- Migrate the configurations to the production Oracle Cloud Application instance. See Overview of Configuration Life Cycle and Migration in Configuring and Extending Applications for instructions.
- Create a build job that packages the extension. See Create the Production Packaging Build Job for instructions.
- Create a build job that deploys the extension to the production instance. See Create the Production Deployment Build Job for instructions.
- (Optional) Restrict who can see or edit the production build jobs or run their builds. See Configure a Job's Privacy Setting for instructions.
- Configure the pipelines to run the packaging and deployment jobs in succession. See Create and Configure the Production Pipeline for instructions.
- Run the production pipeline to package the extension and deploy it to the production instance. See Run Production Pipelines for instructions.
Before You Configure Build Jobs and Pipelines
Here are some things you need to know before you configure and run build jobs and pipelines:
- Make sure that the source and target instances are of the same release, with the same standard and one-off patches applied to both environments.
- In the development packaging job, if you changed the default artifact's file name, get the new name and its path.
- If you configured the development packaging job to overwrite the application's version defined in
visual-application.json
, get the new version. You'll configure the production's packaging job to use the same version.
Create the Production Packaging Build Job
The packaging job generates an extension artifact that's ready to deploy to the mainline.
Create the Production Deployment Build Job
The deployment job deploys the extension's artifact that was generated in the packaging job to the Oracle Cloud Application's production instance. Before you create the job, make sure you have credentials that VB Studio can use to access the Oracle Cloud Application's PROD instance.
Note:
If you develop an extension on, say, 23D in your Test environment, then want to deploy the extension to your 23C Prod environment, you'll have to wait until your Prod instance has been upgraded to 23D before you can deploy successfully. In most cases, there shouldn't be more than a two week gap between pod upgrades.Configure a Job's Privacy Setting
The project owner can mark a job as private to restrict who can see or edit a job's configuration, or run its build:
You can see if a job is private from several places in the VB Studio user interface. A private job is indicated by a Lock icon:
-
In the jobs list found on the Project Administration tile's Builds page's Job Protection tab, to the right of each protected job's name.
-
In the Private column on the Builds page's Jobs tab.
-
In the jobs shown in the the Builds page's Pipelines tab.
An unauthorized user can't run a private build job manually, or through a pipeline, or via an SCM/periodic trigger.
Create and Configure the Production Pipeline
To ensure the deployment job runs automatically after the packaging job, create a pipeline and set the dependency.
Run Production Pipelines
Before you run production build jobs or a production pipeline, make sure that all code changes have been pushed to the production branch and there are no open merge requests.
- In the left navigator, click Builds .
- Click the Pipelines tab.
- In the production pipeline's row, click the Actions menu and select Run Pipeline.
After a successful build, you can see the deployed application's link in the Environments page's Deployments tab. You should also notify the Oracle Cloud Applications administrator that the extension has been pushed to the Oracle Cloud Application's production instance.