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 : String
  • statusMessage (optional)
      Nested Object
    • content : String
      Message content that will be expanded using core variable expansion i.e. ${WORKSPACE}
      and Token Macro Plugin tokens.

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 : String
          Allows env vars and token macro.
    • 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 : String
            Allows env vars and token macros.
      • errorHandlers (optional)
          Array / List of Nested Choice of Objects
        • $class: 'ChangingBuildStatusErrorHandler'
          • result : 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 : String
                A GitHub repository URL.
          • 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 : String
                  A backref URL. Allows env vars and token macro.
            • 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 : String (optional)
                    • state : String (optional)
                  • $class: 'BetterThanOrEqualBuildResult'
                    • message : String (optional)
                      Allows env vars and token macro.
                    • result : String (optional)
                    • state : String (optional)
              • $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 : String
                      Allows env vars and token macros.
                • statusMessage (optional)
                    Nested Object
                  • content : String
                    Message content that will be expanded using core variable expansion i.e. ${WORKSPACE}
                    and Token Macro Plugin tokens.

                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.