有没有人使用过 stash builder 插件。它的文档说它在构建环境中添加了一些环境变量,但是如果我回应它们,它们都是空的
echo "${sourceBranch}"
echo "${targetBranch}"
echo "${sourceRepositoryOwner}"
echo "${sourceRepositoryName}"
echo "${pullRequestId}"
echo "${destinationRepositoryOwner}"
echo "${destinationReposotryName}"
echo "${pullRequestTitle}"
echo "${sourceCommitHash}"
这个插件对我没有任何作用。这是我的配置
我选择 git 作为 SCM [未选择轮询 scm]
RepositoryUrl:ssh://git@stash-eng.abc.com:7999/mytool/my_tools_demo.git
Refspec:\+refs/pull-requests/*:refs/remotes/origin/pr/*
Branch Specifier:-origin/pr/${pullRequestId}/from
然后我标记复选框“Stash Pull Requests Builder”
以下是差异字段的值
Cron:H/2 * * * *
Stash Host:stash-eng.abc.com
Stash Credentials:..........
Project:mytool
Repository Name:my_tools_demo
仍然什么都不做。我也没有在日志中看到任何与插件相关的东西。
最佳答案
我在我的公司使用这个插件,它运行良好。
在我的 Stash 环境中,所有项目名称都是大写的。
如果你有相同类型的项目名称,你可以尝试用大写吗? (在 Stash Pull Requests Builder 部分)
如果您有一个开放的拉取请求,您可以尝试添加此评论以触发新的 Jenkins 构建吗?
test this please
这是一个神奇的注释,可以从 Stash 触发新的 PR 构建。
关于pull-request - stash Pull Request Builder 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34785302/