def install_artifacts(artifacts, dirstruct, installdir, basestaticurl):
        assert basestaticurl.endswith("/"), "Basestaticurl should end with /"
        installed = []
        for reldir, artifactnames in dirstruct.items():
            destdir = os.path.join(installdir, reldir)
            if not os.path.exists(destdir):
                log.warn("Making install directory %s" % destdir)
                os.makedirs(destdir)
            else:
                assert os.path.isdir(destdir)
            for artifactname in artifactnames:
                destpath = os.path.abspath(os.path.join( destdir, artifactname))
                if artifactname in artifacts.keys():
                    # The artifact must be loaded from jenkins
                    theartifact = artifacts[artifactname]
                else:
                    # It's probably a static file, we can get it from the static collection
                    staticurl = urlparse.urljoin(basestaticurl, artifactname)
                    theartifact = Artifact(artifactname, staticurl)
                theartifact.save(destpath)
                installed.append(destpath)
        return installed
Install the artifacts.
dataset/ETHPy150Open ramonvanalteren/jenkinsapi/jenkinsapi/api.py/install_artifacts