Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-5692

Manual promotion : Bad build number and project name in ext-email

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • promoted-builds-plugin
    • None
    • Hudson 1.343, using email-ext plugin

      I suppose this is compatibility problem with the plugin email-ext.
      What occurs is the following :

      Mail title : 5 » promotion » Promo1 - Build # 5 - Building!
      Mail body : 5 » promotion » Promo1 5

      email-ext config title : $DEFAULT_SUBJECT
      emain-ext config body : $PROJECT_NAME $BUILD_NUMBER

      I tried to set a variable like you did with PROMOTED_URL using the following but I failed (Indeed, PROMOTED_URL is not resolved)

      In Promotion.java:67
      <code>
      @Override
      public EnvVars getEnvironment(TaskListener listener) throws IOException, InterruptedException

      { EnvVars e = super.getEnvironment(listener); String rootUrl = Hudson.getInstance().getRootUrl(); e.put("PROMOTED_NAME","nameTest"); e.put("PROMOTED_NUMBER",Integer.toString(targetBuildNumber)); if(rootUrl!=null) e.put("PROMOTED_URL",rootUrl+getTarget().getUrl()); return e; }

      </code>

            petehayes Peter Hayes
            tdutreui tdutreui
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: