Deploy to Test and Production Instances
The easiest way to deploy your extension to test and production Oracle Cloud Applications instances is to use the Manage Extension Lifecycle page. But, if you’re a developer who’s fairly comfortable with Git and the development lifecycle, you might prefer to set things up so that you have control of moving your extension from the development phase into test, and finally to production. If that’s the case, here’s how you can set that up.
By default, an extension is set up so that changes published to the main branch are deployed directly to whichever Oracle Cloud Applications instance was named as the project’s Development instance. On the other hand, if you enabled a CI/CD pipeline for the main branch, you can modify that pipeline so that your extension is deployed to other non-production Oracle Cloud Applications instances as well, like a test pod or another Development environment. This involves the following steps:
- Create a VB Studio environment for each Oracle Cloud Applications instance to which you want to deploy.
- Create a deployment job for each instance you defined in step 1.
- Set up the pipeline to run the package and deployment jobs you created in step 2. In most cases you’ll want to have this pipeline automatically triggered when anyone commits to
main, but you have the option to run the pipeline manually. (As an individual developer working alone or with just a few others on a project, it’s unlikely that this option would appeal to you, but it does exist.)
Note: If your Oracle Cloud Applications instance is not in the same identity domain as your VB Studio instance, you can use OAuth tokens to access the instance. All you need to do is provide credentials of a user that can access the instance, when prompted. If needed, talk to your administrator to get Oracle Cloud Application credentials that you can use. See Create or Renew OAuth Tokens to Deploy Your Extension.
When you’re ready to move your extension to production, the process is similar, with a few additional steps:
-
Create a VB Studio environment for the Oracle Cloud Applications production instance.
-
Create a new branch in your project’s Git repo for changes that are ready for production.
After creating this branch, any changes pushed to the
mainbranch won’t automatically be added to the production branch. Instead, you must create a merge request or manually push the changes to the production branch, as a means of protecting the branch against untested or unwanted additions. Or, you can set the production branch, instead ofmain, as the target branch when you publish. -
Create the build jobs and pipeline:
- Create a production packaging build job, which generates an extension artifact that ready to deploy to the mainline.
- Create the production deployment build job, which deploys the artifact to the Oracle Cloud Application’s production instance.
- Set up the production build pipeline.
- Change the Enable CI/CD pipeline setting in the Settings editor for the production branch. See Enable or Disable the CI/CD Pipeline for Publishing.
Tip: VB Studio can create the build jobs and pipeline for you, if you prefer. In the extension’s Settings editor, under Building and Publishing, select the production branch, and then create and enable a CI/CD pipeline for the branch. You can then modify the newly created build jobs as needed. For example, in the deployment job, the deployment target is always the environment associated with the workspace, so you’ll need to change the target instance to your production instance.
Step-by-step instructions for both of these processes are available in Administering Visual Builder Studio:
- Deploy to Other DEV and TEST Instances Through CI/CD Pipelines
- Deploy to Production Through CI/CD Pipelines
Deployment from Remote Branch to Any Target Environment
In an Advanced Mode workspace, you can deploy a VB Extension from a remote repository branch directly to a supported target environment. For example, you can deploy a release branch to QA, UAT, or Production without first deploying it to the workspace environment and promoting it through Manage Extension Lifecycle.
To deploy an extension:
- Open the Deploy dialog.
- In Remote Branch, select the branch containing the extension changes.
- In Target Environment, select an environment configured on the Environments or Manage Extension Lifecycle page.
- If prompted, authorize access to the selected environment.
- Click Deploy.
Note: You can also select Deploy to move all previously published changes for your Oracle Cloud Application to a target Oracle Cloud Applications environment. This is particularly useful for restoring a previously published extension after a P2T, or if the extension was accidentally deleted from the target environment.
- Deployment to an environment other than the workspace environment is available only in Advanced Mode.
- In Express Mode, VB Studio deploys the remote target branch to the workspace-linked environment.
- OAuth environments are supported. Basic Authentication environments might appear in the list but cannot be selected for deployment.
- When deploying to an OAuth environment, you must authenticate with your own credentials, even if another user has already authenticated with that environment.
- VB Studio checks the selected environment’s status. Deployment is disabled if the environment is unavailable or its status cannot be determined.
- Deployment errors and compatibility warnings appear in the deployment response.
- Users can also perform deployment to Test or Production environment directly using “Deploy” option.