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.- Auditing and testing extensions before deploying them
- Deleting extensions when they're no longer needed
- In the left navigator, click
Builds
.
- 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. - On the Job Configuration page, click Steps.
- Click Add Step, select
Application Extension and
select the option you want to add to the 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:- See Configure a Job to Audit and Test Your Extension for information about Audit and Test.
- See Configure a Job to Delete an Extension for information about Delete.
- 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
- 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.
- 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.
- In the Steps tab, select Add
Step, Application Extension, and
Audit.
In the Application Extension Auditing panel:
- 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.
- In Options, enter
auditoutputfile=$OUTPUT_FILE
, using the parameter you defined in step 2.
- Enter the extension's identifier in the Extension
ID field and the extension's version in the
Extension Version field.
- In the After Build tab, select Artifact Archiver from the Add After Build Action dropdown list.
- In the Configure Post Build Actions panel, in Artifacts
from files, enter
$OUTPUT_FILE
in the Files to archive field. - Click Save.
Create a Build Step to Test Action Chains in Your Extension
- 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.
- 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.
- In the Steps tab, select Add
Step, Visual Applications, and
Test.
The Application Extension Testing dialog displays.
- 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.
- 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.
- In Mocha Timeout, enter a number between 0 and 600,000 milliseconds.
- In Karma Browser, if you select
FirefoxHeadless, it requires a Build Executor
template that contains the Firefox software package.
- In the After Build tab, select
Artifact Archiver from the Add After Build
Action dropdown list.
The Configure Post Build Actions dialog displays.
- In the Configure Post Build Actions dialog, in Artifacts
from files, enter
$BUILD_DIR/build/**/*
in the Files to archive field. - Click Save.