Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determining the type of Jenkins project

Tags:

jenkins

Ideally I would like to clone a jenkins project, but it is in say /dir1/dir2/dir3/dir4/dir5 and I am in /dir1/dir2/dir6/dir7/dir8 and I can "copy existing item from" but it does not offer a browse, and I don't know how to specify a project from a different directory. If someone knows, you could let me know.

In the meantime, I will just have two window open. One window displaying the current project and the other window creating a new one, and I will just copy the things over. My problem, and I bet it is very simple but I could not find out during research or else it is so simple I overlooked it ;-) Jenkins wants me to specify the type (Freestyle project, MultiJob Project, Maven project, Pipeline, etc) and I am not sure. I want to make it the same as the existing project, but I can't figure out how to tell what type the existing project is. It does check out files from SVN and build via Java.

Can someone tell me how to find out what type of project an existing maven project is?

like image 675
Tony Avatar asked Jul 12 '17 17:07

Tony


People also ask

What are the 3 types of pipelines in Jenkins?

Different Types of Jenkins CI/CD Pipelines. Scripted Pipeline. Declarative Pipeline.

What is the common project type for a build job in Jenkins?

Jenkins supports several different types of build jobs. The two most commonly-used are the freestyle builds and the Maven 2/3 builds. The freestyle projects allow you to configure just about any sort of build job: they are highly flexible and very configurable.

Which is the most flexible Jenkins project type?

But what highlights a Jenkins Freestyle project is that it lets you create general-purpose build jobs with maximum flexibility.


4 Answers

On Jenkins' Dashboard, each project type has a different icon representation on the left of the project table. For example, Folder project has a Folder icon. When you hover your mouse over the icon, it will show a tooltip that is the project type.

Jenkins Dashboard Project Type Illustration

like image 92
timcoder Avatar answered Sep 23 '22 14:09

timcoder


You can go to the script page on jenkins(http://replace_with_your_jenkins_url/script) and execute the below script:

def jenkins = Jenkins.getInstance()
def jobName = "name_of_your_job"
def job = jenkins.getItem(jobName)
println "Job type: ${job.getClass()}"
like image 29
zenith13 Avatar answered Sep 26 '22 14:09

zenith13


There is no specific tag, but if you open a project, delete button have the type of project information available. pipleline project will have "Delete Pipeline" button, maven project will have "Delete Maven Project" button and a freestyle project will only have "Delete Project" button.

In addition one should have description text about this information.

like image 20
vashishth Avatar answered Sep 26 '22 14:09

vashishth


You don't need to know the project type. Just click on 'New Item' and enter the name of the new project and enter the name of the project you want to clone from, in 'Copy from' input and click OK

like image 26
Sanu Avatar answered Sep 25 '22 14:09

Sanu