You may fork this repo and make edit to the
application-deployment/homeoffice/homeoffice-ingress/transformer-patches.yaml
in for GitOps or argocd Create Projects
oc new-project quarkuscoffeeshop-cicd
oc new-project quarkuscoffeeshop-homeoffice
oc adm policy add-role-to-user admin system:serviceaccount:quarkuscoffeeshop-homeoffice:pipeline -n quarkuscoffeeshop-cicd
oc policy add-role-to-group system:image-puller system:serviceaccounts:quarkuscoffeeshop-homeoffice -n quarkuscoffeeshop-cicd
oc adm policy add-role-to-user admin system:serviceaccount:quarkuscoffeeshop-cicd:pipeline -n quarkuscoffeeshop-homeoffice
Run the kustomize command to deploy pipelines
kustomize build homeoffice-ingress | oc create -f -
Update Environment Variables in deployment
oc edit deployment.apps/homeoffice-ingress
See triggerbinding-configs before going to next step
NOTE: Every Git server has its own properties, but basically you want to provide the ingress url for our webhook and when the Git server should send the hook. E.g: push events, PR events, etc.
- Go to your application repository on GitHub, eg: https://github.com/quarkuscoffeeshop/homeoffice-ingress
- Click on
Settings
->Webhooks
- Create the following
Hook
Payload URL
: Output of commandoc -n quarkuscoffeeshop-cicd get route homeoffice-ui-webhook -o jsonpath='https://{.spec.host}'
Content type
: application/jsonSecret
: v3r1s3cur3cat saved-secert.txt
Events
: Check Push Events, leave others blankActive
: Check itSSL verification
: Check Disable- Click on
Add webhook
Create Webhook for HomeOffice Ingress
oc -n quarkuscoffeeshop-cicd create -f ./homeoffice-ingress/webhook.yaml
Create HomeOffice Ingress Webhook
oc -n quarkuscoffeeshop-cicd create route edge homeoffice-ui-webhook --service=el-homeoffice-ui-webhook --port=8080 --insecure-policy=Redirect
oc -n quarkuscoffeeshop-cicd get route homeoffice-ui-webhook -o jsonpath='https://{.spec.host}'
configure pvc
oc -n quarkuscoffeeshop-cicd create -f homeoffice-ingress/pvc/pvc.yml
oc -n quarkuscoffeeshop-cicd create -f ./homeoffice-ingress/pvc/maven-source-pvc.yml
configure Tasks
oc -n quarkuscoffeeshop-cicd create -f ./common-functions/tasks/git-clone.yaml
oc -n quarkuscoffeeshop-cicd create -f ./common-functions/tasks/openshift-client-task.yaml
oc -n quarkuscoffeeshop-cicd create -f ./common-functions/tasks/maven.yaml
Configure push image to quay task
oc -n quarkuscoffeeshop-cicd create -f ./homeoffice-ingress/tektontasks/pushImageToQuay.yaml
configure Resources
oc -n quarkuscoffeeshop-cicd create -f ./homeoffice-ingress/resources/git-pipeline-resource.yaml
oc -n quarkuscoffeeshop-cicd create -f ./homeoffice-ingress/resources/image-pipeline-resource.yaml
Create Pipeline
oc -n quarkuscoffeeshop-cicd create -f ./homeoffice-ingress/pipeline/deploy-pipeline.yaml
oc new-project quarkuscoffeeshop-homeoffice
oc adm policy add-role-to-user admin system:serviceaccount:quarkuscoffeeshop-homeoffice:pipeline -n quarkuscoffeeshop-cicd
oc policy add-role-to-group system:image-puller system:serviceaccounts:quarkuscoffeeshop-homeoffice -n quarkuscoffeeshop-cicd
oc adm policy add-role-to-user admin system:serviceaccount:quarkuscoffeeshop-cicd:pipeline -n quarkuscoffeeshop-homeoffice
oc project quarkuscoffeeshop-homeoffice
oc create -f application-deployment/homeoffice/homeoffice-ingress/ -n quarkuscoffeeshop-homeoffice
oc expose service/homeoffice-ingress -n quarkuscoffeeshop-homeoffice
Update Environment Variables in deployment
oc edit deployment.apps/homeoffice-ingress