redhat-developer / jenkins-operator

Apache License 2.0
8 stars 8 forks source link

Not able to create a Jenkins custom image using Jenkins Operator #42

Open k37y opened 3 years ago

k37y commented 3 years ago

Steps to Reproduce:

  1. Install Jenkins Operator
  2. Create a custom Jenkins image as follows:
    apiVersion: jenkins.io/v1alpha2
    kind: JenkinsImage
    metadata:
    name: foo
    spec:
    from:
    name: jenkins/jenkins
    tag: lts
    plugins:
    - name: kubernetes
    to:
    registry: quay.io/<repo>
    name: jenkins-foo
    tag: latest
    secret: <push-secret>
  3. Check the registry for the image.

Actual results: The custom Jenkins image has not produced. The status shows Phase: ImageBuildSuccessful message.

Expected results: The image should be pushed to the given registry.

paulczar commented 3 years ago

I have this same image, the pod has no logs:

apiVersion: jenkins.io/v1alpha2
kind: JenkinsImage
metadata:
  name: my-first-jenkins
spec:
  from:
    name: jenkins/jenkins
    tag: lts
  plugins:
  - name: kubernetes
  to:
    name: my-first-jenkins
    registry: 'image-registry.openshift-image-registry.svc:5000/custom-jenkins'
    tag: lts
$ kubectl logs my-first-jenkins-builder
paulczar commented 3 years ago

The issue is because the image doesn't have a command, just args. If you add - command: [kaniko/executor] to the pod it will run and have logs.

SteveKeller commented 3 years ago

Same problem here, pod gets started and ImageBuildSuccessful message shows up. Nothing happens afterwards, no logs no error.

Jenkins Operator: v0.7.1 Openshift: 4.7.19