Equivalent of the build step for the Job DSL plugin? - jenkins

The Pipeline: Build Step plugin. i.e. here:
https://plugins.jenkins.io/pipeline-build-step/
and https://www.jenkins.io/doc/pipeline/steps/pipeline-build-step/
has build.
What would be the equivalent with the Job DSL Plugin?

Related

Jenkins Fan-In Plug-in Job DSL Configure Block

The Jenkins Fan-In Plugin is not natively supported by the Jenkins Job DSL Plugin.
I need a Job DSL Configure Block to be able to add a Fan-In Plugin to my existing Job DSL groovy scripts.

Jenkins build history for all jobs

I'am using Jenkins and I would like to have statistics of all builds executions.
I'am already using the plugin "build-metric" but pipeline jobs are not included in the statistics.
How to include pipeline jobs in the result of this plugin ? Or do you know an another plugin which include pipeline job ?

point to Git repository as source for Jenkins Job DSL job?

I have the option of file system or embedded script - how can I point to a Git repo?
I am asking specifically about the Job DSL not Multibranch Pipelines.
Just add a standard SCM step to your job configuration. In that step, check out the needed repository and branch that contains the DSL script.
The "DSL Scripts" argument then has to point to the script that you checked out in that step.
I don't think you can point it to a git repo using the Process Job DSLs build step. Instead if you use Job DSL in a pipeline script as described here you can check out the repo first on to your job workspace and use the DSL script as target in your jobDsl build step

Diffrence between buildflow, multijob and pipeline plugin

what is the difference between buildflow, multijob and pipeline plugin.
If i have jobs need to run on the same node sequentially, which one should i use and why?
I have some parameters that are to be shared by all the jobs. I can do it using multijob and build flow also. which one is preferable?
I am confused.
Use the Pipeline plugin.
From the Build Flow plugin page:
"Deprecated: Users should migrate to https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin"
If you're starting from scratch, the answer is basically the same for the Multijob plugin (prefer the pipeline plugin). The Multijob plugin was created pre-jenkins-2, and the pipeline plugin has implemented much of its functionality. Pipeline is one of the default plugins and is being actively maintained by multiple developers. Here is someone migrating from Multijob to Pipeline in 2016.

Build a Freestyle project using Jenkins Pipeline Job

I am trying to build a code which doesn't have a pom.xml. Also i want to deploy the same to artifactory. Is there a way to build such a project using pipeline job. I can use freestyle job for building the above project. But I was hoping if there is some way to achieve the same in pipeline job. Also I require the groovy script details for artifactory deployment of such kind of project in pipeline job. But the basic question I have is this even feasible?
UPDATE:
We have a freestyle project job in whcih which we package our freestyle code into .tar and then deploy to artifactory using Generic Artifactory Configuration.
Now I am trying to achieve the same using a pipeline job. I get the point that we can use shell script inside Groovy and can build a tar package but how to deploy the tar package to Artifactory using Pipeline job.
if you have only 1 file , you can use maven deploy option , and upload the file.
http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html

Resources