Configure a Job to Manage a Deployed Extension

VB Studio provides you with build steps that you can add to a job to perform lifecycle operations on extensions and App UIs. VB Studio provides these build options as Application Extension build steps that you can configure in a packaging job or in separate build jobs that you can add to a CI/CD pipeline.

The Audit, Test, and Package steps can be in separate jobs or, for simplicity, you can add the Test and Audit (in whatever order you want) steps before the Package step in the packaging job, as we show next.

Tip:

If you create a separate job for each task, after you create and configure the lifecycle management build steps, you may want to add the jobs, in some combination, to the pipeline you created for the packaging and deployment steps for that testing or production instance. By integrating these build steps in your deployment process, you'll ensure a more robust and error-free process when upgrades are done through deployment.
These lifecycle operations include:
  • Auditing and testing extensions before deploying them
  • Deleting extensions when they're no longer needed
To configure these options in an existing packaging job:
  1. In the left navigator, click Builds Builds .
  2. In the Jobs tab, select the package job and click Configure.

    An extension created using the Application Extension template includes a default Application-Extension-Package build job that packages the application extension's sources.

  3. On the Job Configuration page, click Steps.
  4. Click Add Step, select Application Extension and select the option you want to add to the job: Build options available for an application extension when you click Add Step for a packaging job

    These options automate CI/CD tasks for you. Each option has its own set of parameters. Some operations should follow a particular order. For example, the Audit and Test steps should be performed before the Package step, and all three steps must precede the Deploy step.

    See the following for more information about each option:
  5. When you're done, click Save.

Configure a Job to Audit and Test Your Extension

VB Studio provides capabilities for auditing your extensions and running action chain tests you've defined in your Oracle Cloud Application extension. For your convenience, VB Studio provides these operations in Build steps, so you can define all the necessary arguments and option overrides in one place for a build job or to include in a pipeline that simplifies automating the CI/CD lifecycle.

See Debug and Audit Your Code and Test Action Chains for more information about auditing and testing extensions.

Create a Build Step to Audit Your Extension

  1. From the Git tab on the Job Configuration page, select Git from the Add Git dropdown and then select the repository that was created for the extension in Repository.
  2. In the Parameters tab, select String Parameter from the Add Parameter dropdown list. Enter OUTPUT_FILE in Name.

    The default value is auditoutput.json.

    This parameter is used to override the default Grunt options as well as in the artifact archival.

  3. In the Steps tab, select Add Step, Application Extension, and Audit.

    In the Application Extension Auditing panel:

    1. Enter the extension's identifier in the Extension ID field and the extension's version in the Extension Version field.

      You can find the details on the Deployments tab of the environment where the extension is deployed.

    2. In Options, enter auditoutputfile=$OUTPUT_FILE, using the parameter you defined in step 2.
  4. In the After Build tab, select Artifact Archiver from the Add After Build Action dropdown list.
  5. In the Configure Post Build Actions panel, in Artifacts from files, enter $OUTPUT_FILE in the Files to archive field.
  6. Click Save.

Create a Build Step to Test Action Chains in Your Extension

  1. From the Git tab on the Job Configuration page, select Git from the Add Git dropdown and then select the repository that was created for the extension in Repository.
  2. In the Parameters tab, select String Parameter from the Add Parameter dropdown list. Enter BUILD_DIR in Name.

    The default value is build.

    This parameter is used when the build system executes the Grunt task behind the scenes in the step as well as in the artifact archival.

  3. In the Steps tab, select Add Step, Visual Applications, and Test.

    The Application Extension Testing dialog displays.

    1. In Karma Browser, if you select FirefoxHeadless, it requires a Build Executor template that contains the Firefox software package.

      If you select ChromeHeadless instead, it requires a custom Docker image with Chrome installed, so, you need to create that custom Docker image and then create a Build Executor template to use from that.

    2. For Karma Log Level, select Info, Debug, Warn, Error, or Disable.

      The different log levels will be generated from the tests. Debug is the default level.

    3. In Mocha Timeout, enter a number between 0 and 600,000 milliseconds.
  4. In the After Build tab, select Artifact Archiver from the Add After Build Action dropdown list.

    The Configure Post Build Actions dialog displays.

  5. In the Configure Post Build Actions dialog, in Artifacts from files, enter $BUILD_DIR/build/**/* in the Files to archive field.
  6. Click Save.

Configure a Job to Delete an Extension

With the credentials of a user who can access the Oracle Cloud Applications instance where the extension is deployed, you can use a build job to delete an extension:
  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. In Template, select the System Default OL7 for Visual Builder build executor template.
  6. Click Create.
    The Job Configuration page opens.
  7. Click the Steps tab.
  8. From Add Step, select Application Extension, and then select Delete.
  9. In Instance, select the Oracle Cloud Applications instance where the application is deployed.
  10. 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.

  11. Enter the extension's identifier in Extension ID.

    Tip:

    The identifier is displayed in a column of the same name on the Deployments tab of the environment where the extension is deployed. The extension name can be viewed in a tooltip if you hover over the identifier. You can also see the extension name from Settings in the top right hamburger menu. This option displays the visual view of the file.
  12. Enter extension's version in Version.
    You can find the Extension Manager version on the Deployments tab of the environment where the extension is deployed. The Application Extensions section lists deployments for the current project only. Optionally, you can use the Show Previewed/Shared versions checkbox to display extensions that were deployed through the Designer, not through a build step.
  13. Click Save.
  14. To run a build, click Build Now.