Comments (10)
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.
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.
@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.
@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.
how about providing exactly what you tried @glenns1 and I'll modify it as needed
from jenkins-plugin.
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.
hi @gabemontero
did you get a chance to look at this?
can we take it offline?
thanks
from jenkins-plugin.
@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.
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.
@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)
- Patch / Update resources HOT 9
- jenkins template using spec.clusterIP instead of spec.portalIP HOT 2
- Build output sometimes not shown in jenkins console output HOT 2
- Deployments don't work HOT 3
- Environment Variables don't respect Parameterised Builds HOT 6
- Timeout of builds HOT 3
- Unable to do openshiftTag() in pipeline HOT 1
- FR: Support of variables inside Openshift Exec HOT 9
- BUG: "Test connection" always returns "Connections successful" HOT 11
- BUG: OpenshiftExec ignores timeout HOT 12
- Confusing print statement if openshiftVerifyDeployment fails HOT 1
- okhttp binary changes break plugin when others installed HOT 11
- Externalize the CERT_FILE = "/run/secrets/kubernetes.io/serviceaccount/ca.crt"; HOT 7
- Issue with Jenkin's Verify Build OpenShift plug-in functionality HOT 9
- Declarative pipeline support? HOT 4
- openshift-client-plugin really still a "tech preview" ? HOT 3
- Jenkins throws an error when using the openhiftBuild with the buildConfig parameter HOT 3
- Resulting GDSL is Broken HOT 2
- Add deprecation warning and link to new plugin as first thing in repo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jenkins-plugin.