Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

want to create a view for any new git branch and add a job to it #24

Open
sandeepbalouria opened this issue Nov 12, 2014 · 3 comments
Open

Comments

@sandeepbalouria
Copy link

Hi ,

I have four jobs on jenkins. This is the behavior i am trying to achieve.

1> create a new view (name of the view should be the new git branch) for any new git branch.
2> add my four jenkins jobs using the jobs i already have as templates .

How should i do it. Examples of git-config.yaml would be appriciated

Thanks in advance

@gvalkov
Copy link
Owner

gvalkov commented Nov 12, 2014

Hello,

I'm afraid jenkins-autojobs can only add jobs to views that already exist - it cannot create views by itself at the moment. However, it does actually make sense to have such functionality and I'll look into adding it in the coming week.

Could you elaborate a bit more on your second point? The way I understand it now is:

  1. You have four jobs - A, B, C and D.
  2. A new git branch is created - 'MyBranch'.
  3. The 'MyBranch' view is created if it didn't already exist.
  4. Jobs A, B, C, D are added to 'MyBranch'.
  5. A 'MyBranch' job is created from your template job and it is also added to the 'MyBranch' view.

I must be missing something?

Regards,
Georgi

@sandeepbalouria
Copy link
Author

Hi @gvalkov

  1. four jobs - A, B, C and D.
    These are jobs for for master branch for main git repo. These are separate jobs because they are building separate java modules with in this git repo.
    1. A new git branch is created - 'MyBranch'.
      view ==> MyBranch

3.The 'MyBranch' view is created if it didn't already exist.
view ==> MyBranch

Jobs A, B, C, D are added to 'MyBranch'.

view ==> MyBranch
four jobs ==> A-MyBranch, B-MyBranch, C-MyBranch, D-MyBranch
These jobs are created using master jobs as templates

I hope This makes more sense.

thanks,
Sandeep

@sandeepbalouria
Copy link
Author

Hi @gvalkov

I just wanted to see if this makes sense.
Ideally we should have autojobs -

  1. create view(branch name) and add jobs to the view on a new git branch detection
  2. delete view and the jobs in it if the git branch is deleted

This is what i am trying to do :-)

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants