我的系统设置为 Docker Linux PC Master/BeagleBone Linux Slave,通过 USB SSH 连接。
本质上,我正在尝试执行以下操作:
当我从 Jenkins 构建时,我的主人会克隆 repo,构建代码并存储二进制文件。但是,当我转移到从属设备上的“闪存”阶段时,它还会尝试克隆存储库(由于凭据问题而失败 - 这是一个单独的问题)。我不希望它这样做 - 相反,我希望它只获取新存储的文件并使用它来刷新连接的硬件,而不是在 repo 上查找它。
我似乎找不到防止这种情况发生的选项。我该怎么做才能使用隐藏的文件?如果无法使用 stash,是否可以在不尝试克隆 repo 的情况下以另一种方式完成?
这是我的 Jenkinsfile:
pipeline {
agent none
stages {
stage('Build') {
agent {
label 'master'
}
steps {
sh 'cd application/.../example && make'
stash includes: 'application/.../example/example.bin', name: 'Flash'
}
}
stage('Test of Flash') {
agent {
label 'test_slave'
}
steps {
unstash …Run Code Online (Sandbox Code Playgroud)