lachie83 / croc-hunter

The infamous croc hunter game
MIT License
301 stars 359 forks source link

Can't connect to k8s cluster #94

Open trahloff opened 7 years ago

trahloff commented 7 years ago

Running the pipeline throws the error Node is not a Kubernetes node: for the step "Runing kubectl/helm tests"

PeterKneale commented 6 years ago

Same for me - ERROR: Node is not a Kubernetes node I tried removing everything but the essentials and it still happens. Any suggestions @lachie83?

#!/usr/bin/groovy

// load pipeline functions
// Requires pipeline-github-lib plugin to load library from github

@Library('github.com/lachie83/jenkins-pipeline@dev')

def pipeline = new io.estrado.Pipeline()

podTemplate(label: 'jenkins-pipeline', containers: [
    containerTemplate(name: 'jnlp', image: 'lachlanevenson/jnlp-slave:3.10-1-alpine', args: '${computer.jnlpmac} ${computer.name}', workingDir: '/home/jenkins'),
    containerTemplate(name: 'docker', image: 'docker:1.12.6', command: 'cat', ttyEnabled: true),
    containerTemplate(name: 'helm', image: 'lachlanevenson/k8s-helm:v2.6.0', command: 'cat', ttyEnabled: true),
    containerTemplate(name: 'kubectl', image: 'lachlanevenson/k8s-kubectl:v1.4.8', command: 'cat', ttyEnabled: true)
],
volumes:[
    hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock'),
]){

  node ('jenkins-pipeline') {

    container('docker') {
        println  "In docker"
    }

    container('kubectl') {
        println  "In kubectl"
    }

    container('helm') {
        println  "In helm"
    }
  }
}
salman-hayder commented 6 years ago

@PeterKneale did you solve this issue? Now I'm having same issue...

mrpity commented 5 years ago

the same... any thoughts?