Oracle by Example brandingConfiguring Continuous Integration and Continuous Delivery in Oracle Developer Cloud Service Classic

section 0Before You Begin

This 10-minute tutorial shows how to configure a job and a deployment configuration to enable continuous integration and continuous delivery in an Oracle Developer Cloud Service project.

Background

You can configure a job in the Oracle Developer Cloud project to run a build automatically after a commit is pushed to the project Git repository. You can also configure a deployment configuration to automatically deploy the build artifact of a job to the target Oracle Cloud service after the build is complete.

What Do You Need?


section 1Configure a Job to Run a Build Automatically

You can configure a job from the Build page to run a build when the specified source Git repository is updated.

  1. In the navigation bar of the project, click Build.
    Oracle Developer Cloud Service project navigation bar
    Description of the illustration devcs_navbar_build.png
  2. On the Jobs Overview page, click the employee-app-build job name link in the Job column.
    Jobs Overview page
    Description of the illustration devcsc_jobsoverview.png
  3. On the Job details page, click Configure.
    Jobs Details page
    Description of the illustration devcsc_jobdetails.png
  4. Click the Triggers tab, select the Based on SCM polling schedule check box, and then click Save.
    Triggers tab of Configure build job page
    Description of the illustration devcsc_jobconfig_sourcecontrol.png

section 2Configure a Job Configuration to Deploy Build Artifact Automatically

  1. In the navigation bar of the project, click Deploy.
    Oracle Developer Cloud Service project navigation bar
    Description of the illustration devcs_navbar_deploy.png
  2. In the Employees deployment configuration, click Gear gear and select Edit Configuration.
    Gear menu of a deployment configuration in the Deploy page
    Description of the illustration devcs_deployments_gearmenu.png
  3. In the Edit Configuration page, select Type as Automatic, and then click Save.
    Edit Deployment Configuration page
    Description of the illustration devcs_deployments_editconfig.png

section 2Test Continuous Integration and Continuous Delivery

  1. Clone the employee-app.git Git repository.
  2. Open the employee-app\employees-app\src\main\webapp\jsp\list-employees.jsp file in a code editor or a text editor. Change the Employees title text to My Org Employees.
    Code changes made to the list-employees.jsp file
    Description of the illustration devcs_codecompare.png
  3. Commit the file and push the commit to the project Git repository.
  4. Open the Project page of the project and verify the commit.
    Commit activity in the Project page
    Description of the illustration devcs_project_recentactivities_commit.png
  5. Wait for some time. A build of the employees-app-build job runs automatically and the activity appears on the Project page Recent Activities feed. Wait for the build to complete.
    After the build is successful, the Employees deployment configuration automatically deploys the artifact of the latest build to the target Application Container Cloud service. Wait for deployment to complete too.
    Build and deploy activities on the Project page
    Description of the illustration devcs_project_recentactivities_build&deploy.png
  6. Open the URL of the deployed application and verify the change you made to the source file.
    Updated Employees applicaiton in the web browser
    Description of the illustration devcs_updatedapp.png

more informationWant to Learn More?