Skip to content
Permalink
Browse files

For JENKINS-27516, remove semaphore

  • Loading branch information
MadsNielsen committed Apr 8, 2015
1 parent e7e028e commit effcecf63a08fd3dc4c944b6e24cb166b4e1a19f
@@ -15,7 +15,7 @@
major.minor.patch-SNAPSHOT-gitSHA (dev builds)
major.minor.patch-gitSHA (releases)
-->
<version>2.2.1</version>
<version>2.2.3-SNAPSHOT</version>
<packaging>hpi</packaging>

<developers>
@@ -52,10 +52,9 @@ public PretestedIntegrationBuildWrapper(final AbstractSCMBridge scmBridge) {
@Override
public BuildWrapper.Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener) {
logger.entering("PretestedIntegrationBuildWrapper", "setUp", new Object[] { build, listener, launcher });// Generated code DONT TOUCH! Bookmark: 369385d08e04baa778ddf826119fd65e
listener.getLogger().println( String.format("%sPreparing environment using Pretested Integration Plugin %s ", LOG_PREFIX, Jenkins.getInstance().getPlugin("pretested-integration").getWrapper().getVersion()));

listener.getLogger().println( String.format("%sPreparing environment using Pretested Integration Plugin %s ", LOG_PREFIX, Jenkins.getInstance().getPlugin("pretested-integration").getWrapper().getVersion()));
boolean proceedToBuildStep = true;
BuildQueue.getInstance().enqueueAndWait();

PretestedIntegrationAction action;
try {
// Check job configuration - there are typically requirements
@@ -79,44 +78,39 @@ public PretestedIntegrationBuildWrapper(final AbstractSCMBridge scmBridge) {
ensurePublisher(build);
} catch (IOException ex) {
logger.log(Level.WARNING, LOG_PREFIX+" "+"Failed to add publisher", ex);
BuildQueue.getInstance().release();
}
} catch (NothingToDoException e) {
build.setResult(Result.NOT_BUILT);
listener.getLogger().println(e.getMessage());
logger.log(Level.SEVERE, LOG_PREFIX + "- setUp()", e);
logger.log(Level.SEVERE, LOG_PREFIX + "- setUp()-NothingToDoException", e);
proceedToBuildStep = false;
} catch (IntegationFailedExeception e) {
build.setResult(Result.FAILURE);
listener.getLogger().println(e.getMessage());
logger.log(Level.SEVERE, LOG_PREFIX + "- setUp()", e);
logger.log(Level.SEVERE, LOG_PREFIX + "- setUp()-IntegationFailedExeception", e);
proceedToBuildStep = false;
} catch (EstablishWorkspaceException e) {
build.setResult(Result.FAILURE);
listener.getLogger().println(e.getMessage());
logger.log(Level.SEVERE, LOG_PREFIX + "- setUp()", e);
logger.log(Level.SEVERE, LOG_PREFIX + "- setUp()-EstablishWorkspaceException", e);
proceedToBuildStep = false;
} catch (NextCommitFailureException e) {
build.setResult(Result.FAILURE);
listener.getLogger().println(e.getMessage());
logger.log(Level.SEVERE, LOG_PREFIX + "- setUp()", e);
logger.log(Level.SEVERE, LOG_PREFIX + "- setUp()-NextCommitFailureException ", e);
} catch (UnsupportedConfigurationException e) {
build.setResult(Result.FAILURE);
listener.getLogger().println(e.getMessage());
logger.log(Level.SEVERE, LOG_PREFIX + "- setUp()", e);
logger.log(Level.SEVERE, LOG_PREFIX + "- setUp()-UnsupportedConfigurationException", e);
listener.getLogger().println(e.getMessage());
proceedToBuildStep = false;
} catch (Exception ex) {
build.setResult(Result.FAILURE);
listener.getLogger().println(String.format("%sUnexpected error. Check log for details", LOG_PREFIX));
logger.log(Level.SEVERE, LOG_PREFIX + "- setUp() - Unexpected error", ex);
proceedToBuildStep = false;
} finally {
//Always release the lock at the end
BuildQueue.getInstance().release();
}
}


BuildWrapper.Environment environment = new PretestEnvironment();
logger.exiting("PretestedIntegrationBuildWrapper", "setUp");
return proceedToBuildStep ? environment : null;

0 comments on commit effcecf

Please sign in to comment.
You can’t perform that action at this time.