If you happen to specify a pattern that doesn't match any files in the workspace, archiveArtifacts will silently fail the build.
sh 'echo "lol"'
archiveArtifacts artifacts: 'lol*.zip'
Started by user admin
Still waiting to schedule task
Waiting for next available executor
Running on Azure0907122157 in /home/azureuser/workspace/Experiments/bad-artifacts
[bad-artifacts] Running shell script
+ echo lol
[Pipeline] [Pipeline] End of Pipeline
In contrast, the use of the archive step (e.g. archive 'lol*.zip' in the above Jenkinsfile) will result in a silently successful build.