Q:

How to run once an openshift job with configmap

I have figured how to run a one time job in openshift (alternative to docker run):
oc run my-job --replicas=1 --restart=Never --rm -ti --command /bin/true --image busybox

How can I mount a configmap into the job container? 

A:

You can use --overrides flag :
oc run my-job --overrides='
{
"apiVersion": "v1",
"kind": "Pod",
"spec": {
    "containers": [
        {
            "image": "busybox",
            "name": "mypod",
            "volumeMounts": [
                {
                    "mountPath": "/path",
                    "name": "configmap"
                }
            ]
        }
    ],
    "volumes": [
        {
            "configMap": {
                "name": "myconfigmap"
            },
            "name": "configmap"
        }
    ]
  }
}
' --replicas=1 --restart=Never --rm -ti --command /bin/true --image busybox

