Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cbi-dev] Jenkins - Running a custom container

Hi CBI,

Project: Keyple

I've been trying to run a simple job on jenkins with kubernetes based on an example found here : https://wiki.eclipse.org/Jenkins#How_do_I_run_my_build_in_a_custom_container.3F

Is there a configuration needed to connect to kubernetes? I couldn't find any on the wiki.eclipse.

My job seems stuck forever. (one of my attempt last year was executed in 7days). 

Thanks for your help,
Olivier

logs shows : 
Started by user Missing name
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] podTemplate
[Pipeline] {
[Pipeline] node
Still waiting to schedule task
‘Jenkins’ doesn’t have label ‘my-agent-pod’
 ... (stuck)

Here the pipeline I'm trying to execute :

pipeline {
  agent {
    kubernetes {
      label 'my-agent-pod'
      yaml """
apiVersion: v1
kind: Pod
spec:
  containers:
  - name: maven
    image: maven:alpine
    command:
    - cat
    tty: true
"""
    }
  }
  stages {
    stage('Run maven') {
      steps {
        container('maven') {
          sh 'mvn -version'
        }
      }
    }
  }
}


Back to the top