Search code examples
jenkinsjenkins-pipelinefingerprinting

Jenkins declarative pipeline: How to fingerprint a file without archiving it?


I have a Jenkins declarative pipeline job that has the end result of creating some very large output files ( > 2 GB in size ). I don't want to archive these files in Jenkins as artifacts.

However, I would like to fingerprint these large files so that I can associate them with other builds.

How can I do this, preferably in the post action of the pipeline?


Solution

  • In your pipeline script add: fingerprint 'module/dist/**/*.zip'

    Where 'module/dist/**/*.zip' are the files you wish to fingerprint using Ant's FileSet

    In console log you should see:

    Recording fingerprints
    [Pipeline] ...
    

    While users have mentioned in the Jenkins documentation that files also need to be archived for the build not to fail, this work for me on Jenkins ver. 2.180.