Deploy to Test and Production Instances
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.-
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
main
branch 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.