Create and Configure Deployment Build Jobs and Pipelines

To deploy extensions to other Oracle Cloud Applications instances, you can use the Manage Extension Lifecycle page. If you’d rather use a CI/CD pipeline for deployment, you’ll need to set up or create a packaging job, one or more deploy jobs, and a pipeline. Specifically:

Create a Deployment Build Job

The deployment job deploys the extension’s artifact that was generated in the default packaging job to the Oracle Cloud Application’s instance. Before you create the job, make sure you have credentials that VB Studio can use to access the instance.

  1. In the left navigator, click Builds Builds.
  2. In the Jobs tab, click + Create Job.
  3. In the New Job dialog box, in Name, enter a unique name.
  4. In Description, enter the job’s description.
  5. Select the Copy From Existing check box.
  6. From the Copy From drop-down list, select the deployment job that you’d like to copy.
  7. In Template, make sure that the System Default OL7 for Visual Builder template is selected.
  8. Click Create.
  9. From the Job Configuration page, click the Steps tab. The Application Extension Deployment section is displayed.
  10. In Target Instance, select the environment with the target Oracle Cloud Applications instance.
  11. In the Authorization section, specify the authorization type to run this build step. With Use OAuth selected by default, you’ll see the Authorization is required message, indicating that this build step needs a one-time authorization to handle OAuth requests to your environment’s Oracle Cloud Applications instance. Click Authorize and enter credentials to access your Oracle Cloud Applications instance; you can also run the job manually and enter the credentials when prompted. Either way, it is recommended that you authorize your OAuth connection during initial configuration. If you skip this step, you won’t be able to publish your changes from the Designer and will need to complete the required authorization before attempting to deploy changes. Once authorized, the Authorization has been provided message shows.

    OAuth is the recommended authorization type. Use Basic authentication only if you run into issues with setting up an OAuth connection. To use Basic authentication, select Use Basic, then enter the credentials of a user who can access the Oracle Cloud Applications instance in Username and Password. These credentials must be those of a local user, not a federated identity, and must not require multi-factor authentication.

    OAuth tokens (access and refresh) are cycled during regular use. A refresh token is used to obtain an access token whenever a user accesses the target instance. This refresh token is typically valid for seven days. (The token expiration time is set in the IDCS resource app and may be different based on your security requirements.) If the user authenticates with the target instance within the seven-day period, the active refresh token generates a new access token and a new refresh token. This cycle continues indefinitely as long as the refresh token stays valid. If the refresh token expires during extended periods of inactivity (say, when you’re away on vacation), click Renew Authorization (or run the job manually, so you’re prompted to authorize any expired OAuth tokens).

  12. The Build Artifact field should show the same artifact name that was used in the packaging build step. Confirm this value, especially if the packaging job used an artifact name other than the default, extension.vx.
  13. Click Save.

Configure the Default Pipeline to Deploy to Other Oracle Cloud Applications Instances

If you want to deploy to other DEV and TEST instances along with your primary Oracle Cloud Applications instance, you can configure the default pipeline to deploy to other instances as well.

  1. In the left navigator, click Builds Builds.
  2. Click the Pipelines tab.
  3. In the extensionNamePackage and Deploy pipeline row, click the Actions menu and select Configure Pipeline. (If you created the project manually, the pipeline name is Application Extension - Package and Deploy.)
  4. Right-click the extensionName-Package job and select Add, then Add New On Success Jobs. Here’s an example:
    Description of pipeline-appextn-add-jobs.png follows

    Description of the illustration pipeline-appextn-add-jobs.png

  5. Click in the Select new on success job(s) field, select the jobs that you want to add from the list, and click Save.
    Description of pipeline-appextn-test-jobs.png follows

    Description of the illustration pipeline-appextn-test-jobs.png

    Here’s an example of the final diagram:
    Description of pipeline-appextn-test-jobs-final.png follows

    Description of the illustration pipeline-appextn-test-jobs-final.png

  6. Click Save.

Create and Configure a Pipeline to Deploy to Other Oracle Cloud Applications Instances

  1. In the left navigator, click Builds Builds.
  2. Click the Pipelines tab.
  3. Click + Create Pipeline.
  4. In the Create Pipeline dialog box, in Name and Description, enter a unique name and description.
  5. Deselect the Auto start when pipeline jobs are built externally check box.
  6. Click Create.
  7. On the Pipeline Configuration page, right-click the Start node and select Add New Start jobs.
  8. Click in the Select new on success job(s) field, select extensionName-Package, and click Save. Description of build-appextn-other-pipeline.png follows

    Description of the illustration build-appextn-other-pipeline.png

  9. Right-click the extensionName-Package job and select Add, then Add New On Success Jobs.
  10. Click in the Select new on success job(s) field, select the jobs that you want to add from the list, and click Save. Here’s an example of a finished pipeline:
    Description of build-appextn-other-package-pipeline.png follows

    Description of the illustration build-appextn-other-package-pipeline.png

  11. Click Save.

Deploy Changes from a Different Branch

At some point, you’ll likely want to create a separate branch to host your new feature development work. You can package those changes from your new branch and deploy them to an Oracle Cloud Applications instance for testing.

To deploy to the Oracle Cloud Applications instance in the environment associated with your workspace, you can select the new branch when you publish your changes. Or, if your changes already exist in the new branch, you can use the Deploy option in the Designer. See Deploy Changes From the Remote Branch in Extending Oracle Cloud Applications with Visual Builder Studio.

To deploy to a different Oracle Cloud Applications instance, such as TEST or PROD, you’ll need to set up some build jobs and a CI/CD pipeline.

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 new branch, and then create and enable a CI/CD pipeline for the branch. (If you’re deploying to a different instance that’s not the one associated with your workspace, you’ll need to change the target environment in the deployment job, after it’s created.) See Establish Extension-Level Settings in Extending Oracle Cloud Applications with Visual Builder Studio.

Create a Packaging Job for the New Branch

Create a packaging job following the same steps to create a production packaging build job, but when configuring the job, select the new branch instead of the default main branch:

  1. In the left navigator, click Builds Builds.
  2. Create a job using the System Default OL7 for Visual Builder template.
  3. Click Configure Configure.
  4. Click the Git tab.
  5. From the Add Git list, select Git.
  6. In Repository, select the Git repository. In Branch or Tag, select the new branch.

Finish configuring the packaging job as usual. See Create the Production Packaging Build Job.

Create a Deployment Job

Create a deployment job following the same steps to create a production deployment build job, but when configuring the job, select the packaging job that you just created.

Create and Configure a Pipeline for the New Branch

After you’ve created the packaging and deployment jobs for the new branch, create a pipeline to run the packaging job and deployment jobs in sequence. See Create and Configure a Pipeline to Deploy to Other Oracle Cloud Applications Instances.