Oracle Application Container Cloud Service GitHub integration allows you to deploy your applications directly from GitHub. Applications are deployed using the Oracle command line interface or REST API.
To deploy an application from GitHub, follow these steps:
Obtain the GitHub URL for the Git repository containing your application. (This would be the URL you use to
Execute a deployment command for you application (see the following sample commands).
Observe the deployment in the Oracle Application Container Cloud Console.
The GitHub integration has the following limitations.
Builds are only supported from the master branch.
Only Java SE, Java EE, and Node.js applications are supported.
Java SE and Java EE applications:
Builds are Maven based.
pom.xmlfile must be in the root directory of your master branch.
The application must have a
package.jsonfile in the root directory.
Applications must deployed using the command line interface or REST API.
Deploying Using the Command-Line Interface
To deploy your web application using the command-line interface, use the
accs push command. See psm accs push in PaaS Service Manager Command Line Interface Reference.
Example 3-16 Deploying a Java Application from a GitHub Repository by Using the Command-Line Interface
psm accs push -n MyJavaApp -r java -s Monthly \ -g https://github.com/YourGitProject/MyRepoName.git \ -m /local-path-to-manifest.json -d /local-path-to-deployment.json
After you execute the command, you are asked if the repository is public. If you answer no, you will be prompted for your user name and password for the private repository.
Two factor authentication is currently not supported.
Running the PSM command again generates a build based on the files in the repository. If the source has changed, a new version of the application is deployed.
Deploying Using the REST API
To deploy your web application using the REST API, use the
gitRepoUrl option to specify the git repository. This example shows how to deploy a Java application called
MyJavaApp by submitting a
POST request using cURL.
Example 3-17 Deploying a Node.js Application from a GitHub Repository by Using the REST API
curl -X POST -u firstname.lastname@example.org:password\ https://apaas.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain \ -H "X-ID-TENANT-NAME:ExampleIdentityDomain" \ -H "Cache-Control: no-cache" \ -H "content-type: multipart/form-data;" \ -F "name=MyNodeApp" \ -F "runtime=node" \ -F "subscription=MONTHLY" \ -F "deployment=@Local-path-to-deployment-json\deployment.json" \ -F "gitRepoUrl=https://github.com/YourGitProject/hello-world.git" \ -F "manifest=@Local-path-to-manifest-json\manifest.json" \ -F "gitUserName=YourUserName" \ -F "gitPassword=YourPassword"
gitPassword are optional. Only provide these values if your repository is private on GitHub.
Any option on the command line (such as subscription or name) takes precedence over the same option in a metadata file, if there is a difference.
For more information about the REST API, see REST API for Oracle Application Container Cloud Service.