Exemplo n.º 1
0
 public String getBuildServerUrl() {
   if (buildServerUrl == null || buildServerUrl == "") {
     JenkinsLocationConfiguration jenkinsConfig = new JenkinsLocationConfiguration();
     return jenkinsConfig.getUrl();
   } else {
     return buildServerUrl;
   }
 }
Exemplo n.º 2
0
 @Override
 public boolean configure(StaplerRequest sr, JSONObject formData) throws FormException {
   teamDomain = sr.getParameter("slackTeamDomain");
   token = sr.getParameter("slackToken");
   room = sr.getParameter("slackRoom");
   buildServerUrl = sr.getParameter("slackBuildServerUrl");
   sendAs = sr.getParameter("slackSendAs");
   if (buildServerUrl == null || buildServerUrl == "") {
     JenkinsLocationConfiguration jenkinsConfig = new JenkinsLocationConfiguration();
     buildServerUrl = jenkinsConfig.getUrl();
   }
   if (buildServerUrl != null && !buildServerUrl.endsWith("/")) {
     buildServerUrl = buildServerUrl + "/";
   }
   save();
   return super.configure(sr, formData);
 }