Jenkins for Cloud CI has prod and stage deployments on PSI OpenShift 4.6. Prod jenkins has 100G persistent storage, but stage one does not have persistent storage.
$ oc login https://api.ocp-c1.prod.psi.redhat.com:6443 --token=<openshift token>
$ oc project virt-qe-3rd
$ oc create -f jslave-cloudci-prod-buildconfig-template.yaml
$ oc create -f jenkins-cloudci-prod-c1-persistent-template.yaml
$ oc login https://api.ocp-c1.prod.psi.redhat.com:6443 --token=<openshift token>
$ oc project virt-qe-3rd
$ oc process -f jenkins-cloudci-prod-c1-persistent-template.yaml | oc apply -f -
$ oc process -f jslave-cloudci-prod-buildconfig-template.yaml | oc apply -f -
Build jslave image before jenkins image because the seed job in CasC will be running on it. All of Jenkins job will be run on jslave.
Please remove all jobs to avoid duplicate job trigger if you deploy your own Jenkins for debugging
Add certificate and related files as OpenShift secret
$ oc create secret generic umb-secrets --from-file /home/foo/Documents/redhat/redhat-ci-plugin-cert
Do not configure Jenkins Credential from Jenkins, use openshift secret instead. kubernetes-credentials-provider-plugin is able to sync openshift secret with Jenkins credential.
$ oc process -f my-secret-template.yaml | oc apply -f -
NOTE: To use data
with base-64 encoded string, please do not include \n
in string
$ echo -n "you string" | base64
Use
\\\\n
to escape\n
All Json key and value must be qouted by""
and it has to be escapted by\"
All secret-Jenkins credential example can be found from here
Run/Debug your test script in CI container environment.
-
Build Jslave container locally
$ podman build -t local/jslave:latest ./jslave
-
Run Jslave locally
$ podman run -rm --name jslave -it -e ABC=foo -e XYZ=bar local/jslave:latest bash
- To support ScriptApproval on JCasC, Script Security Plugin version 1.64 or above has to be installed.