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

support notifications URL Source as credential store

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Job DSL notifications has no support for getting URL as string/text type credential. This is supported in UI. This is important as we have api token as part of the url query string.

      https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob-notifications

      https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/toplevel/NotificationContext.groovy 

       

      There is a workaround for this. I can use below in my jenkins CasC but from UI, users can see url as paintext. I can mask url from source code but not from jenkins UI.

      ex: 

       

      notifications {
        endpoint(url = "${Credential_stringType_name}", protocol = 'HTTP', format = 'JSON') {
          event('all')
          logLines(0)
          timeout(30000)
        }
      }
      

       

        Attachments

          Activity

          gopivalleru Gopi created issue -
          gopivalleru Gopi made changes -
          Field Original Value New Value
          Description Job DSL notifications has no support for getting URL as string/text type credential. This is supported in UI. This is important as we have api token as part of the url query string.

          [https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob-notifications]

          [https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/toplevel/NotificationContext.groovy
          Job DSL notifications has no support for getting URL as string/text type credential. This is supported in UI. This is important as we have api token as part of the url query string.

          [https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob-notifications]

          [https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/toplevel/NotificationContext.groovy

           

          There is a workaround for this. I can use below but from UI, users can see url as paintext. I can mask url from source code but not from jenkins UI.

          ex: 

           
          endpoint(url = "${Credential_stringType_name}", protocol = 'HTTP', format = 'JSON') {
          event('all')
          logLines(0)
          timeout(30000)
          }
          gopivalleru Gopi made changes -
          Description Job DSL notifications has no support for getting URL as string/text type credential. This is supported in UI. This is important as we have api token as part of the url query string.

          [https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob-notifications]

          [https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/toplevel/NotificationContext.groovy

           

          There is a workaround for this. I can use below but from UI, users can see url as paintext. I can mask url from source code but not from jenkins UI.

          ex: 

           
          endpoint(url = "${Credential_stringType_name}", protocol = 'HTTP', format = 'JSON') {
          event('all')
          logLines(0)
          timeout(30000)
          }
          Job DSL notifications has no support for getting URL as string/text type credential. This is supported in UI. This is important as we have api token as part of the url query string.

          [https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob-notifications]

          [https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/toplevel/NotificationContext.groovy

           

          There is a workaround for this. I can use below in my jenkins CasC but from UI, users can see url as paintext. I can mask url from source code but not from jenkins UI.

          ex: 

           
           endpoint(url = "${Credential_stringType_name}", protocol = 'HTTP', format = 'JSON')

          { event('all') logLines(0) timeout(30000) }
          gopivalleru Gopi made changes -
          Description Job DSL notifications has no support for getting URL as string/text type credential. This is supported in UI. This is important as we have api token as part of the url query string.

          [https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob-notifications]

          [https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/toplevel/NotificationContext.groovy

           

          There is a workaround for this. I can use below in my jenkins CasC but from UI, users can see url as paintext. I can mask url from source code but not from jenkins UI.

          ex: 

           
           endpoint(url = "${Credential_stringType_name}", protocol = 'HTTP', format = 'JSON')

          { event('all') logLines(0) timeout(30000) }
          Job DSL notifications has no support for getting URL as string/text type credential. This is supported in UI. This is important as we have api token as part of the url query string.

          [https://jenkinsci.github.io/job-dsl-plugin/#path/pipelineJob-notifications]

          [https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/toplevel/NotificationContext.groovy

           

          There is a workaround for this. I can use below in my jenkins CasC but from UI, users can see url as paintext. I can mask url from source code but not from jenkins UI.

          ex: 

           
          {code:java}
          notifications {
            endpoint(url = "${Credential_stringType_name}", protocol = 'HTTP', format = 'JSON') {
              event('all')
              logLines(0)
              timeout(30000)
            }
          }
          {code}
           

            People

            Assignee:
            daspilker Daniel Spilker
            Reporter:
            gopivalleru Gopi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: