Creation of Jenkins file from an already created Jenkins pipeline - jenkins

I have created a pipeline in Jenkins using Jenkins UI which has the stages - Download from GIT>Test>Deploy>Put Test Report in Nexus.
I am wondering is it possible to generate a Jenkins File of the already created pipeline? Please guide.
Thanks

Related

How to save jenkins builds into workspace by writing jenkins declarative pipeline

I am practicing Jenkins pipeline by reading pipeline syntax documentation, as I was going through the flow I got a question that "How to save jenkins builds into workspace by writing jenkins declarative pipeline"
All jenkins builds are saved in jobs folder inside your "Jenkins Home" directory.
Example: "jobs->jobname->builds"

How to use mongodb-document-upload plugin from jenkins in a pipeline

I am trying to connect mongodb server for a jenkins pipeline job to save all the job artifacts in mongodb.
So recently I came across this mongodb-document-upload plugin which is available in post build section for a freestyle job that helps in uploading all json artifacts to mongodb. So I want to know how to use this plugin in a pipeline job? ( Plugin works fine in a freestyle job).

Ephemeral Jenkins Pipeline Jobs from Github and Jenkinsfile

I have automated Jenkins master and slaves deployment and redeployment successfully.
I know how to manually create pipeline jobs and add github repos to use their Jenkinsfiles for the steps.
my issue is how can I automate the pipeline jobs addition to jenkins after its been destroyed and redeployed without having to manually create the pipeline jobs and point to Jenkinsfile each time.
I have seen this done before in a container environment with chef and docker when redeployed or updated it re-adds all the pipelines automatically again.
I want to not use the UI at all only to confirm job status progress and verify settings.
I would recommend looking at the JobDSL Plugin to create jobs, using a seed job to create them on initial Jenkins startup. The Jenkins Configuration-as-Code plugin can be used to setup any other configuration outside the jobs.

need jenkins file configuration to deploy application on Deployit

i was using maven Jenkins job to deploy application to Deployit. now i want manual Jenkins file to deploy using the pipeline job which refer to our jenkins created file. any suggestion?
This link contains an example on how to use a Jenkinsfile with XL Deploy (previously known as Deployit).

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