Package com.atlassian.bamboo.builder

Examples of com.atlassian.bamboo.builder.BuildState


   */
  @Override
  public void sendNotification(Notification notification) {
    Event event = notification.getEvent();
    ResultsSummary result = getResultSummary(event);
    BuildState buildState = result.getBuildState();
    String committersText = createCommittersText(result);
    try {
      client.startInteractiveMode();
      KarotzActionPublisher actionPublisher = new KarotzActionPublisher(client);
      String message = "";
      if (buildState.equals(BuildState.FAILED)) {
        message = String.format("Bild ist fehlgeschlagen. %s.", committersText);
        changeLight(actionPublisher, RED);
        playSound(actionPublisher, FAILED_SOUND, 42000);
      } else if (buildState.equals(BuildState.SUCCESS)) {
        message = String.format("Bild war erfolgreich. %s.", committersText);
        changeLight(actionPublisher, GREEN);
        playSound(actionPublisher, SUCCESS_SOUND, 24000);
      } else if (buildState.equals(BuildState.UNKNOWN)) {
        message = String.format("Bild Resultat ist unbekannt. %s.", committersText);
        changeLight(actionPublisher, BLUE);
        playSound(actionPublisher, UNKNOWN_SOUND, 23000);
      }
      actionPublisher.performAction(new SpeakAction(message, LANGUAGE));
View Full Code Here

TOP

Related Classes of com.atlassian.bamboo.builder.BuildState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.