我正在尝试让TeamCity在Windows上使用puppet.bat通过命令行触发puppet部署.
在Teamcity中,我使用命令行运行程序调用它,使用Command可执行文件:C:\ Program Files(x86)\ Puppet Labs\Puppet\bin\puppet.bat命令参数:apply myexample.pp
我想要做的是也从TeamCity传递构建号,所以我可以在myexample.pp中使用它
这可能吗?
更新:用于自定义事实的代码,这是下面接受的答案.
require 'open-uri'
$uri = URI.parse("http://teamcity/guestAuth/app/rest/buildTypes/id: <BUILDID>/builds/status:SUCCESS/number")
$version = $uri.read
Facter.add("latestbuildversion") do
setcode do
$version
end
end
Run Code Online (Sandbox Code Playgroud) 我正在尝试在使用Vagrant启动新实例时从配置shell脚本向我的主目录中添加一些额外的行.bashrc.
在shell脚本中我有:
set -x
sudo apt-get update
sudo apt-get install vim
echo "source /usr/local/share/chruby/chruby.sh">> ~/.bashrc
echo "source /usr/local/share/chruby/auto.sh">> ~/.bashrc
Run Code Online (Sandbox Code Playgroud)
但是在完成之后,没有任何内容写入.bashrc.
这是完整脚本的简化版本,其目的是安装Ruby/Rails.
我们使用monorepo方法在github中存储我们的源代码.
目前是否可以在提交特定子文件夹时触发CodePipeline.
通过在源存储库上设置过滤器,TeamCity目前可以实现这一点,但我没有看到使用CodePipeline的示例.
将PageObjects模式应用于页面组件时的标准方法是什么?
为了举例,我可以说我正在为亚马逊产品页面上的功能编写测试.
该页面包含大量单独的功能,产品信息,浏览此客户,其他客户建议等.
我在PageObjects中看到的当前示例实际上仅涵盖了如何处理功能有限的单个页面.我正在寻找的东西是一个PageObject,它代表Product页面,然后由代表每个组件的ComponentObject组成.
例如:
public class ProductPage
{
[FindsBy(How = How.Id, Using = "productInformation")]
public ProductInformationControl ProductionInformation{get;set}
[FindsBy(How = How.Id, Using = "customersViewed")]
public CustomersAlsoViewedControl CustomersAlsoViewed{get;set}
[FindsBy(How = How.Id, Using = "customersSuggested")]
public CustomersSuggestedControl CustomersSuggested{get;set}
}
public class ProductInformationControl
{
//Ideally the FindsBy here would find the element based on the Controls context
// So only resolving to an element that was within the context of this control.
[FindsBy(How = How.ClassName, Using = "title")]
private IWebElement _title;
public string …Run Code Online (Sandbox Code Playgroud) 我当前的 Rails 应用程序分为 2 个文件夹。
/base
/app
Run Code Online (Sandbox Code Playgroud)
在我的 gemfile 中使用以下行将基础引用到应用程序中
gem 'base', path: "../base"
Run Code Online (Sandbox Code Playgroud)
我正在尝试 git 将此存储库部署到 dokku - 但是这是失败的,我假设这是由于 dokku 无法确定正确的构建包,因为它只在根目录中查找以确定应用程序类型等。
dokku 跟踪的片段:
remote: + DOCKER_ARGS+=
remote: ++ docker run -d -v /home/dokku/sws/cache:/cache -e CACHE_PATH=/cache dokku/sws /build/builder
remote: + id=2439409a62c2da4c32086149ad404dd4c6ec974e83aa7fe0d8e06d092396b69f
remote: + docker attach 2439409a62c2da4c32086149ad404dd4c6ec974e83aa7fe0d8e06d092396b69f
-----> Unable to select a buildpack
remote: + exit_code=1
remote: + set -e
Run Code Online (Sandbox Code Playgroud)
在处理 Heroku 上的相同问题时,我尝试使用将子目录部署到 Heroku中提到的 config.ru - 但这似乎不起作用。
有什么想法吗?
刚刚从http://orchard.codeplex.com/releases/view/65184抓取了果园CMS的最新.zip版本,并通过指向提取的文件夹通过VS2010打开了这个版本.
当我尝试编译时,我收到以下错误:
命名空间'Orchard'中不存在类型或命名空间名称'Blogs'(您是否缺少程序集引用?)
有什么想法吗?