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

Pull build tools from repo specified in Jenkins #33

Open
mbilyk opened this issue Feb 20, 2019 · 3 comments
Open

Pull build tools from repo specified in Jenkins #33

mbilyk opened this issue Feb 20, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@mbilyk
Copy link
Contributor

mbilyk commented Feb 20, 2019

Currently, when you use Jenkins to pull in the build tools as a library, it pulls from the location specified as the repo in the Jenkins configuration. However, in the cloneBuildTools.groovy step it pulls the build tools from the organization that the repo going through the buildpipeline is from.

As an example, if I am trying to use Jenkins for CI on my repo called ExampleRepo located in ExampleOrg but I want to use the build tools from another organization called SeperateOrg then Jenkins will correctly pull the build tools from SeperateOrg but niveristand-custom-device-build-tools will pull the tools from ExampleOrg/niveristand-custom-device-build-tools if it exists (otherwise it throws and error)

As far as I can tell, this is because the code in niveristand-custom-device-build-tools/vars/cloneBuildTools.groovy get the organization containing the repo passing through the pipeline and uses that to clone the build tools.

It would be great if the build tools cloned from the same org specified in the Jenkins configuration.

@mbilyk
Copy link
Contributor Author

mbilyk commented Feb 20, 2019

The worked around is to fork the build tools into the org under test.

@buckd buckd added the enhancement New feature or request label Feb 20, 2019
@buckd
Copy link
Collaborator

buckd commented Feb 20, 2019

This would be nice. I looked into this awhile back and Jenkins doesn't give us a way to determine where the library was loaded from. The only variable I've found is library.vs-build-tools.version=master, where master is the branch the library is loaded from.

I have found no way to determine the URL of the loaded library.

@mbilyk
Copy link
Contributor Author

mbilyk commented Feb 20, 2019

I tried using Jenkins.instance.getAllItems and other methods from the link below to get the information. But I couldn't find anything conclusive. It also added a security threat to add that into the code, so it doesn't seem to be a good solution.

https://support.cloudbees.com/hc/en-us/articles/226941767-Groovy-to-list-all-jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants