Giter VIP home page Giter VIP logo

index2018's People

Contributors

davidcurrie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

index2018's Issues

Pad has unbound Persistant Volume Claims

I am facing this issue, when executing overrides.yaml, pod status is pending. When I describe pod it gives follwoing error.
pod has unbound PersistantVolumeClaims
helm-jenkins

Timeout Problem

Hi David,

I was running the script beforehand it was working. Now it is giving me timeout when last helm command is executed.

podTemplate(

label: 'mypod', 

inheritFrom: 'default',

containers: [

    containerTemplate(

        name: 'golang', 

        image: 'golang:1.10-alpine',

        ttyEnabled: true,

        command: 'cat'

    ),

    containerTemplate(

        name: 'docker', 

        image: 'docker:18.02',

        ttyEnabled: true,

        command: 'cat'

    ),

    containerTemplate(

        name: 'helm', 

        image: 'ibmcom/k8s-helm:v2.6.0',

        ttyEnabled: true,

        command: 'cat'

    )

],

volumes: [

    hostPathVolume(

        hostPath: '/var/run/docker.sock',

        mountPath: '/var/run/docker.sock'

    )

]

) {

node('mypod') {

    def commitId

    stage ('Extract') {

        checkout scm

        commitId = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()

    }

    stage ('Build') {

        container ('golang') {

            sh 'CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .'

			sh 'ls -ltr'

        }

    }

    def repository

    stage ('Docker') {

        container ('docker') {

		    withCredentials([[$class: 'UsernamePasswordMultiBinding',

					credentialsId: '123456',

					usernameVariable: 'DOCKER_HUB_USER',

					passwordVariable: 'DOCKER_HUB_PASSWORD']]) {

				sh "docker build -t ${env.DOCKER_HUB_USER}/demo:${env.BUILD_NUMBER} ."

				sh "docker login -u ${env.DOCKER_HUB_USER} -p ${env.DOCKER_HUB_PASSWORD} "

				sh "docker push ${env.DOCKER_HUB_USER}/demo:${env.BUILD_NUMBER} "

			}

        }

    }

    stage ('Deploy') {

        container ('helm') {

		    withCredentials([[$class: 'UsernamePasswordMultiBinding',

					credentialsId: '123456',

					usernameVariable: 'DOCKER_HUB_USER',

					passwordVariable: 'DOCKER_HUB_PASSWORD']]){	

                sh "/helm init --client-only --skip-refresh"

                sh "/helm upgrade --install --wait --set image.repository=${env.DOCKER_HUB_USER}/demo,image.tag=${env.BUILD_NUMBER} demo hello"

			}

        }

    }

}

}

Logs of Jenkins:

  • /helm init --client-only --skip-refresh
    Creating /home/jenkins/.helm
    Creating /home/jenkins/.helm/repository
    Creating /home/jenkins/.helm/repository/cache
    Creating /home/jenkins/.helm/repository/local
    Creating /home/jenkins/.helm/plugins
    Creating /home/jenkins/.helm/starters
    Creating /home/jenkins/.helm/cache/archive
    Creating /home/jenkins/.helm/repository/repositories.yaml
    $HELM_HOME has been configured at /home/jenkins/.helm.
    Not installing Tiller due to 'client-only' flag having been set
    Happy Helming!
    [Pipeline] sh
  • /helm upgrade --install --wait --set image.repository=****/demo,image.tag=3 demo hello
    Release "demo" does not exist. Installing it now.
    Error: release demo failed: timed out waiting for the condition
    [Pipeline] }
    [Pipeline] // withCredentials
    [Pipeline] }
    [Pipeline] // container
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] }
    [Pipeline] // node
    [Pipeline] }
    [Pipeline] // podTemplate
    [Pipeline] End of Pipeline
    ERROR: script returned exit code 1
    Finished: FAILURE

Problem in running the script

Hi,
I am facing problem in running the code. When I run on the Jenkins , I get below error:

  • docker build -t :80/hello:be6c2d1 .
    invalid argument ":80/hello:be6c2d1" for "-t, --tag" flag: invalid reference format
    See 'docker build --help'.
    Can anybody please help ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.