Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Team Organization: Use the repository name in in the reference repository #865

Open
bkhouri opened this issue Jul 18, 2024 · 1 comment
Open

Comments

@bkhouri
Copy link

bkhouri commented Jul 18, 2024

What feature do you want to see added?

As a maintainer of the Team Organization job configuration, I want to be able to reference the project repository name via a variable or something so I can configure the * Advanced clone behaviours -> Path of the reference repo to use during clone* to have it point to the REPO name.

Reasoning:
We have a few large repositories in the BitBucket project which take minutes to clone. We currently hit the clone time twice (once from the Jenkins controller) and once per agent. We would like to reduce this time by cloning certain repositories on the controller and agents, and have the configuration clone from the reference repo to speed the clone times.

We have the following, simplified, jobDSL that configures the job

organizationFolder('tfo_org_folder') {
    organizations {
        bitbucket {
            serverUrl('https://bitbucket-instance.company.com')
            credentialsId('bitbucket.username.password')
            repoOwner('PROJECT_KEY')
            traits {
                cloneOption {
                    extension {
                        reference('/var/jenkins/git/reference/<REPO>')  // I want to replace <REPO> with something that references the repository
                    }
                }
            }
        }
    }
    projectFactories {
        workflowMultiBranchProjectFactory {
            scriptPath('pipelines/Jenkinsfile')
        }
    }
}

Upstream changes

No response

Are you interested in contributing this feature?

No response

@vishn9893
Copy link

Hi @bkhouri thanks for taking the time to add this enhancement feature to the thread. Would be nice if this gets upvoted more

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

No branches or pull requests

2 participants