Giter VIP home page Giter VIP logo

Comments (10)

gabemontero avatar gabemontero commented on July 2, 2024

Thanks for the interest @etsauer , but we are not taking on new enhancements for this plugin, as https://github.com/openshift/jenkins-client-plugin is now our strategic direction for openshift/jenkins integration from pipelines.

You can in fact perform binary builds with the openshift.startBuild(...) directive with that plugin.

from jenkins-plugin.

glenns1 avatar glenns1 commented on July 2, 2024

Thanks @gabemontero - I know this is close, but it is not clear how to push a binary image (--from-file) through the openshift Jenkins plugin using 'openshift.startBuild(...)'. please elaborate.

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 2, 2024

@glenns1 use existing pipeline function like https://jenkins.io/doc/pipeline/steps/pipeline-utility-steps/#code-findfiles-code-find-files-in-the-workspace to find the binary file in your pipeline's workspace to find the fully qualified path of your binary file. Supply the right path as the value for --from-file in the args you pass to startbuild

from jenkins-plugin.

glenns1 avatar glenns1 commented on July 2, 2024

@gabemontero Thanks for this feedback. I tried running that command, but not clear on the syntax and was failing. if you have an example with the --from-file option for a start build equivalent please?

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 2, 2024

how about providing exactly what you tried @glenns1 and I'll modify it as needed

from jenkins-plugin.

glenns1 avatar glenns1 commented on July 2, 2024

Thanks @gabemontero
Is there a way to take this offline?

This is what I use for pipeline script:

node(label 'ocpmaster'
{
stage 'gatherFiles'
def files = findFiles(glob: '**/*.jar') echo """${files[0].name} ${files[0].path} ${files[0].directory} ${files[0].length} ${files[0].lastModified}"""
}

from jenkins-plugin.

glenns1 avatar glenns1 commented on July 2, 2024

hi @gabemontero
did you get a chance to look at this?
can we take it offline?
thanks

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 2, 2024

@glenns1 how did you take the file gathering above and supply it to the openshift.startBuild(...) call?

Can you supply that syntax as well, and any error logs that may have occurred when you try it.

Lastly, are you famiilar with binary builds in general ... are you able to do them from the command line via the oc cli? See https://docs.okd.io/latest/dev_guide/builds/build_inputs.html#binary-source if you are unfamiliar.

Also, sorry, but I want to keep the discussion here, for other's benefits, including some new devs for the client plugin function.

@waveywaves fyi ^^

from jenkins-plugin.

glenns1 avatar glenns1 commented on July 2, 2024

Hi @gabemontero

I am familiar with and using the binary builds. I currently use this:
oc start-build my-openjdk-app --from-file=/home/executable-sample-jar.jar

But I wish to run it in a Jenkins pipeline:
openshiftBuild(namespace: 'development', buildConfig: 'my-openjdk-app', showBuildLogs: 'true')

Therefore, I require the --from-file option, which is how I got to needing:
def files = findFiles(glob: '**/*.jar') echo """${files[0].name} ${files[0].path} ${files[0].directory} ${files[0].length} ${files[0].lastModified}"""

The error from running this stage:
[Pipeline] stage (definefiles)
Using the β€˜stage’ step without a block argument is deprecated
Entering stage definefiles
Proceeding
[Pipeline] findFiles
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
/var/jenkins/workspace/testpipeline does not exist.
at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:483)
at hudson.FilePath.glob(FilePath.java:1759)
at hudson.FilePath.access$1700(FilePath.java:196)

Thanks

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 2, 2024

@glenns1 ok we may not be on the same page here.

Earlier you mentioned openshift.startBuild(..) from the jenkins-client plugin.
But your last comment mentions
openshiftBuild which is for this plugin. This plugin is deprecated in favor of https://github.com/openshift/jenkins-client-plugin

We are not adding support for binary builds in this plugin.

Did you try it with the client-plugin? Can you provide the pipeline code and full log results when you tried it using the client plugin?

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.