Giter VIP home page Giter VIP logo

Comments (3)

gabemontero avatar gabemontero commented on July 21, 2024

hey @Torbacka - yeah, buildConfig is suppose to work. And in fact, using the openshift sample template https://github.com/openshift/origin/blob/master/examples/jenkins/pipeline/samplepipeline.yaml, which has this in the pipeline:

      node('nodejs') {
          stage('build') {
            openshiftBuild(buildConfig: 'nodejs-mongodb-example', showBuildLogs: 'true')
          }
          stage('deploy') {
            openshiftDeploy(deploymentConfig: 'nodejs-mongodb-example')
          }
        }

works for me.

I'm at the same version of jenkins and this plugin as you.

So something else is going on.

If you want to pursue further, please provide:

  • the complete pipeline script
  • all of the job output
  • the jenkins logs

And we can debug what is going on.

Thanks.

from jenkins-plugin.

Torbacka avatar Torbacka commented on July 21, 2024

Yeah your code works fine for me. The problem seem to be that Im using declarative pipeline. When Im running it like this I get the error.

pipeline {
    agent any
    stages {
      stage('build') {
        steps {
            openshiftBuild(buildConfig: 'intagiutest', showBuildLogs: 'true')
        }
      }
      stage('deploy') {
        steps {
            openshiftDeploy(deploymentConfig: 'nodejs-mongodb-example')
        }
      }
    }
}

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 21, 2024

Yep, that is the difference @Torbacka

With declarative, the workflow engine is not longer calling https://github.com/openshift/jenkins-plugin/blob/master/src/main/java/com/openshift/jenkins/plugins/pipeline/dsl/OpenShiftBuilder.java#L120

which is where we are doing the param name mapping

A README update is in fact warranted, but rather then a generic "only use ###" it needs to be qualified around declarative vs. scripted pipelines.

I'll be submitting a PR shortly.

thanks

from jenkins-plugin.

Related Issues (20)

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.