Continuous Integration and Continuous Delivery of customizations

OpenShift Container platform provides the capability to use custom builder images and define a build process to build customized images in a Continuous Integration and Continuous Delivery (CI/CD) pipeline. Sterling Order Management Software supports CI/CD by using BuildConfig. For more information, see What Is a BuildConfig?

Before you begin

About this task

You can set up a build process that automatically triggers on pushing the extension or code changes to a linked Git repository, and builds new customized images by using the build process.


  1. Create a yaml file, for example, BuildConfig.yaml and configure all the parameters.
    kind: BuildConfig
      name: <name of the build configuration>
      namespace: <namespace for build>
      serviceAccount: <service account to be used for build>
      nodeSelector: {}
        type: Git
          uri: "<git_repository_url>"
          # URL of the Git repository that contains the customization source code and corresponding build scripts.
          name: <git_repository_clone_secret>
          # Refers to the secret for accessing the Git repository
        contextDir: <directory which contains>
        # Directoy path where file exists.
        type: Custom
          forcePull: true
          exposeDockerSocket: true
            kind: ImageStreamTag
            name: <name:tag of om-base image used for build>
            namespace: <namespace containing om-base image>
            # Ensure that OMS_RHOS_CUSTOM_BUILD is set to "true" so that the of 
            # om-base image considers this image as the base image for build.
           - name: OMS_RHOS_CUSTOM_BUILD
             value: "true"
          kind: ImageStreamTag
          name: <name:tag for output image name>
          name: <reference of secret associated to service account used for pushing image.>
      triggers: []
      lastVersion: 0
  2. Run the following command to create the BuildConfig in Red Hat OpenShift Container platform cluster.
    oc create -f BuildConfig.yaml -n <namespace>
  3. Ensure that the file is present within the configured contextDir in the Git repository.
    The following sample code illustrates file:
    # add your customization script here.
    cd /opt/ssfs/runtime/container-scripts/imagebuild
    ./ --MODE=app --WAR_FILES=smcfs --EXPORT=false
    # Add authentication to access the Red Hat OpenShift Container
    platform Docker registry. 
    # Tag and push the images to Red Hat OpenShift Container
    platform Docker registry.
    (echo "{ \"auths\": " ; sudo cat $PUSH_DOCKERCFG_PATH/.dockercfg ; echo "}") > /tmp/.dockercfg
    buildah tag om-app:10.0 ${OUTPUT_REGISTRY}/${OUTPUT_IMAGE}
    buildah push --tls-verify=false --authfile=/tmp/.dockercfg ${OUTPUT_REGISTRY}/${OUTPUT_IMAGE}
    Additionally, the following environment variables are present in with BuildConfig that you created in step 3:
    • SOURCE_SECRET_PATH - Git secret
    • OUTPUT_REGISTRY - Red Hat OpenShift Container platform Docker registry URL
    • OUTPUT_IMAGE - output image name as mentioned in output section of BuildConfig
    • PUSH_DOCKERCFG_PATH - This variable is available only if the exposeDockerSocket flag is set to true. Configure this variable to push images to Red Hat OpenShift Container platform registry by using buildah.