Jenkins kubernetes Client

86 views
Skip to first unread message

Sudha Subramanian

unread,
Mar 30, 2017, 12:30:52 AM3/30/17
to Jenkins Users
Hi,

I'm trying to run Jenkins in kubernetes with 'kubernetes-client' plugin for dynamic slaves. I get the following error:

Caused by: java.text.ParseException: failed to load settings from jar:file:/var/jenkins_home/war/WEB-INF/lib/groovy-all-2.4.7.jar!/groovy/grape/defaultGrapeConfig.xml: impossible to add configured child for ivy on class org.apache.ivy.plugins.resolver.FileSystemResolver: ivy pattern must be absolute: ?/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml


The same Jenkins image runs on my mac without any issues. Has anyone encountered this issue running Jenkins in Kubernetes with the client plugin enabled?

Thanks,
Sudha

Knurek

unread,
Mar 31, 2017, 3:14:38 AM3/31/17
to Jenkins Users
I recently setup jenkins using the `kubernetes-plugin` and didn't have any issues like this.
Where/when do you get this error? what's your kubernetes yaml file look like?

Sudha Subramanian

unread,
Mar 31, 2017, 7:35:18 PM3/31/17
to Jenkins Users
This is the core part of my jenkins.yml file
 

 containers:

    - name: jenkins-tnrp-master

      image: tnrp/jenkins:2.32.3

      ports:

      - containerPort: 8080

      - containerPort: 50000

      resources:

        limits: { cpu: "10", memory: "20Gi" }

        requests: { cpu: "10", memory: "20Gi" }

      volumeMounts:

        - mountPath: /var/jenkins_home

          name: jenkins-data

      livenessProbe:

        httpGet:

          path: /

          port: 8080

        initialDelaySeconds: 5

    volumes:

      - name: jenkins-data

        emptyDir: {}



I get this error when it is trying to start Jenkins. My Dockerfile for creating the jenkins image looks like this:

FROM jenkins


RUN /usr/local/bin/install-plugins.sh kubernetes:0.11 workflow-aggregator:2.5 credentials-binding:1.10 git:3.2.0 \

    && mkdir -p /usr/share/jenkins/ref/secrets/ \

    && echo "false" > /usr/share/jenkins/ref/secrets/slave-to-master-security-kill-switch



# ENV VERSION 0.4-SNAPSHOT

# COPY target/kubernetes.hpi /usr/share/jenkins/ref/plugins/kubernetes.hpi

# RUN curl -o /usr/share/jenkins/ref/plugins/kubernetes.hpi \

http://repo.jenkins-ci.org/snapshots/org/csanchez/jenkins/plugins/kubernetes/0.4/kubernetes-$VERSION.hpi


# remove executors in master

COPY src/main/docker/master-executors.groovy /usr/share/jenkins/ref/init.groovy.d/

Knurek

unread,
Apr 3, 2017, 3:47:47 AM4/3/17
to Jenkins Users
ah, ok so you're using a custom jenkins image. I assume you don't get this error when using the generic jenkins image? and then does it work ok if you take out the install-plugins script from your custom image? 
(to be honest, I don't have any experience with this approach or this error, just trying to help you pinpoint what the actual problem is)
Reply all
Reply to author
Forward
0 new messages