JetBrains / teamcity-deployer-plugin

Deployer plugin for TeamCity CI server
http://confluence.jetbrains.net/display/TW/Deployer+plugin
Apache License 2.0
39 stars 29 forks source link

Add an option in the SMB deployer to deploy artifacts defined in General #82

Open chigeroo opened 8 years ago

chigeroo commented 8 years ago

It would be nice to have a checkbox that allows a user to indicate whether they want the artifacts in the General Settings tab deployed to the Target URL (of course in the structure defined in Artifact paths in General). That way users who are using the same artifacts as dependencies for other build configurations can deploy them to an SMB share without having to re-define them in the SMB Deployer's artifacts path. Example screenshot attached.

I have written some sample code to do this if it will help:

String generalArtifactPath = buildRunnerContext.getBuild().getArtifactsPaths();

ArtifactsBuilder generalArtifactsBuilder=null;
if(includeArtifactPath && generalArtifactPath!=null)
{
    generalArtifactsBuilder=GetArtifactsBuilderForPath(agentRunningBuild, preprocessors, generalArtifactPath);
}

List<ArtifactsCollection> artifactsCollections = new ArrayList<ArtifactsCollection>();
List<ArtifactsCollection> generalArtifactsCollections = new ArrayList<ArtifactsCollection>();
if(artifactsBuilder!=null)
{
    artifactsCollections.addAll(artifactsBuilder.build());
}
if(generalArtifactsBuilder!=null)
{
    generalArtifactsCollections.addAll(generalArtifactsBuilder.build());
}

2016-06-03 17_01_13-artifacts from general