Skip to content
This repository has been archived by the owner on Oct 12, 2020. It is now read-only.

Latest commit

 

History

History
72 lines (51 loc) · 2.16 KB

Readme.md

File metadata and controls

72 lines (51 loc) · 2.16 KB

Frontend Devops Resources

Structure

templates/
    frontend/
        frontend-build.json             // The Frontend builds to be added to tools project
        frontend-deploy.json            // Frontend deployment, to be added to application environments (dev, test, etc)
        frontend-deploy-prod.json       
    nginx-runtime/
        nginx-runtime-build.json        // nginx-runtime build to be added to tools
    yarn-builder/
        yarn-builder-build.json         // yarn-builder build to be added to tools

Pipeline

Policies

Dev

oc policy add-role-to-user system:image-puller system:serviceaccount:jag-shuber-dev:default -n jag-shuber-tools
oc policy add-role-to-user edit system:serviceaccount:jag-shuber-tools:jenkins -n jag-shuber-dev

Test

oc policy add-role-to-user system:image-puller system:serviceaccount:jag-shuber-test:default -n jag-shuber-tools
oc policy add-role-to-user edit system:serviceaccount:jag-shuber-tools:jenkins -n jag-shuber-test

Prod

oc policy add-role-to-user system:image-puller system:serviceaccount:jag-shuber-prod:default -n jag-shuber-tools
oc policy add-role-to-user edit system:serviceaccount:jag-shuber-tools:jenkins -n jag-shuber-prod

The frontend-build.json defines a build configuration for a Jenkins Pipeline which uses the (jenkinsfile)[../Jenkinsfile] in the root of the repository. This file defines our declarative pipeline, currently this is how the pipeline is structured:

  • Assemble Runtime and Builder images
  • Build Application Artifacts
  • Combine Artifacts with Runtime
  • Tag the Image as dev
  • Verify deployment in dev project
  • Wait for approval ⏱
  • Tag the Image as test
  • Verify deployment in test project
  • Wait for approval ⏱ to tag for prod
  • Tag the Image as prod

Background reading/Resources

Free OpenShift book from RedHat – good overview

Red Hat Container Development Kit

OpenShift CI/CD pieline Demos: