Commit 5163a39
committed
Fixes #430: Validate an artifact using "hash" rather than "fileName"
Jenkins only stores one version of an artifact by its hash and by the
original filename. Subsequent stores of an artifact with an identical
hash but different filename will point to the original artifact. If a
duplicate artifact (identical hash) has a different filename than the
original filename then that new filename will be stored as a name in
the build artifacts but will not change the fileName of the original
artifact. This makes it problematic to compare against the original
fileName when validating a build artifact that has been saved.
Since the md5sum hash is computed for the local, saved artifact it can
be compared against the Jenkins artifact ID (viz hash) for validation.
This avoids the problem of identical artifacts having additional
filenames. Using the hash is also a better way of validating data
integrity rather than using the fileName even when the filename
matches.1 parent 4494278 commit 5163a39
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | | - | |
87 | | - | |
| 87 | + | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
0 commit comments