FlexDeploy is a DevOps platform for CI/CD with out of the box support Oracle APEX build and deploy automation. Oracle Application Express (APEX) is a common low code development framework, which is also used to develop extensions for Oracle E-Business Suite.
This FlexDeploy Loves APEX Blog Series will help you understand what makes FlexDeploy a perfect choice to implement DevOps and Continuous Delivery with Oracle APEX. Here is a summary of FlexDeploy Loves APEX Blog Series:
- FlexDeploy Loves APEX: Source Application from SCM (Git, SVN, etc.)
- FlexDeploy Loves APEX: Source Application from Development Environment
- FlexDeploy Loves APEX: Continuous Integration for APEX
- FlexDeploy Loves APEX: Deploy Individual Application Pages
- FlexDeploy Loves APEX: Deploy the Applications and Supporting Objects
In this blog article, we will discuss using FlexDeploy to automatically promote an APEX application from the source control repository to various environments. Oracle recommends the use of a source control repository such as Git, SVN, or TFS for storing APEX application files, see APEX life cycle management whitepaper.
Export and Save files in SCM
In this approach, we will source the APEX application from SCM. APEX development happens in a browser against the development environment. Hence developers need to export and commit files to SCM. There are few options for such export.
- Use Application Builder to export applications
- Use Oracle APEXExport utility to export and possibly split application file into many files for easier management.
- Use FlexDeploy operation to automate export.
- Other commercial or free tools.
FlexDeploy supports both types of export, i.e., full application and split files.
- If you export the application as a single file, you will be deploying the entire application as a unit. This option is set up as a full deployment project in FlexDeploy.
- If you exported an application into many smaller files, you can either deploy an entire application or specific pages/components. This option is set up as a partial deployment project in FlexDeploy.
FlexDeploy configurations (step #3 below) is a one-time activity, and it does not require any scripting. We recommend the use of FlexDeploy Blueprints for faster setup.
- Export and commit application files to SCM
- Install SQLcl on FlexDeploy server
- Configure FlexDeploy (workflows, topology, project, etc.)
We will use GitHub as SCM with a split format application in a folder.
You can download Build APEX and Deploy APEX workflow files for reference. FlexDeploy Blueprints will create these workflows automatically.
Build workflow will use SCM files and produce zip artifact. FlexDeploy stores artifact in the artifact repository. In this build, there is no compilation or validation.
Deploy workflow is a single plugin operation to perform deployment of the APEX application in the target environment. This workflow handles deploying either the entire application or some set of page/component files.
Now we need to define Topology for your APEX environments. First, we will create an Instance using the name of APEX Workspace and associate it with various environments (Dev, QA, Production) and workflows (Build APEX, Deploy APEX). Here is what the Instance will look like for APEX.
Now we can provide configuration details for each circle in matrix below. FlexDeploy plugin will use configuration values defined for each environment.
Each environment will have different properties and endpoints.
FlexDeploy uses SQLcl to import application files. You can install it on the FlexDeploy server, in which case we will remotely install all applications (using Localhost endpoint). You can also use SSH endpoints, but we will leave that for more advanced talk.
Now that we have the Topology configured, we can create a FlexDeploy project for each APEX application. The project is set up to use SCM and Build APEX & Deploy APEX workflow.
We can now configure Project level properties that are application-specific — for example, workspace, application name, etc.
Build and Deploy
Now we are ready to execute build and deploy. Buils is started either 1) Manually, 2) REST API, 3) CI Triggers, 4) Release and Pipelines. We recommend Release and Pipelines usage as that allows you to deploy your APEX application with other supporting objects (packages, tables, sequences, etc.)
After the successful execution of build workflow, FlexDeploy will store artifacts in its artifact repository with a unique version. You can deploy a specific version to any environment. In this example, we have selected to build All Files, but you can choose to build even a single page.
You can request a deployment manually, as shown below, or you can use other automated approaches to deploy a specific version. Note that approval, schedule, notifications are all available as they are part of the FlexDeploy platform.
After successful execution of deploy workflow, you can see the status on the project page.
Similarly, you can build and deploy a set of pages and/or component files as a smaller unit (aka package).
You can also use dashboards and reports to review history and state of deployed applications. Additionally, you can use test automation to run automated tests against a deployed application. Test results can be further used to decide if the version should be promoted to the next environment or not. All these are options available for any project in FlexDeploy.
You just saw how you could configure an APEX project in FlexDeploy, and automatically promote an APEX application from Source Control Management to various environments.
In my next post, I’ll show how you can source the application from a development environment.