简体   繁体   中英

Jenkins, how do I ZIP the workspace post-build?

I have a Jenkins job that retrieves a workspace from SVN. How can I set Jenkins to create a ZIP out of the workspace folder?

You have not specified the platform. On windows I used NAnt script to do this.

    <zip zipfile="<Path where file will be created>\<your file>.zip">
        <fileset basedir="<Path to the folder to be zipped>">
                <include name="**/*" />
        </fileset>          
    </zip>

http://nant.sourceforge.net/release/0.85/help/tasks/zip.html

http://nant.sourceforge.net/release/0.85-rc1/help/tasks/unzip.html

On Linux/UNIX, Ant provides the same stuff but with more options.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM