A minimal sample to explain docker multistage build from OCI Devops Build pipeline

How to use the sample

  • Create an OCI Dynamic group with below rule.
ALL {resource.type = 'devopsbuildpipeline', resource.compartment.id = 'OCID OF YOUR COMPARTMENT'}
  • Create an OCI Identiy polcy with below statements.
Allow dynamic-group <NAME OF THE DYNAMIC GROUP> to manage ons-topics in compartment <NAME OF THE COMPARTMENT>

OCI Devops Setup

  • Within the build pipeline add a stage of type Managed Build.Associate with the code repo as the Primary code repository.

Test the sample

  • Add a line to README.md and push the content back to code repo .This will trigger a build job automatically.

  • Follow the build run. Here we are using a java and a js sample with multi stage docker build.The build steps and stages can be expanded /updated accordingly. This sample is made only for a demo purpose.

Contributor

  • Author: Rahul M R.
  • Collaborators : NA
  • Last release: April 2023