Install Red Hat OpenShift Pipelines on latest
channel from the Operator Hub using the Openshift UI
If you want interact via cli with the pipeline you can install locally Tekton cli
To interact with the pipelines, you can download from the details of the operator installed (i.e. crc link) :
https://tkn-cli-serve-openshift-pipelines.apps-crc.testing/tkn/tkn-linux-amd64.tar.gz
The version proposed by the Operator is correctly aligned version with the tekton version.
If isn't yet created, create the project sonataflow-operator-system
oc new-project sonataflow-operator-system
kubernetes-actions
taskkubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/kubernetes-actions/0.2/raw
kubectl create -f tekton/role/cluster_role.yaml kubectl create -f tekton/role/cluster_role_binding.yaml
kubectl apply -f tekton/pipeline/kogito_serverless_operator_pipeline.yaml
kubectl apply -f tekton/pipeline/kogito_serverless_operator_pipeline_run.yaml
or with the Tekton cli:
tkn pipeline start kogito-serverless-operator-pipeline \ -w name=shared-workspace,volumeClaimTemplateFile=https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator/main/tekton/volume/persistent_volume.yaml \ -p deployment-name=kogito-serverless-operator \ -p git-url=https://github.com/kiegroup/kogito-serverless-operator.git \ -p git-revision=main \ -p IMAGE='image-registry.openshift-image-registry.svc:5000/sonataflow-operator-system/kogito-serverless-operator:latest' \ --use-param-defaults
Open the Pipeline menu under the namespace/project sonataflow-operator-system
or with the Tekton cli (use the pipeline run id):
tkn pipelinerun logs kogito-serverless-operator-pipeline-run-<id> -f -n <your-namespace>
show_workspace_content
kubectl apply -f tekton/task/show_workspace_content.yaml
show-workspace
in the pipeline after the fetch-repository
or build-image
Go to the pipeline runs and ask for a rerun of a previous pipeline run
oc create -f tekton/trigger/trigger_binding.yaml
oc create -f tekton/trigger/trigger_template.yaml
oc create -f tekton/trigger/trigger_resource.yaml
oc label namespace sonataflow-operator-system operator.tekton.dev/enable-annotation=enabled
oc create -f tekton/trigger/trigger_event_listener.yaml
oc create route reencrypt --service=el-kogito-serverless-operator-webhook --cert=tls.crt --key=tls.key --ca-cert=ca.crt --hostname=<hostname>
tkn el -n kogito-serverless-operator-pipeline ls
kubectl get pods,svc -n kogito-serverless-operator-pipeline -l eventlistener=kogito-serverless-operator-webhook
Add a webhook in your github/gitlab repo with the url of the listener on openshift
Authenticating pipelines using git secret https://docs.openshift.com/container-platform/4.12/cicd/pipelines/authenticating-pipelines-using-git-secret.html