• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • ownership-plugin
    • None

      If VCS checkout/update fails, you can't send emails to job owners since the variables are not injected.

      Can I somehow set a default, e.g. an admin, and let every job override it? That would make for a nice workaround in case it's not possible to inject the variables at the start of a build (before code is checked out).

          [JENKINS-23926] Job Ownership not available if VCS fails

          Oleg Nenashev added a comment -

          Added links to issues

          Oleg Nenashev added a comment - Added links to issues

          Oleg Nenashev added a comment -

          I'll try that. thanks. Do you by chance know if one can set a default value nonetheless?

          I'll add the default value to token macros

          Oleg Nenashev added a comment - I'll try that. thanks. Do you by chance know if one can set a default value nonetheless? I'll add the default value to token macros

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - I'm working on the issue. PR: https://github.com/jenkinsci/ownership-plugin/pull/30

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPlugin.java
          src/test/java/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapperTest.java
          http://jenkins-ci.org/commit/ownership-plugin/d7d2c1496aaec81daa0750fbeb5ce923f3763b4c
          Log:
          JENKINS-23926 - Direct unit test for the issue

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPlugin.java src/test/java/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapperTest.java http://jenkins-ci.org/commit/ownership-plugin/d7d2c1496aaec81daa0750fbeb5ce923f3763b4c Log: JENKINS-23926 - Direct unit test for the issue Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/OwnershipBuildListener.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapper.java
          http://jenkins-ci.org/commit/ownership-plugin/9871283990bd76c8f04bb61cfdeb4a1c30159a4c
          Log:
          [FIXED JENKINS-23926] - Use OwnershipBuildListener to inject environment variables even if the build fails before wrapper steps.

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Conflicts:
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/OwnershipBuildListener.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapper.java http://jenkins-ci.org/commit/ownership-plugin/9871283990bd76c8f04bb61cfdeb4a1c30159a4c Log: [FIXED JENKINS-23926] - Use OwnershipBuildListener to inject environment variables even if the build fails before wrapper steps. Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com> Conflicts: src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/OwnershipBuildListener.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapper.java
          src/main/java/org/jenkinsci/plugins/ownership/model/runs/OwnershipRunListener.java
          src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipAction.java
          src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipListener.java
          http://jenkins-ci.org/commit/ownership-plugin/c62137339f8c24caf4baf2db5724d10c18bcf2c5
          Log:
          JENKINS-23926 - Gracefully integrate changes with #29

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/OwnershipBuildListener.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapper.java src/main/java/org/jenkinsci/plugins/ownership/model/runs/OwnershipRunListener.java src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipAction.java src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipListener.java http://jenkins-ci.org/commit/ownership-plugin/c62137339f8c24caf4baf2db5724d10c18bcf2c5 Log: JENKINS-23926 - Gracefully integrate changes with #29 Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPlugin.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPluginConfiguration.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java
          src/main/java/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapper.java
          src/main/java/org/jenkinsci/plugins/ownership/model/runs/OwnershipRunListener.java
          src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipAction.java
          src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipHelper.java
          src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipListener.java
          src/main/java/org/jenkinsci/plugins/ownership/util/environment/EnvSetupOptions.java
          src/main/resources/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPluginConfiguration/config.jelly
          src/main/resources/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPluginConfiguration/config.properties
          src/main/resources/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPluginConfiguration/help-globalEnvSetupOptions.html
          src/main/resources/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapper/config.jelly
          src/main/resources/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapper/help-injectJobOwnership.html
          src/main/resources/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapper/help-injectNodeOwnership.html
          src/main/resources/org/jenkinsci/plugins/ownership/util/environment/EnvSetupOptions/config.jelly
          src/main/resources/org/jenkinsci/plugins/ownership/util/environment/EnvSetupOptions/help-injectJobOwnership.html
          src/main/resources/org/jenkinsci/plugins/ownership/util/environment/EnvSetupOptions/help-injectNodeOwnership.html
          src/test/java/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapperTest.java
          http://jenkins-ci.org/commit/ownership-plugin/6112cfac239903f8d012e8db967b986d29a5f6cf
          Log:
          Merge pull request #30 from oleg-nenashev/JENKINS-23926

          JENKINS-23926 - Inject ownership variables even if SCM fails

          Compare: https://github.com/jenkinsci/ownership-plugin/compare/514858631f11...6112cfac2399

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPlugin.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPluginConfiguration.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapper.java src/main/java/org/jenkinsci/plugins/ownership/model/runs/OwnershipRunListener.java src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipAction.java src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipHelper.java src/main/java/org/jenkinsci/plugins/ownership/model/runs/RunOwnershipListener.java src/main/java/org/jenkinsci/plugins/ownership/util/environment/EnvSetupOptions.java src/main/resources/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPluginConfiguration/config.jelly src/main/resources/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPluginConfiguration/config.properties src/main/resources/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPluginConfiguration/help-globalEnvSetupOptions.html src/main/resources/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapper/config.jelly src/main/resources/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapper/help-injectJobOwnership.html src/main/resources/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapper/help-injectNodeOwnership.html src/main/resources/org/jenkinsci/plugins/ownership/util/environment/EnvSetupOptions/config.jelly src/main/resources/org/jenkinsci/plugins/ownership/util/environment/EnvSetupOptions/help-injectJobOwnership.html src/main/resources/org/jenkinsci/plugins/ownership/util/environment/EnvSetupOptions/help-injectNodeOwnership.html src/test/java/com/synopsys/arc/jenkins/plugins/ownership/wrappers/OwnershipBuildWrapperTest.java http://jenkins-ci.org/commit/ownership-plugin/6112cfac239903f8d012e8db967b986d29a5f6cf Log: Merge pull request #30 from oleg-nenashev/ JENKINS-23926 JENKINS-23926 - Inject ownership variables even if SCM fails Compare: https://github.com/jenkinsci/ownership-plugin/compare/514858631f11...6112cfac2399

          Big thanks for this, Oleg. I'll try to test this next week.

          Hubert Grzeskowiak added a comment - Big thanks for this, Oleg. I'll try to test this next week.

          Tested for two months - working perfectly. This helped us a lot at debugging SVN errors in Jenkins.

          Hubert Grzeskowiak added a comment - Tested for two months - working perfectly. This helped us a lot at debugging SVN errors in Jenkins.

          Oleg Nenashev added a comment -

          Thanks for the response. It works well on our installations too.
          I'm closing the issue.

          Oleg Nenashev added a comment - Thanks for the response. It works well on our installations too. I'm closing the issue.

            oleg_nenashev Oleg Nenashev
            huuugo Hubert Grzeskowiak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: