947 B
947 B
Exercise 7
You will enhance the existing job to generate a JAR file and store it on Jenkins. The job should record the MD5 hash for the artifact. Later, you will configure a downstream job that should be able to reuse the existing artifact.
Storing and Fingerprinting Artifacts
- Create a post-build action for archiving JAR files with the pattern
build/libs/*.jar. Enable the fingerprinting option. - Execute the build. The build should list the artifact
gradle-initializr-1.0.0.jar. - Have a look at the recorded fingerprints of this build.
- Render the MD5 hash of the artifact and the usage of the artifact.
- Install the Copy Artifacts plugin.
- Create a downstream job named
consumer. - Configure the downstream job to use the artifact produced by the upstream job.
- Run the the build for the job
gradle-initializr. - Have a look at the fingerprints of the downstream job.