jenkins pipeline之stash/unstash

本文介绍了Jenkins Pipeline中的stash和unstash功能。stash用于临时存储文件,将其打包为tar包,但可能消耗CPU并有限制,建议文件大小在100M以下。与archive的区别在于,stash在任务完成后会删除文件,而archive会持久保存并在 Jenkins 页面显示。使用时要注意stash只能在最后使用一次,多次使用会被忽略。
摘要由CSDN通过智能技术生成

在使用jenkins时,经常会问到文件怎么存储?

正好jenkins有一个stash的功能,下面简单介绍下:

先看看官方是怎么解释的:

stash: Stash some files to be used later in the build
Saves a set of files for use later in the same build, generally on another node/workspace. 
Stashed files are not otherwise available and are generally discarded at the end of the build.
Note that the stash and unstash steps are designed for use with small files.
For large data transfers, use the External Workspace Manager plugin, or use an external repository manager such as Nexus or Artifactory.
This is because stashed files are archived in a compressed TAR,
and with large files this demands considerable on-master resources, particularly CPU time.
There's not a hard stash size limit, but between 5-100 MB you should probably consider alternati
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值