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

Plugin should expose environment variables to tell how many times naginator has restarted the build

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have naginator restarting my build 5 times, after the 5th and final try I need to know that it was the last time it was going to try, so I can do other steps. I would like either naginator to do these steps, or expose an environment variable to say how many times it is going to run, and how many times it has run.

      I have made the modifications, but not being the best java dev, it's ugly. It works, but it's ugly. Unit tests currently fail as well.

      It creates 2 env vars

      NAGINATORCOUNT
      NAGINATORMAXCOUNT

        Attachments

          Issue Links

            Activity

            Hide
            ikedam ikedam added a comment -
            Show
            ikedam ikedam added a comment - Create a pull request: https://github.com/jenkinsci/naginator-plugin/pull/26
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/com/chikli/hudson/plugin/naginator/NaginatorAction.java
            src/main/java/com/chikli/hudson/plugin/naginator/NaginatorListener.java
            src/main/java/com/chikli/hudson/plugin/naginator/NaginatorMatrixAction.java
            src/main/java/com/chikli/hudson/plugin/naginator/NaginatorRetryAction.java
            src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/help.html
            src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java
            http://jenkins-ci.org/commit/naginator-plugin/bfb39bed57e330341cf5d6ad26e6ec770cc0242e
            Log:
            [FIXED JENKINS-21241] Provides a variable NAGINATOR_COUNT, NAGINATOR_MAXCOUNT, NAGINATOR_BUILD_NUMBER.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/com/chikli/hudson/plugin/naginator/NaginatorAction.java src/main/java/com/chikli/hudson/plugin/naginator/NaginatorListener.java src/main/java/com/chikli/hudson/plugin/naginator/NaginatorMatrixAction.java src/main/java/com/chikli/hudson/plugin/naginator/NaginatorRetryAction.java src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/help.html src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java http://jenkins-ci.org/commit/naginator-plugin/bfb39bed57e330341cf5d6ad26e6ec770cc0242e Log: [FIXED JENKINS-21241] Provides a variable NAGINATOR_COUNT, NAGINATOR_MAXCOUNT, NAGINATOR_BUILD_NUMBER.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/com/chikli/hudson/plugin/naginator/NaginatorAction.java
            http://jenkins-ci.org/commit/naginator-plugin/cc1b67d6129583b8708f4c7a4b24755b163de187
            Log:
            JENKINS-21241 Fixed code formatting.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/com/chikli/hudson/plugin/naginator/NaginatorAction.java http://jenkins-ci.org/commit/naginator-plugin/cc1b67d6129583b8708f4c7a4b24755b163de187 Log: JENKINS-21241 Fixed code formatting.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/com/chikli/hudson/plugin/naginator/NaginatorAction.java
            src/main/java/com/chikli/hudson/plugin/naginator/NaginatorListener.java
            src/main/java/com/chikli/hudson/plugin/naginator/NaginatorMatrixAction.java
            src/main/java/com/chikli/hudson/plugin/naginator/NaginatorRetryAction.java
            src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/help.html
            src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java
            http://jenkins-ci.org/commit/naginator-plugin/1abccf7725534b96b032df5c572355a3997ab45d
            Log:
            Merge pull request #26 from ikedam/feature/JENKINS-21241_CountVariable

            JENKINS-21241 NAGINATOR_COUNT, NAGINATOR_MAXCOUNT, NAGINATOR_BUILD_NUMBER

            Compare: https://github.com/jenkinsci/naginator-plugin/compare/cf96b132599a...1abccf772553

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/com/chikli/hudson/plugin/naginator/NaginatorAction.java src/main/java/com/chikli/hudson/plugin/naginator/NaginatorListener.java src/main/java/com/chikli/hudson/plugin/naginator/NaginatorMatrixAction.java src/main/java/com/chikli/hudson/plugin/naginator/NaginatorRetryAction.java src/main/resources/com/chikli/hudson/plugin/naginator/NaginatorPublisher/help.html src/test/java/com/chikli/hudson/plugin/naginator/NaginatorListenerTest.java http://jenkins-ci.org/commit/naginator-plugin/1abccf7725534b96b032df5c572355a3997ab45d Log: Merge pull request #26 from ikedam/feature/ JENKINS-21241 _CountVariable JENKINS-21241 NAGINATOR_COUNT, NAGINATOR_MAXCOUNT, NAGINATOR_BUILD_NUMBER Compare: https://github.com/jenkinsci/naginator-plugin/compare/cf96b132599a...1abccf772553
            Hide
            ikedam ikedam added a comment -

            Released naginator-1.17 introducing this feature.
            It will be available in the update center in a day.
            Please try that.

            Show
            ikedam ikedam added a comment - Released naginator-1.17 introducing this feature. It will be available in the update center in a day. Please try that.

              People

              • Assignee:
                ikedam ikedam
                Reporter:
                aflat aflat
              • Votes:
                6 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: