Do this by creating and running a Jenkins job with the following for Bash script:
$JAVA_HOME/bin/keytool -noprompt -genkeypair -alias saml-key \ -keypass changeit \ -storepass changeit \ -keystore /var/jenkins_home/saml-key.jks \ -keyalg RSA -keysize 2048 -validity 3650 \ -dname "CN=jenkins.example.cucloud.net" |