Search code examples
jenkinssoftware-packaging

Adding binary files to Jenkins pipeline build?


What is the best way to add existing binary files to a Jenkins pipeline build?

I have a Python script that wraps around an existing closed source binary exe file. Because it's not possible to include the exe in the GitHub repo due to licensing, I'd like to add the binary from a local server as a step in the build process. The closed source binary can be packaged for internal use but it can't be added to the SCM.

Is this possible with Jenkins's pipeline?


Solution

  • First, please do not store binaries in SCM, search for the proper place/tool to do it, for example Nexus Sonatype or JFrog.

    Then, if you don't have time for it, at least as last option store as an Archive File in a different Job and then retrieve with CopyArtifact Plugin.

    https://wiki.jenkins-ci.org/display/JENKINS/Copy+Artifact+Plugin

    In the other hand If you want store "artifacts" or custom files in Jenkins you can check:

    https://wiki.jenkins-ci.org/display/JENKINS/User+Content

    Then you can download it using for example: wget