Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Commit

Permalink
Merged changes from pull-request #27
Browse files Browse the repository at this point in the history
  • Loading branch information
Karsten Kraus authored and Karsten Kraus committed Jun 30, 2017
1 parent 601157f commit 9ebdd9f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;

import static java.util.logging.Level.FINE;
import static java.util.logging.Level.SEVERE;
import static java.util.logging.Level.WARNING;

Expand Down Expand Up @@ -91,6 +92,9 @@ public void run() {
LOGGER.log(WARNING, "cannot publish build-status pending as no gitlab-connection is configured!");
} else {
try {
if (LOGGER.isLoggable(FINE)) {
LOGGER.log(FINE, "setting build-status of '" + context + "' for project " + projectId + " to " + state + "...");
}
client.changeBuildStatus(projectId, hash, state, ref, context, Jenkins.getInstance().getRootUrl() + run.getUrl(), description);
} catch (Exception e) {
LOGGER.log(SEVERE, "failed to set build-status of '" + context + "' for project " + projectId + " to " + state, e);
Expand All @@ -103,4 +107,4 @@ private GitLabApi getClient(String connectionName) {
return config != null ? config.getClient(connectionName) : null;
}
}
}
}

0 comments on commit 9ebdd9f

Please sign in to comment.