刚刚在Ubuntu 12.04中安装了Jenkins,我想创建一个只是克隆项目并构建它的简单构建.
它失败,因为它无法标记.它无法标记,因为它错误地说" 告诉我你是谁 "显然是因为我没有设置git设置UserName和UserEmail.
但是,我不需要设置它们,Jenkins将只是克隆存储库,为什么它需要凭据如果它不会推动更改,为什么它需要做一个标记呢?
完整的错误日志是:
Started by user anonymous
Checkout:workspace / /var/lib/jenkins/jobs/Foo.Bar.Baz/workspace - hudson.remoting.LocalChannel@38e609c9
Using strategy: Default
Cloning the remote Git repository
Cloning repository origin
Fetching upstream changes from git@mygithost.mydomain.local:foo-bar-baz/foo-bar-baz.git
Seen branch in repository origin/1.0
Seen branch in repository origin/1.5.4
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Commencing build of Revision 479d37776b46283a946dd395c1ea78f18c0b97c7 (origin/1.0)
Checking out Revision 479d37776b46283a946dd395c1ea78f18c0b97c7 (origin/1.0)
FATAL: Could not apply tag jenkins-Foo.Bar.Baz-2
hudson.plugins.git.GitException: Could not apply tag jenkins-Foo.Bar.Baz-2
at hudson.plugins.git.GitAPI.tag(GitAPI.java:737)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1320)
at …Run Code Online (Sandbox Code Playgroud) 我有一个像这样的makefile:
install:
@somecommand
#some explanation for next command
@lastcommand
Run Code Online (Sandbox Code Playgroud)
发生的是#some explanation for next command我执行时正在打印注释make install.如何在未打印的makefile中进行注释?也许我正在寻找windowsy的unix等价物echo off?
(实际上,这个问题的反面.)
在C#我可以这样做:
var castValue = inputValue as Type1
Run Code Online (Sandbox Code Playgroud)
在F#中,我可以这样做:
let staticValue = inputValue :> Type1
let dynamicValue = inputValue :?> Type1
Run Code Online (Sandbox Code Playgroud)
但它们都不等同于C#的关键字as.
我想我需要为F#中的等价物做一个匹配表达式
match inputValue with
| :? Type1 as type1Value -> type1Value
| _ -> null
Run Code Online (Sandbox Code Playgroud)
它是否正确?
设置一个简单的类库来构建和发布到VSTS自己的feed,我在NuGet包运行时看到这个错误.
无法在BUILD_BUILDNUMBER中找到版本号数据
我勾选了"使用内部版本编号到版本包"选项.预期的VSTS才能正常工作.
我在MS Sql Server中有这个名为sample的表,其中包含以下值:
ID Date Description
1 2012/01/02 5:12:43 Desc1
2 2012/01/02 5:12:48 Desc2
3 2012/01/03 5:12:41 Desc3
4 2012/01/03 5:12:43 Desc4
Run Code Online (Sandbox Code Playgroud)
现在我想写LINQ查询,结果将是这样的:
4 2012/01/03 5:12:43 Desc4
Run Code Online (Sandbox Code Playgroud)
我写了这个,但它不起作用:
List<Sample> q = (from n in Sample.Max(T=>T.Date)).ToList();
Run Code Online (Sandbox Code Playgroud) 如果我使用Newtonsoft.Json.NET,则默认使用iso8601(即:) 2011-06-02T09:34:29+02:00来序列化/反序列化日期.
为什么ServiceStack.Text不默认为此,我需要将其指定为配置设置?
我有一张地图X,我正在尝试获得一组满足某种条件的键,如下所示:
Map.Keys X
|> Set.filter (fun x -> ...)
Run Code Online (Sandbox Code Playgroud)
...但我无法找到从F#的Map集合中获取密钥的方法.
据我所知,主要区别在于gitlab-ci是opensource(你可以在自己的服务器上安装)而travis-ci则不是.
那么后者总是基于云/服务.它对于开源项目是免费的.
但是GitLab.com(公司,而不是软件)也有一个你不需要安装的云版本:ci.gitlab.com.我猜这个版本只能用于你的Gitlab帐户中发布的公共存储库.
但是,那里几乎没有关于以这种方式运行GitLab CI的文档.我找到的大多数文档都是关于安装GitLab CI服务器或跑步者.但是如何配置ci.gitlab.com的跑步者?他们有什么操作系统?我可以拥有Windows/Mac跑步者吗?(该软件显然支持这些操作系统,但未指定ci.gitlab.com服务提供的跑步者.)
我正在尝试使用System.Data.SqliteF#.在C#中,我有类似的代码
using (DbTransaction dbTrans = con.BeginTransaction()) {
using (SQLiteCommand cmd = con.CreateCommand()) {
//blahblah
}
dbTrans.Commit();
}
Run Code Online (Sandbox Code Playgroud)
但是在F#中,当我使用using上面类似的两个时,我得到错误the type bool is not compatible with the type IDisposable...
编辑我很抱歉我的问题.use适用于F#案例.我只是不知道如何关闭/删除我的quesetions.
我刚开始使用Log4Net库并且在配置时遇到问题.我不需要任何特别的东西.我将它用于Winforms应用程序,需要基本文件和控制台日志记录.为了保持尽可能简单,我使用App.config进行配置并使用从Log4Net项目网站获取的默认值:App.config:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="ProjectFolder" value="D:\Documents\my documents\Themis\Projects"/>
</appSettings>
<configSections>
<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net>
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
<param name="File" value="ThemisLog.txt" />
<param name="AppendToFile" value="true" />
<layout type="log4net.Layout.PatternLayout">
<param name="Header" value="[Header]\r\n" />
<param name="Footer" value="[Footer]\r\n" />
<param name="ConversionPattern" value="%d [%t] %-5p %c %m%n" />
</layout>
</appender>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
<layout type="log4net.Layout.PatternLayout">
<param name="Header" value="[Header]\r\n" />
<param name="Footer" value="[Footer]\r\n" />
<param name="ConversionPattern" value="%d [%t] %-5p %c %m%n" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="LogFileAppender" /> …Run Code Online (Sandbox Code Playgroud)