The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

$class: 'YouTrackProjectProperty'

  • $class: 'YouTrackProjectProperty'
    • siteName : String
    • pluginEnabled : boolean
    • commentsEnabled : boolean
      Adds a link to the build as a comment of all issues mentioned in the commit comment
    • commandsEnabled : boolean

      Enabling makes it possible to execute commands from the VCS commit message. It is inspired by how YouTrack integrates with TeamCity, as described here. It does however not support batch commands.

      In short after #issue-id the rest of the line is interpreted as a command an sent to YouTrack. If the next line does not contain a # it will be considered as a comment to the command applied.

      An extra option in this integration is to write !#issue-id command and the command will be applied, but silently, that is, watchers of the issue will not be notified.

    • runAsEnabled : boolean
      Run the command from the commit comments as a YouTrack user with the same e-mail as the commit user. For this feature to work, the user set in the YouTrack configuration should have the "Update project" permission for the projects to run commands in.
    • annotationsEnabled : boolean
      When this setting is on the change log descriptions will be annotation with links to the mentioned YouTrack issues. The tooltip will show the description of the issue in question. The data will be fetched by the user set in the site configuration. This can cause users to see data they would not be able to see in YouTrack.
    • linkVisibility : String
      The link back to this build can be set to be visibile only for a specific YouTrack group. Empty means no specific group will be set.
    • stateFieldName : String
      Here you set the field name of the field containing the issue state
    • fixedValues : String
      Set the values that is considered fixed, this will be used in the Fixed in build buldstep
    • silentCommands : boolean
      Stops YouTrack from notifying users about the changes performed by the commands executed on all commit commands executed from this plugin.
    • silentLinks : boolean
      Checking this stops YouTrack from notifying the users about the comment link being posted to the issue.
    • executeProjectLimits : String
      This field is a comma separated list of project ids in which commands will be applied. When nothing is specified the command will be applied regardless of the project.
    • trackCommits : boolean

      Enabling this will globally store the revision ids for the comment and use this to prevent commits being processed multiple times. This is useful if there is a job per branch. The commit ids processed will be stored in Jenkins, so if the jobs for each branch is on different Jenkins intances this will not work.

      This option has to be checked for all jobs were the same commit can be in the changelog, i.e. if there is a development job and a production job, then the option has to be checked for both.

    • project : String
    • commentText : String

      The text for the comment to send to YouTrack for linking back to this build. It defaults to the URL for the build and the revision id(s) for the change(s). Setting a text here overrides that.

      The text is interpreted by the Groovy SimpleTemplateEngine, see http://groovy.codehaus.org/api/groovy/text/SimpleTemplateEngine.html .

      There are two variables available: build and entries, where build is an object of type hudson.model.AbstractBuild and entries is a list of hudson.scm.ChangeLogSet.Entry objects. Therefore a template can be something like:

          Related build: $build.absoluteUrl<% entries.each { %>
          [Change: ${it.commitId}|http://sourcecodebrowser?change=${it.commitId}]
          <% } %>
      
    • failureMode
      This property determines how to fail the build if the commands cannot be applied to YouTrack
      • Values: NONE, UNSTABLE, FAILURE
    • commentTextSecure

      The text for the comment to send to YouTrack for linking back to this build. It defaults to the URL for the build and the revision id(s) for the change(s). Setting a text here overrides that.

      The text you enter is executed as a Groovy script

      There are two variables available: build and entries, where build is an object of type hudson.model.AbstractBuild and entries is a list of hudson.scm.ChangeLogSet.Entry objects. Therefore a template can be something like:

          def result = ""
          result += "Related build: $build.absoluteUrl\n"
          entries.each {
              result += "[Change: ${it.commitId}|http://sourcecodebrowser?change=${it.commitId}]\n"
          }
          result
      
        Nested Object
      • script : String
      • sandbox : boolean
        If checked, run this Groovy script in a sandbox with limited abilities. If unchecked, and you are not a Jenkins administrator, you will need to wait for an administrator to approve the script.
      • classpath
        Additional classpath entries accessible from the script.
          Array / List of Nested Object
        • path : String
          A path or URL to a JAR file. This path should be approved by an administrator or a user with the RUN_SCRIPT permission, or the script fails. If the file or files are once approved, they are treated approved even located in another path.
        • oldPath : String (optional)
        • shouldBeApproved : boolean (optional)
      • oldScript : String (optional)

  • Was this page helpful?

    Please submit your feedback about this page through this quick form.

    Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

        


    See existing feedback here.