Skip to content

Commit

Permalink
JENKINS-9791 : Display an error message if the "deploy after build" f…
Browse files Browse the repository at this point in the history
…eature is activated but the "archive artifacts" is disabled
  • Loading branch information
aheritier committed May 28, 2011
1 parent cd48b4e commit be03ace
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
Expand Up @@ -122,6 +122,14 @@ public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListene
return true;
}

if(build instanceof MavenModuleSetBuild && ((MavenModuleSetBuild)build).getParent().isArchivingDisabled()){
listener.getLogger().println("[ERROR] You cannot use the \"Deploy artifacts to Maven repository\" feature if you " +
"disabled " +
"automatic artifact archiving");
build.setResult(Result.FAILURE);
return true;
}

listener.getLogger().println("Deploying artifacts to "+url);
try {

Expand Down
Expand Up @@ -13,4 +13,8 @@
Note that regardless of this configuration, you can always manually come back
to Jenkins and deploy any of the past artifacts to any repository of your choice,
after the fact.

<p>
<b>To use this feature you shouldn't deactivate the automatic artifact archiving.</b>
</p>
</div>
Expand Up @@ -11,4 +11,9 @@
<p>
Hinweis: Unabhängig von dieser Einstellung können Sie aber auch jederzeit manuell
Artefakte aus durchgeführten Builds in beliebige Repositories ausbringen.

<p>
<b>To use this feature you shouldn't deactivate the automatic artifact archiving.</b>
</p>

</div>
Expand Up @@ -13,4 +13,8 @@
Note that regardless of this configuration, you can always manually come back
to Jenkins and deploy any of the past artifacts to any repository of your choice,
after the fact.

<p>
<b>To use this feature you shouldn't deactivate the automatic artifact archiving.</b>
</p>
</div>
Expand Up @@ -9,4 +9,8 @@

<p>
この設定を行っているかによらず、Jenkinsの画面からいつでも過去の成果物を任意のリポジトリにデプロイできます。

<p>
<b>To use this feature you shouldn't deactivate the automatic artifact archiving.</b>
</p>
</div>

0 comments on commit be03ace

Please sign in to comment.