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

MailAccount component not working with JCasC

XMLWordPrintable

      Jenkins version: Jenkins 2.506

      The extended email plugin configuration not works with JCasC.

      This its my configuration:

       

      unclassified:
        email-ext:
          adminRequiredForTemplateTesting: false
          allowUnregisteredEnabled: false
          charset: "UTF-8"
          debugMode: false
          defaultBody: |-
            $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:      Check console output at $BUILD_URL to view the results.
          defaultRecipients: "${NOTIFY_RECIPIENT}"
          defaultReplyTo: "Jenkins Admin <tes@jenkins-private.com>"
          defaultSubject: "$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!"
          defaultTriggerIds:
            - "hudson.plugins.emailext.plugins.trigger.FailureTrigger"
          mailAccount:
            credentialsId: "credentials-smtp-dev"
            smtpHost: "my.private.com"
            smtpPort: "587"
            useTls: true
          maxAttachmentSize: -1
          maxAttachmentSizeMb: -1
          precedenceBulk: false
          watchingEnabled: false

      If I use this configuration and run Jenkins in debug mode, it loads the values correctly the first time it starts. However, when I go to Manage Jenkins > System to view the configuration, the plugin is re-executed and resets to the default values (all fields are empty except for smtpPort=25). The only way to make this component work is to configure it through the UI.

       

       

            slide_o_mix Alex Earl
            diocande175 Federico
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: