Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
code reuse, no need to register runners explicitly as agent searches …
…for runner implementations
- Loading branch information
Showing
with
86 additions
and 193 deletions.
- +0 −1 nuget-agent/src/META-INF/build-agent-plugin-nuget-install.xml
- +0 −1 nuget-agent/src/META-INF/build-agent-plugin-nuget-pack.xml
- +0 −1 nuget-agent/src/META-INF/build-agent-plugin-nuget-publish.xml
- +0 −1 nuget-agent/src/META-INF/build-agent-plugin-nuget.xml
- +64 −0 nuget-agent/src/jetbrains/buildServer/nuget/agent/runner/NuGetRunnerBase.java
- +10 −35 nuget-agent/src/jetbrains/buildServer/nuget/agent/runner/install/PackagesInstallerRunner.java
- +0 −31 ...-agent/src/jetbrains/buildServer/nuget/agent/runner/install/PackagesInstallerRunnerRegistrar.java
- +6 −31 nuget-agent/src/jetbrains/buildServer/nuget/agent/runner/pack/PackRunner.java
- +0 −31 nuget-agent/src/jetbrains/buildServer/nuget/agent/runner/pack/PackRunnerRegistrar.java
- +6 −30 nuget-agent/src/jetbrains/buildServer/nuget/agent/runner/publish/PackagesPublishRunner.java
- +0 −31 nuget-agent/src/jetbrains/buildServer/nuget/agent/runner/publish/PackagesPublishRunnerRegistrar.java
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -6,6 +6,5 @@ | ||
default-autowire="constructor"> | ||
|
||
<bean class="jetbrains.buildServer.nuget.agent.runner.pack.PackRunner"/> | ||
|
||
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -6,6 +6,5 @@ | ||
default-autowire="constructor"> | ||
|
||
<bean class="jetbrains.buildServer.nuget.agent.runner.publish.PackagesPublishRunner"/> | ||
|
||
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright 2000-2011 JetBrains s.r.o. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package jetbrains.buildServer.nuget.agent.runner; | ||
|
||
import com.intellij.openapi.diagnostic.Logger; | ||
import jetbrains.buildServer.agent.AgentBuildRunner; | ||
import jetbrains.buildServer.agent.AgentBuildRunnerInfo; | ||
import jetbrains.buildServer.agent.BuildAgentConfiguration; | ||
import jetbrains.buildServer.nuget.agent.commands.NuGetActionFactory; | ||
import jetbrains.buildServer.nuget.agent.parameters.PackagesParametersFactory; | ||
import jetbrains.buildServer.nuget.common.DotNetConstants; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
/** | ||
* @author Eugene Petrenko (eugene.petrenko@gmail.com) | ||
* Date: 23.08.11 18:32 | ||
*/ | ||
public abstract class NuGetRunnerBase implements AgentBuildRunner, AgentBuildRunnerInfo { | ||
protected final Logger LOG = Logger.getInstance(getClass().getName()); | ||
|
||
protected final NuGetActionFactory myActionFactory; | ||
protected final PackagesParametersFactory myParametersFactory; | ||
|
||
public NuGetRunnerBase(NuGetActionFactory actionFactory, PackagesParametersFactory parametersFactory) { | ||
myActionFactory = actionFactory; | ||
myParametersFactory = parametersFactory; | ||
} | ||
|
||
@NotNull | ||
public AgentBuildRunnerInfo getRunnerInfo() { | ||
return this; | ||
} | ||
|
||
@NotNull | ||
public abstract String getType(); | ||
|
||
public boolean canRun(@NotNull BuildAgentConfiguration agentConfiguration) { | ||
if (!agentConfiguration.getSystemInfo().isWindows()) { | ||
LOG.warn("NuGet packages installer available only under windows"); | ||
return false; | ||
} | ||
|
||
if (!agentConfiguration.getConfigurationParameters().containsKey(DotNetConstants.DOT_NET_FRAMEWORK_4_x86)) { | ||
LOG.warn("NuGet requires .NET Framework 4.0 x86 installed"); | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.