[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Jesse Glick commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build Craig Ringer as far as I know this issue is fixed, and when a Step fails with an AbortException, the log will display that message. That said, having an optional link in the (“classic”) UI to display the full stack trace from an AbortException (which is normally concealed) would be a neat enhancement for workflow-job-plugin. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Craig Ringer commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build The comments here about "silently" failing the build make me think it'd be very good to capture the hudson.Abort exception and its stack. Then when the pipeline aborts, print "Pipeline aborted. (See stack)", with "(See stack)" as a ConsoleAnnotation that lets you view the stack that led to the abort. Even "Pipeline aborted in 'build' step at line '42'" would be a massive help though. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Andrew Bayer updated JENKINS-38005 Jenkins / JENKINS-38005 Using archiveArtifacts with a non-matching pattern silently fails the build Change By: Andrew Bayer Status: In Progress Review Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Andrew Bayer commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build Not sure about the step result aspect - I can never remember how that actually gets set. But at a minimum, this will definitely log an error. If it turns out to still not cause the step in Blue Ocean to know it failed, we can revisit. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Michael Neale updated an issue Jenkins / JENKINS-38005 Using archiveArtifacts with a non-matching pattern silently fails the build Change By: Michael Neale Priority: Minor Major Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Michael Neale commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build gosh that is terrible. The step result isn't failure, and there is no log message. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Andrew Bayer commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build PR up at https://github.com/jenkinsci/jenkins/pull/2823 with Jesse's suggested patch and a change to the error message. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Andrew Bayer started work on JENKINS-38005 Change By: Andrew Bayer Status: Open In Progress Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Andrew Bayer assigned an issue to Andrew Bayer Jenkins / JENKINS-38005 Using archiveArtifacts with a non-matching pattern silently fails the build Change By: Andrew Bayer Assignee: Andrew Bayer Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title dan turner commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build bump, just spent 1/2 a day looking for this! Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Christian Beushausen commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build I would like to add that it looks to me that archiveArtifacts also (silently) fails when using absolute paths: def myfile1 = "foobar" sh "echo foobar > ${myfile1}" archiveArtifacts artifacts: "${myfile1}", fingerprint: true works correctly, def myfile1 = "${WORKSPACE}/foobar" sh "echo foobar > ${myfile1}" archiveArtifacts artifacts: "${myfile1}", fingerprint: true on the other hand does not. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Daniel Beck commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build Notably (IIRC) freestyle jobs log when a step makes the build result worse. Looks like Pipeline does not? Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Roman Baeriswyl commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build Same for me. Almost half a day to figure out that this silently fails the build without any warning! Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Ian Leitch commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build Would be great to have this resolved. This is was a huge time sink for me to track down. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Harry Mallon commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build Jesse Glick: Would this patch mean that the archive stage in pipeline steps view would show as failed? Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Jesse Glick commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build It would print a warning before failing, as already happens for freestyle builds. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Max Wahler commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build Jesse Glick: What would it look like with the modifications you proposed when there's nothing to archive? Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Mike Kingsbury commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build My apologies, I misunderstood the intent of the patch. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Jesse Glick commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build you're missing the point I do not think I am missing anything. Hence my suggested patch above. (The ArtifactArchiver.NoMatchFound text should probably also suggest enabling the allowEmptyArchive mode—a later addition—if the lack of a match is not a bug.) Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Mike Kingsbury commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build Jesse, you're missing the point. Yes, once someone recognizes the problem, it can be worked around. Until that point, they are left with a failed build and no useful information as to its cause. Hence the request for additional output from archiveArtifacts. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Jesse Glick commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build From a script, it would probably also work to run currentBuild.result = 'STABLE' prior to running the archiver. (The result can only get worse, never better, but it can become nonnull.) Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Jesse Glick assigned an issue to Unassigned Just use allowEmptyArchive: true. See inline help in Pipeline Syntax. As to the lack of a message, I suspect the following would suffice: diff --git a/core/src/main/java/hudson/tasks/ArtifactArchiver.java b/core/src/main/java/hudson/tasks/ArtifactArchiver.java index ca1f154..9175e11 100644 --- a/core/src/main/java/hudson/tasks/ArtifactArchiver.java +++ b/core/src/main/java/hudson/tasks/ArtifactArchiver.java @@ -242,7 +242,7 @@ public class ArtifactArchiver extends Recorder implements SimpleBuildStep { } } else { Result result = build.getResult(); -if (result != null && result.isBetterOrEqualTo(Result.UNSTABLE)) { +if (result == null || result.isBetterOrEqualTo(Result.UNSTABLE)) { // If the build failed, don't complain that there was no matching artifact. // The build probably didn't even get to the point where it produces artifacts. listenerWarnOrError(listener, Messages.ArtifactArchiver_NoMatchFound(artifacts)); Jenkins / JENKINS-38005 Using archiveArtifacts with a non-matching pattern silently fails the build Change By: Jesse Glick Component/s: core Component/s: pipeline Priority: Critical Minor Labels: pipeline Assignee: Jesse Glick
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Max Wahler commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build Is there any progress on this issue? It would be really really great if there was a way to tell if archiveArtifacts worked or not! I have a job that builds a lot of stuff and has ~750 steps. It's totally impossible to find out where the pipeline failed in case archiveArtifacts failed, because every step is green and there's no output at all that points me to the correct place. My approach is now more a Poor Man's Debugger than a solution: I put masses of printlns in it which give me the current build result. But this doesn't necessarily mean that the error happened at that specific place if you build stuff in parallel. IMHO, archiveArtifacts should at least print out the amount of files it included. Also a return value containing the files or the number of files would be great. But instead of failing silently, I'd prefer an Exception. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Max Wahler commented on JENKINS-38005 Re: Using archiveArtifacts with a non-matching pattern silently fails the build I raised the priority to 'Critical' because this makes very difficult to see where a large build actually failed. Also, I saw a similar behavior: archiveArtifacts 'target/test.data' fails only if the directory 'target' does not exist. If it exists but not the file 'test.data', then the build fails but the build step was successful. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title Max Wahler updated an issue Jenkins / JENKINS-38005 Using archiveArtifacts with a non-matching pattern silently fails the build Change By: Max Wahler Priority: Minor Critical Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-38005) Using archiveArtifacts with a non-matching pattern silently fails the build
Title: Message Title R. Tyler Croy created an issue Jenkins / JENKINS-38005 Using archiveArtifacts with a non-matching pattern silently fails the build Issue Type: Bug Assignee: Jesse Glick Components: pipeline Created: 2016/Sep/07 12:42 AM Environment: Jenkins 2.7.3, Pipeline 2.3 Priority: Minor Reporter: R. Tyler Croy If you happen to specify a pattern that doesn't match any files in the workspace, archiveArtifacts will silently fail the build. Jenkinsfile node { sh 'echo "lol"' archiveArtifacts artifacts: 'lol*.zip' } Console Output Started by user admin [Pipeline] node Still waiting to schedule task Waiting for next available executor Running on Azure0907122157 in /home/azureuser/workspace/Experiments/bad-artifacts [Pipeline] { [Pipeline] sh [bad-artifacts] Running shell script + echo lol lol [Pipeline] step Archiving artifacts [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: FAILURE archive step In contrast, the use of the archive step (e.g. archive 'lol*.zip' in the above Jenkinsfile) will result in a silently successful build.