remote-file-plugin icon indicating copy to clipboard operation
remote-file-plugin copied to clipboard

How to work with Organization folder

Open DanieleVar opened this issue 3 years ago • 0 comments

Hi, I'm using Jenkins with an Organization folder linked to my Gitea installation. This is awesome because Jenkins scan the organization and create a multibranch pipeline for each repository that I have.

Now I would to use your plugin but I don't know how to do.

I created a repository with a branch for every repositories in organization. In each branch I have a folder called same the branch of the repository.

For example, this is the struct of the organization folder:

  • Organization "Org1"
    • Repository "Repo1"
      • Branch "master"
      • Branch "Branch1"
    • Repository "Repo2"
      • Branch "master"
    • Repository ....

The repository of jenkins files is:

  • Repository "RemoteJenkinsFile"
    • Branch "Repo1"
      • folder "master"
      • folder "branch1"
    • Branch "Repo2"
      • folder "master"

I am able to specify the branch name in Script Path field with the env variable BRANCH_NAME. I throught to use the Branch Specifier to identiy the correct branch but I cannot have the repository name. There isn't in Jenkins a env variable for this value. I have think to use the env JOBS_NAME but is complete and the regex in Branch Specifier don't work.

How I can do this?

DanieleVar avatar Oct 04 '22 10:10 DanieleVar