Learn About Building a CI/CD Pipeline

Deploying your custom API code to Oracle Mobile Hub is a manual process that can require logging in to the Oracle Mobile Hub console. You can use Oracle Developer Cloud Service to set up a CI/CD pipeline that delivers code whenever you push a commit to your remote Git repository. The API code is delivered by a simple script that runs in the Unix Shell Builder of Oracle Developer Cloud Service..

The script is the same one that you use when delivering code from the command line of your development system. It's only a few lines long and depends on the Custom Code Test Tools that you can download from Oracle Technology Network.

Architecture

This architecture shows the workflow of the CI/CD process.

Workflow of the CI/CD process

The diagram shows the following scenario:

  1. You develop your custom API code on your development system and maintain the code in a Git repository.
  2. You push your code to the remote Git repository. The remote repository is shown in Oracle Developer Cloud Service, but it can be in a third-party service that provides similar functions.
  3. The repository is polled on a schedule that you set. A new build starts if changes are detected in the repository. You can also configure a build to start immediately upon a commit to the remote Git repository.
  4. The build contains a simple script that installs Node and project dependencies then delivers the code to Oracle Mobile Hub. The delivery process requires the use of the Custom Code Test Tools tooling that you download from Oracle Technical Network.

About Required Services and Roles

This solution requires access to Oracle Mobile Hub. You can use Oracle Developer Cloud Service to host the Git repository and build scripts, but any third-party service that provides these functions will work.

These are the roles needed for each service.

Service Name: Role Required to...
Oracle Mobile Hub: ServiceDeployer Allows configuration and metadata manipulation.
Oracle Mobile Hub: ServiceDeveloper Allows typical development and test access.
Oracle Developer Cloud Service: DEVELOPER_USER Create and access DevCS projects. All users of DevCS must be assigned this role.

See Learn how to get Oracle Cloud services for Oracle Solutions to get the cloud services you need.