Openshift Jenkins CICD Deployment

Hi All,

Currently inside the Jenkins declarative pipeline we are using Openshift API , generating the token and using the command “oc login” , passing API token parameter and making the connection established to RHOS cluster.

However in this case, the Jenkins console will display the API token generated. We were asked Infra team to create service account (never expire token) and using Jenkins creds we can manage the data security. Is there any other better way to connect to Openshift cluster on the fly and deploy the apps seamlessly ?

Please advise.