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

GString not supported by automatically generated DSL

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The following script will cause an error because of the GString argument to room

      def SLACK_CHANNEL = 'bar'
      
      job('example') {
        publishers {
          slackNotifier {
            room("foo-${SLACK_CHANNEL}")
            notifyAborted(true)
            notifyFailure(true)
            notifyNotBuilt(false)
            notifyUnstable(true)
            notifyBackToNormal(true)
            notifySuccess(false)
            notifyRepeatedFailure(false)
            startNotification(false)
            includeTestSummary(false)
            includeCustomMessage(false)
            customMessage(null)
            buildServerUrl(null)
            sendAs(null)
            commitInfoChoice('NONE')
            teamDomain(null)
            authToken(null)
          }
        }
      }
      

      console log:

      Processing provided DSL script
      ERROR: (script, line 6) No signature of method: javaposse.jobdsl.plugin.structs.DescribableContext.room() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [foo-bar]
      Possible solutions: wait(), dump(), any(), find(), grep(), wait(long)
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            daspilker Daniel Spilker created issue -
            daspilker Daniel Spilker made changes -
            Field Original Value New Value
            Remote Link This issue links to "Groovy script fails to call Slack notification parameter from Jenkins DSL job (Web Link)" [ 14969 ]
            rachel Rachel M. made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            rachel Rachel M. made changes -
            Assignee Daniel Spilker [ daspilker ] Rachel Moreno [ rachel ]
            rachel Rachel M. made changes -
            Resolution Not A Defect [ 7 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            daspilker Daniel Spilker made changes -
            Resolution Not A Defect [ 7 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            rachel Rachel M. made changes -
            Assignee Rachel Moreno [ rachel ] Daniel Spilker [ daspilker ]
            rachel Rachel M. made changes -
            Comment [ Oh, sorry deeply [~daspilker], I've just seen you maintain the Job DSL Plugin and I thought it was a user's problem.

            !https://s-media-cache-ak0.pinimg.com/236x/66/92/da/6692da3d184952e8dae08d024ecd0fce.jpg! ]
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            daspilker Daniel Spilker made changes -
            Link This issue is duplicated by JENKINS-39502 [ JENKINS-39502 ]
            daspilker Daniel Spilker made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              Assignee:
              daspilker Daniel Spilker
              Reporter:
              daspilker Daniel Spilker
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: