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

Support workspace cloaking through a delimited list of server paths #28

Closed
wants to merge 3 commits into from

Conversation

ajalexander
Copy link
Contributor

This change adds support for cloaking in the TFS workspaces. Along with providing the server path, a delimited list of server paths can optionally be included for cloaking. During workspace creation, each of the cloak paths are cloaked after the workspace is initially mapped.

This should resolve JENKINS-4709.

For those wanting to specify multiple paths without changing the folder name or relative layout of the files, this also handles JENKINS-4542 and JENKINS-11007.

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@ajalexander
Copy link
Contributor Author

@olivierdagenais In reference to bd98b91 you indicated that a new release might be on its way. Will feature pull requests (such as this one) be included in that release? Is there anything I can do to help get this PR included?"

@mrcaron
Copy link

mrcaron commented Feb 5, 2015

I'm very interested to see this PR come through. It's a big item for my team and I'm using @ajalexander's repo until the jenkins team integrates his changes.

@olivierdagenais
Copy link
Member

Sorry for the very long delay; when I first got commit access to this project, I had been only tackling my immediate needs at $DAYJOB.

I am planning to review these changes for release 3.3.0.

@olivierdagenais olivierdagenais self-assigned this Mar 14, 2015
@mrcaron
Copy link

mrcaron commented Mar 16, 2015

Awesome!

@mmitche
Copy link

mmitche commented Jun 9, 2015

Any plans on getting this merged? This is a big request for my team too :)

@olivierdagenais
Copy link
Member

Yes, all in good time. Please stand by.

@mmitche
Copy link

mmitche commented Jul 9, 2015

It seems that it might be better to have this be a more general mapping feature (selective cloaking and syncing). The issue here is that in really large repositories, it's a lot easier to start with "I need X, Y and Z" in general, but "don't sync X\A or Y\B".

I may end up having to do this feature for the Jenkins instance I'm bringing up. I may lay most of the work on top of this sem's PR.

@ajalexander
Copy link
Contributor Author

@mmitche Are you proposing a different (or additional) way to configure what is mapped while still using the same cloaking mechanism behind the scene? Or did you have a different idea of how you planned to setup the workspace mapping?

@mmitche
Copy link

mmitche commented Jul 17, 2015

I think I'd like to have a general workspace mapping (would require changes to the cloaking code in the PR) so the synced folders were defined more closely to the way the TFS defines them (sync X, Y and Z but not Z/Y or X/Q), rather than syncing everything under a project (which is just a TFS folder) except for what we cloak.

The issue is that for really big projects, the list of things cloaked can be much larger than a list of selective maps and cloaks.

@mahsoud
Copy link

mahsoud commented Aug 24, 2015

@ajalexander this change works great in our environment. Thank you.

@@ -178,7 +197,7 @@ private String substituteBuildParameter(Run<?,?> run, String text) {
public boolean checkout(AbstractBuild<?, ?> build, Launcher launcher, FilePath workspaceFilePath, BuildListener listener, File changelogFile) throws IOException, InterruptedException {
Server server = createServer(new TfTool(getDescriptor().getTfExecutable(), launcher, listener, workspaceFilePath), build);
try {
WorkspaceConfiguration workspaceConfiguration = new WorkspaceConfiguration(server.getUrl(), getWorkspaceName(build, Computer.currentComputer()), getProjectPath(build), getLocalPath());
WorkspaceConfiguration workspaceConfiguration = new WorkspaceConfiguration(server.getUrl(), getWorkspaceName(build, Computer.currentComputer()), getProjectPath(build), cloakPaths, getLocalPath());
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cloakPaths here should have its build variables replaced.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new version of this (PR #60) does the build variable replacement.

@ajalexander
Copy link
Contributor Author

This PR has been obsoleted by PR #60 (which uses the Java SDK to accomplish the same goal).

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

Successfully merging this pull request may close these issues.

6 participants