Skip to content
Permalink
Browse files
JENKINS-9791 : Display an error message if the "deploy after build" f…
…eature is activated but the "archive artifacts" is disabled

Originally-Committed-As: be03ace384755b785b5d625817a4d8c3de23f308
  • Loading branch information
aheritier committed May 28, 2011
1 parent 96be2df commit 8ef5964fe309a9b2954dc1dc02d0616d2b0a9ef8
@@ -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 {

@@ -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>
@@ -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>
@@ -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>
@@ -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 8ef5964

Please sign in to comment.