diff --git a/Jenkinsfiles/deploy-dev.groovy b/Jenkinsfiles/deploy-dev.groovy index dc2a532dc..babbadc9d 100644 --- a/Jenkinsfiles/deploy-dev.groovy +++ b/Jenkinsfiles/deploy-dev.groovy @@ -20,7 +20,7 @@ // See: https://docs.openshift.com/container-platform/3.9/using_images/other_images/jenkins.html for a complete list of JENKINS env vars // define constants def NAMESPACE = 'mpgxod' -def COMPONENT_NAME = 'business-create' +def COMPONENT_NAME = 'business-edit' def SOURCE_TAG = 'latest' def DEPLOY_TAG = 'dev' def PREV_TAG = "${DEPLOY_TAG}-previous" diff --git a/Jenkinsfiles/deploy-prod.groovy b/Jenkinsfiles/deploy-prod.groovy index 5b7144c1f..3e812bc04 100644 --- a/Jenkinsfiles/deploy-prod.groovy +++ b/Jenkinsfiles/deploy-prod.groovy @@ -20,7 +20,7 @@ // See: https://docs.openshift.com/container-platform/3.9/using_images/other_images/jenkins.html for a complete list of JENKINS env vars // define constants def NAMESPACE = 'mpgxod' -def COMPONENT_NAME = 'business-create' +def COMPONENT_NAME = 'business-edit' def SOURCE_TAG = 'test' def DEPLOY_TAG = 'prod' def PREV_TAG = "${DEPLOY_TAG}-previous" diff --git a/Jenkinsfiles/deploy-test.groovy b/Jenkinsfiles/deploy-test.groovy index 88e0bd25c..142a14537 100644 --- a/Jenkinsfiles/deploy-test.groovy +++ b/Jenkinsfiles/deploy-test.groovy @@ -20,7 +20,7 @@ // See: https://docs.openshift.com/container-platform/3.9/using_images/other_images/jenkins.html for a complete list of JENKINS env vars // define constants def NAMESPACE = 'mpgxod' -def COMPONENT_NAME = 'business-create' +def COMPONENT_NAME = 'business-edit' def SOURCE_TAG = 'dev' def DEPLOY_TAG = 'test' def PREV_TAG = "${DEPLOY_TAG}-previous" diff --git a/k8s/README.md b/k8s/README.md index 32d3946fa..9a348309c 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -1,26 +1,26 @@ -# Business Create UI +# Business Edit UI ## How to build the openshift environment ### Images -This repo has implemented github actions to build and push the new image into our *tools* environment in OpenShift when a PR is merged. The significance in the OpenShift environment is there's no need for a build config or build pipeline. +This repo has implemented GitHub Actions to build and push the new image into our *tools* environment in OpenShift when a PR is merged. The significance in the OpenShift environment is there's no need for a build config or build pipeline. You will still need to build the image stream (`oc create imagestream `) and create tags for *dev, test, test-previous, prod and prod-previous* (`oc tag /: /:`) ### Deployment Objects -There are 5 objects you need to create in OpenShift for the UI to run: deployment config, service, route, config map and keycloak config map. By updating the param file values in *bcrs-business-create-ui.dc-srvc-rt-cmap.param* to what you need for the OpenShift environment and running `oc process -f templates/business-edit-ui.dc-srvc-rt-cmap-kcmap.json --param-file=business-edit-ui.dc-srvc-rt-cmap-kcmap.param | oc create -f -` you will create all 5 objects. +There are 5 objects you need to create in OpenShift for the UI to run: deployment config, service, route, config map and keycloak config map. By updating the param file values in *business-edit-ui.dc-srvc-rt-cmap-kcmap.param* to what you need for the OpenShift environment and running `oc process -f templates/business-edit-ui.dc-srvc-rt-cmap-kcmap.json --param-file=business-edit-ui.dc-srvc-rt-cmap-kcmap.param | oc create -f -` you will create all 5 objects. ### Build the test/prod pipelines -1. **Setup parameters** Alter, or copy the *bcrs-entities-create-ui-build-pipeline.param* updating the values for your pipeline. -2. **Create the pipeline** process the template referencing your parameter file. `oc process -f templates/business-create-ui.pipeline.json --param-file=business-create-ui.pipeline.param | oc create -f -` -3. **Create the Jenkinsfile** this is the code that the pipeline runs. In the Jenkisnfile folder for this repo there should be 3 groovy files *deploy-dev.groovy*, *deploy-test.groovy* and *deploy-prod.groovy*. These should contain code to tag the current image of the environment to -previous and then tag the source image to the current image. Next it should verify that the new image tag triggered a new deployment. Finally, it should run any automated integration tests and report if they succeed or not. +1. **Setup parameters** Alter, or copy the *business-edit-ui.pipeline.param* updating the values for your pipeline. +2. **Create the pipeline** process the template referencing your parameter file. `oc process -f templates/business-edit-ui.pipeline.json --param-file=business-edit-ui.pipeline.param | oc create -f -` +3. **Create the Jenkinsfile** this is the code that the pipeline runs. In the Jenkinsfile folder for this repo there should be 3 groovy files *deploy-dev.groovy*, *deploy-test.groovy* and *deploy-prod.groovy*. These should contain code to tag the current image of the environment to -previous and then tag the source image to the current image. Next it should verify that the new image tag triggered a new deployment. Finally, it should run any automated integration tests and report if they succeed or not. ## Updating OpenShift Environment To update one of the OpenShift objects (such as a config map or deployment config): -1. **update the template** Alter the template containing all the objects (business-create-ui.dc-srvc-rt-cmap-kcmap.json) -2. **update the param file** Add/delete the changes you need to the params to the `business-create-ui.dc-srvc-rt-cmap-kcmap.param` file. Also update the values for each param corresponding to the environment you are updating in OpenShift +1. **update the template** Alter the template containing all the objects (business-edit-ui.dc-srvc-rt-cmap-kcmap.json) +2. **update the param file** Add/delete the changes you need to the params to the `business-edit-ui.dc-srvc-rt-cmap-kcmap.param` file. Also update the values for each param corresponding to the environment you are updating in OpenShift ##### NOTE: Do not commit the new values for the parameters into GitHub (this is viewable to the public), but do commit the new parameters so that the next person knows which values they need to look up for updating the object -3. **update the object in OpenShift** Run the oc command over the environment you are updating `oc process -f templates/business-create-ui.dc-srvc-rt-cmap-kcmap.json --param-file=business-create-ui.dc-srvc-rt-cmap-kcmap.param | oc replace -f -` +3. **update the object in OpenShift** Run the oc command over the environment you are updating `oc process -f templates/business-edit-ui.dc-srvc-rt-cmap-kcmap.json --param-file=business-edit-ui.dc-srvc-rt-cmap-kcmap.param | oc replace -f -`