jenkins - 如何在 dir() 步骤中跳过工作区文件夹创建?
问题描述
每当我尝试使用以下代码运行作业时:
agent {
node {
label 'my-label'
customWorkspace "$workspacePath"
}
}
steps {
script {
dir ("$dirPath") {
詹金斯的行为是这样的:
Running on my-label in /home/jenkins/default-workspace/my-job
Running in /home/jenkins/custom-workspace
Running in /home/somebody/dir-step-path
并尝试在dir(){}
步骤中指定的文件夹内创建工作区目录
有没有办法强制詹金斯不在dir(){}
步骤中指定的文件夹中创建工作区目录?
解决方案
推荐阅读
- php - 联系表格安全
- oracle - 如何从 Oracle 获取 View 到 Jaspersoft Studio?
- c++ - 如何在 Gtk 套接字中嵌入 Gtk::Plug?
- java - 如何使 IntelliJ 格式化程序在键入时自动中断长行?
- math - Kotlin 安卓系统
- r - 'as.tibble' 在 tibble 2.0.1 但不是 1.4.2 中导致错误
- c# - 我想在我的屏幕上显示计时器,测试持续时间将从数据库中获取
- javascript - 删除条目后重新排序本地存储
- php - 我如何接收从印度发给我们的 twilio 号码的短信
- c# - 如何正确使用模型绑定获取 Razor 页面中的单选按钮值