enkara
enkara

Reputation: 6349

How to move an existing job from one view to another in Jenkins?

I want to move an existing job from one view to another but I can't find the way. Is the only way to copy the job and delete it from the other view? I would like to have the same name and for my experience Jenkins doesn't handle very well the renaming of jobs.

Upvotes: 173

Views: 106989

Answers (7)

idbrii
idbrii

Reputation: 11916

New Jenkins (v2.452) looks different and in one of our views, the jobs were initially hidden:

  1. Open your View to edit.
  2. Click on "Edit View" in the left toolbar. (If not visible, you may not have permissions.)
  3. Scroll down to your jobs. If you don't see any and have a List View Section, expand Advanced, and uncheck your job.

One of our views uses "List View Section" and it contains our jobs, but they're hidden inside the advanced dropdown:

the advanced dropdown

Once expanded, you can see your job list (screenshot abbreviated -- the job list displays much longer):

the expanded advanced section

Upvotes: 0

Prasanna Ramaswamy
Prasanna Ramaswamy

Reputation: 231

In some cases, like mine, you may not find EditView. I could resolve it by clicking on the gear icon in the dashboard view and selecting 'Configure' button

enter image description here

Configure Buttton

You will then get the view edit form to select/unselect jobs


enter image description here

Upvotes: 1

jussuper
jussuper

Reputation: 3527

you can simply do it by editing the view (link "Edit view" on left side) and check/uncheck checkboxes enter image description here

Upvotes: 269

Abderrazak BOUADMA
Abderrazak BOUADMA

Reputation: 1606

since last Jenkins versions (actually using 1.651.1), there's a [Move] link on the left menu where you can simply choose the destination folder from a drop list, then you have to edit the view to include the job.

Upvotes: 3

Oleg Kaploun
Oleg Kaploun

Reputation: 327

To Remove:

  1. Click on View that you want to remove from.

  2. Click on "Edit View" in the left toolbar.

  3. Scroll down and uncheck your job (you will see "Jobs" area in the "Job Filter" section).

To Add:

Same as above, just in 3. you need to check the job you want to add to your view.

Upvotes: 27

Waqas Ahmed
Waqas Ahmed

Reputation: 5129

1) Click on the view in which you want to add the newly created Job as shown in pic.

enter image description here

2) Click on Edit View on left side and then select the appropriate job under Job Filter using the check box.

enter image description here

3) Once you selected the required Job click on save button. This job will be now shown under the view.

Upvotes: 18

Anp
Anp

Reputation: 47

All the above answers are correct. However, the checkbox will be only available if one selects "List View" while creating the new view itself. If you select "My view" instead, it may not work.

Upvotes: 2

Related Questions