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.

GitHub plugin

step([$class: 'GitHubCommitNotifier']): Set build status on GitHub commit [deprecated]

This notifier will set GH commit status. This step is DEPRECATED and will be migrated to new step in one of the next major plugin releases.
Please refer to new universal step.
  • resultOnFailure
    • Type: String
  • statusMessage (optional)
      Nested Object
    • content
      Message content that will be expanded using core variable expansion i.e. ${WORKSPACE}
      and Token Macro Plugin tokens.
      • Type: String

step([$class: 'GitHubCommitStatusSetter']): Set GitHub commit status (universal)

Using GitHub status api sets status of the commit.
  • commitShaSource (optional)
      Nested Choice of Objects
    • $class: 'BuildDataRevisionShaSource'
      Uses data-action (located at ${build.url}/git/) to determine actual SHA.
      • $class: 'ManuallyEnteredShaSource'
        Allows to define commit SHA manually.
        • sha
          Allows env vars and token macro.
          • Type: String
    • contextSource (optional)
        Nested Choice of Objects
      • $class: 'DefaultCommitContextSource'
        Uses display name property defined in "GitHub project property" with fallback to job name.
        • $class: 'ManuallyEnteredCommitContextSource'
          You can define context name manually.
          • context
            Allows env vars and token macros.
            • Type: String
      • errorHandlers (optional)
          Array / List of Nested Choice of Objects
        • $class: 'ChangingBuildStatusErrorHandler'
          • result
            • Type: String
        • $class: 'ShallowAnyErrorHandler'
        • reposSource (optional)
            Nested Choice of Objects
          • $class: 'AnyDefinedRepositorySource'
            Any repository provided by the programmatic contributors list.
            • $class: 'ManuallyEnteredRepositorySource'
              A manually entered repository URL.
              • url
                A GitHub repository URL.
                • Type: String
          • statusBackrefSource (optional)
              Nested Choice of Objects
            • $class: 'BuildRefBackrefSource'
              Points commit status backref back to the producing build page.
              • $class: 'ManuallyEnteredBackrefSource'
                A manually entered backref URL.
                • backref
                  A backref URL. Allows env vars and token macro.
                  • Type: String
            • statusResultSource (optional)
                Nested Choice of Objects
              • $class: 'ConditionalStatusResultSource'
                You can define in which cases you want to publish exact state and message for the commit. You can define multiple cases. First match (starting from top) wins. If no one matches, PENDING status + warn message will be used.
                • results
                    Array / List of Nested Choice of Objects
                  • $class: 'AnyBuildResult'
                    • message (optional)
                      • Type: String
                    • state (optional)
                      • Type: String
                  • $class: 'BetterThanOrEqualBuildResult'
                    • message (optional)
                      Allows env vars and token macro.
                      • Type: String
                    • result (optional)
                      • Type: String
                    • state (optional)
                      • Type: String
              • $class: 'DefaultStatusResultSource'
                Writes simple message about build result and duration.

              step([$class: 'GitHubSetCommitStatusBuilder']): Set build status to "pending" on GitHub commit

              • contextSource (optional)
                  Nested Choice of Objects
                • $class: 'DefaultCommitContextSource'
                  Uses display name property defined in "GitHub project property" with fallback to job name.
                  • $class: 'ManuallyEnteredCommitContextSource'
                    You can define context name manually.
                    • context
                      Allows env vars and token macros.
                      • Type: String
                • statusMessage (optional)
                    Nested Object
                  • content
                    Message content that will be expanded using core variable expansion i.e. ${WORKSPACE}
                    and Token Macro Plugin tokens.
                    • Type: String

                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.