Closed jlgerber closed 4 years ago
yes, please see the example in the readme : https://github.com/mockersf/jenkins-api.rs#example
Sorry. i must be pretty dense. Looking at the example, I dont see anywhere to supply an additional url. What is the method that would allow me to do this?
Sorry for the delay.
With this API, you can't supply a build URL directly, as with Jenkins add ons, there is now way to be sure that an URL is a buildable job.
You have to get the job by name from Jenkins:
let job = jenkins.get_job("job name").unwrap();
and then try to "cast" this job into a variant that can be built:
job.as_variant::<jenkins_api::job::FreeStyleProject>().unwrap()
There are existing bindings for the following job types : https://docs.rs/jenkins_api/0.5.2/jenkins_api/job/index.html
All the job types that can be built implements the trait BuildableJob
If your job is not one of those, you can either implement the Job specialisation yourself for it in you crate by implementing the traits Job
, Class
and BuildableJob
or you can tell me what kind of jobs it is and I'll try to add it to the list
I don't see a way of providing a build job's url. ie here is my build url "/view/DDPipeline/job/Plans/job/BuildTagPipeline/build" here is my server url "myserver.something.com:5000 and assume some parameters.
I have tried including it as part of the server url but that does not work...