我在LinuxSuse11上为teamCity设置了一个构建代理,并在该代理上安装了一个git客户端。因此,每次git提交都会通过TeamCity代理触发TeamCity中的新构建。
请注意,“服务器端签出”模式与build agent配合良好,这意味着Enterprise TeamCity和agent可以对话。不确定,但我猜代理设置有问题。代理设置位于:~/。bashrc和/etc/profile
如果我登录到BuildAgent的框中并手动执行:git clone someProject,它就可以正常工作。但是,如果Enterprise Team City也这样做,则会发生错误:
从Enterprise Team City的Web界面登录:
[13:16:26]Checking for changes
[13:16:32]Publishing internal artifacts
[13:16:32]Clearing temporary directory: /opt/buildAgent/temp/buildTmp
[13:16:32]Checkout directory: /opt/buildAgent/work/413442a249b8bad8
[13:16:32]Updating sources: agent side checkout (3m:11s)
[13:16:32][Updating sources] Using vcs information from server. Reason: no revision information for buildtype my-project:master: build and checkout directory /opt/buildAgent/work/413442a249b8bad8 on agent
[13:16:32][Updating sources] Will perform clean checkout. Reason: Checkout directory was cleaned up with errors
[13:16:32][Updating sources] Cleaning /opt/buildAgent/work/413442a249b8bad8
[13:16:33][Updating sources] VCS Root: [15116-12]Team::VCS_1 (3m:10s)
[13:16:33][VCS Root: [15116-12]_Team::VCS_1] revision: dff43c329bc0495efd66ffcfd4fddd26e66e4a50
[13:16:33][VCS Root: [15116-12]_Team::VCS_1] Cleaning /opt/buildAgent/work/413442a249b8bad8
[13:16:33][VCS Root: [15116-12]_Team::VCS_1] The .git directory is missing in '/opt/buildAgent/work/413442a249b8bad8'. Running 'git init'...
[13:16:33][VCS Root: [15116-12]_Team::VCS_1] Commit 'dff43c329bc0495efd66ffcfd4fddd26e66e4a50' is not found in repository. Running 'git fetch'...
[13:19:44]
[Updating sources] Failed to perform checkout on agent: '/usr/bin/git -c core.askpass=/opt/buildAgent/temp/buildTmp/pass102793096014863366 fetch --progress origin +refs/heads/master:refs/remotes/origin/master' command failed.
stderr: error: Failed connect to stash.mySite.com:8081; Operation now in progress while accessing https://myUserName@stash.someThing.com:8081/scm//myProject.git/info/refs?service=git-upload-pack
fatal: HTTP request failed
[13:19:44]Publishing internal artifacts
[13:19:44]Build failed to start. Artifacts will not be published for this build
[13:19:46]Build finished
从BuildAgent在\logs\teamcity agent上登录。日志:
[2014-05-29 07:55:04,204] INFO - jetbrains.buildServer.AGENT - ===================================================
[2014-05-29 07:55:04,204] INFO - jetbrains.buildServer.AGENT - Starting build buildId = 1258156, buildTypeId=bt10493
[2014-05-29 07:55:04,206] INFO - mpl$TeamCitySpringSubConatiner - Refreshing SubContext: running build context id=1258156: startup date [Thu May 29 07:55:04 BST 2014]; parent: jetbrains.buildServer.agent.AgentMain2$2@6cc06bf7
[2014-05-29 07:55:04,411] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.LogAgentParametersStage
[2014-05-29 07:55:04,413] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.ClearExpiredBuildWorkingDirectoriesStage
[2014-05-29 07:55:04,413] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.UpdateDirectoryMapStage
[2014-05-29 07:55:04,429] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.RegisterPropertiesFileNamesStage
[2014-05-29 07:55:04,431] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.EnableBuildStopStage
[2014-05-29 07:55:04,431] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.FireBuildStartedStage
[2014-05-29 07:55:04,436] INFO - uildServer.swabra.SwabraLogger - Swabra cleanup is disabled
[2014-05-29 07:55:04,436] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.CleanAgentTempDirectoryStage
[2014-05-29 07:55:04,437] INFO - rectories.DirectoryCleanerImpl - Move directory /opt/buildAgent/temp/agentTmp to /opt/buildAgent/temp/.old/agentTmp_17 for cleaning
[2014-05-29 07:55:04,437] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.CreateAgentTempDirectoryStage
[2014-05-29 07:55:04,437] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.PublishBuildPropertiesStage
[2014-05-29 07:55:04,442] INFO - ernalArtifactsProcessingLogger - Publishing artifacts process started
[2014-05-29 07:55:04,442] INFO - ernalArtifactsProcessingLogger - Start: Searching for artifacts to publish in [/opt/buildAgent/temp/agentTmp/build.start.properties.gz=>.teamcity/properties]
[2014-05-29 07:55:04,442] INFO - ernalArtifactsProcessingLogger - Done: Searching for artifacts to publish, found [1] file
[2014-05-29 07:55:04,442] INFO - ernalArtifactsProcessingLogger - Start: Pre-processing artifacts if needed (archiving)
[2014-05-29 07:55:04,442] INFO - ernalArtifactsProcessingLogger - Done: Pre-processing artifacts if needed (archiving)
[2014-05-29 07:55:04,442] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.CleanBuildTempDirectoryStage
[2014-05-29 07:55:04,443] INFO - s.CleanBuildTempDirectoryStage - Clearing temporary directory: /opt/buildAgent/temp/buildTmp
[2014-05-29 07:55:04,443] INFO - rectories.DirectoryCleanerImpl - Move directory /opt/buildAgent/temp/buildTmp to /opt/buildAgent/temp/.old/buildTmp_17 for cleaning
[2014-05-29 07:55:04,443] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.CreateBuildTempDirectoryStage
[2014-05-29 07:55:04,444] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.CreateCheckoutDirectoryStage
[2014-05-29 07:55:04,445] INFO - ace.DirectoryCleanerForceClean - Free disk space under directory /opt/buildAgent/temp is 3.77 GB, required 3 GB.
[2014-05-29 07:55:04,445] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.CleanGeneratedFilesStage
[2014-05-29 07:55:04,445] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.buildStages.startStages.LogCheckoutDirectoryStage
[2014-05-29 07:55:04,446] INFO - jetbrains.buildServer.AGENT - Checkout directory: /opt/buildAgent/work/413442a249b8bad8
[2014-05-29 07:55:04,446] INFO - uildStages.BuildStagesExecutor - Call stage jetbrains.buildServer.agent.impl.patch.UpdateSourcesFromAgent
[2014-05-29 07:55:04,446] INFO - ch.UpdateSourcesBuildStageBase - Updating sources: agent side checkout
[2014-05-29 07:55:04,447] INFO - jetbrains.buildServer.AGENT - No revision information for 413442a249b8bad8.xml on agent
[2014-05-29 07:55:04,448] INFO - pl.patch.ProjectSourcesOnAgent - Will perform clean checkout. Reason: [ROOT_DIRECTORY_WAS_CLEANED_UP_WITH_ERRORS]
[2014-05-29 07:55:04,448] INFO - pl.patch.ProjectSourcesOnAgent - Cleaning /opt/buildAgent/work/413442a249b8bad8
[2014-05-29 07:55:04,448] INFO - rectories.DirectoryCleanerImpl - Move directory /opt/buildAgent/work/413442a249b8bad8 to /opt/buildAgent/work/.old/413442a249b8bad8_17 for cleaning
[2014-05-29 07:55:04,449] INFO - jetbrains.buildServer.AGENT - Patch downloaded for build with id 1258156
[2014-05-29 07:55:05,491] INFO - ernalArtifactsProcessingLogger - Start: Publishing files using WebPublisher
[2014-05-29 07:55:05,517] INFO - ernalArtifactsProcessingLogger - Start: Publishing files using ArtifactsCachePublisher
[2014-05-29 07:55:05,563] INFO - ernalArtifactsProcessingLogger - Done publishing artifacts to '.teamcity/properties', using 'WebPublisher', total files published: 1
[2014-05-29 07:55:05,563] INFO - ernalArtifactsProcessingLogger - Done publishing artifacts to '.teamcity/properties', using 'ArtifactsCachePublisher', total files published: 1
[2014-05-29 07:55:05,563] INFO - ernalArtifactsProcessingLogger - Done: Publishing files
[2014-05-29 07:55:05,730] INFO - ernalArtifactsProcessingLogger - Publishing artifacts process finished
[2014-05-29 07:55:06,052] INFO - jetbrains.buildServer.AGENT - Attempting to mark checkoutdir 413442a249b8bad8 for build 1258156 dirty
[2014-05-29 07:55:06,052] INFO - jetbrains.buildServer.AGENT - Number of vcsRootEntries: [VcsRootEntry[VcsSettings["[15116-12]_MYTEAM::GIT_VCS" {internal id=27876, properties: [agentCleanFilesPolicy=ALL_UNTRACKED; agentCleanPolicy=ON_BRANCH_CHANGE; authMethod=PASSWORD; branch=refs/heads/master; ignoreKnownHosts=true; secure:password=*****; submoduleCheckout=CHECKOUT; teamcity:vcsRootName=[15116-12]_MYTEAM::GIT_VCS; url=https://stash.mySite.com:8081/scm/myProject.git; username=build_user; usernameStyle=USERID; vcs=jetbrains.git; ]}; Checkout rules: ]]]
[2014-05-29 07:55:06,052] INFO - jetbrains.buildServer.AGENT - Recording vcs state. C: dff43c329bc0495efd66ffcfd4fddd26e66e4a50, Id: 5085_jetbrains.git_-210835581203928646_60553, CR: =>
[2014-05-29 07:55:06,052] INFO - jetbrains.buildServer.AGENT - Moved configuration file 413442a249b8bad8.xml to old
[2014-05-29 07:55:06,052] WARN - jetbrains.buildServer.AGENT - new file 413442a249b8bad8.xml.new exists. Previous build might have not finished successfully
[2014-05-29 07:55:06,053] INFO - jetbrains.buildServer.AGENT - Stored new configuration file 413442a249b8bad8.xml
[2014-05-29 07:55:06,054] INFO - pl.patch.ProjectSourcesOnAgent - Updating sources for root id=27876; name=[15116-12]_MYTEAM::GIT_VCS; revision: dff43c329bc0495efd66ffcfd4fddd26e66e4a50
[2014-05-29 07:55:06,072] INFO - gers.vcs.git.agent.UpdaterImpl - Starting update of root [15116-12]_MYTEAM::GIT_VCS in /opt/buildAgent/work/413442a249b8bad8 to revision dff43c329bc0495efd66ffcfd4fddd26e66e4a50
[2014-05-29 07:55:06,073] INFO - gers.vcs.git.agent.UpdaterImpl - Cleaning /opt/buildAgent/work/413442a249b8bad8
[2014-05-29 07:55:06,074] INFO - rectories.DirectoryCleanerImpl - Move directory /opt/buildAgent/work/413442a249b8bad8 to /opt/buildAgent/work/.old/413442a249b8bad8_18 for cleaning
[2014-05-29 07:58:16,562] WARN - ch.UpdateSourcesBuildStageBase - Error while checkout on agent: '/usr/bin/git -c core.askpass=/opt/buildAgent/temp/buildTmp/pass4372765007199018345 fetch --progress origin +refs/heads/master:refs/remotes/origin/master' command failed.
stderr: error: Failed connect to stash.mySite.com:8081; Operation now in progress while accessing https://build_user@stash.mySite.com:8081/scm/myProject.git/info/refs?service=git-upload-pack
fatal: HTTP request failed
jetbrains.buildServer.vcs.VcsException: '/usr/bin/git -c core.askpass=/opt/buildAgent/temp/buildTmp/pass4372765007199018345 fetch --progress origin +refs/heads/master:refs/remotes/origin/master' command failed.
stderr: error: Failed connect to stash.mySite.com:8081; Operation now in progress while accessing https://build_user@stash.mySite.com:8081/scm/myProject.git/info/refs?service=git-upload-pack
fatal: HTTP request failed
at jetbrains.buildServer.buildTriggers.vcs.git.agent.command.impl.CommandUtil.commandFailed(CommandUtil.java:64)
at jetbrains.buildServer.buildTriggers.vcs.git.agent.command.impl.CommandUtil.checkCommandFailed(CommandUtil.java:41)
at jetbrains.buildServer.buildTriggers.vcs.git.agent.command.impl.CommandUtil.runCommand(CommandUtil.java:109)
at jetbrains.buildServer.buildTriggers.vcs.git.agent.GitCommandLine.run(GitCommandLine.java:83)
at jetbrains.buildServer.buildTriggers.vcs.git.agent.command.impl.FetchCommandImpl.call(FetchCommandImpl.java:102)
at jetbrains.buildServer.buildTriggers.vcs.git.agent.UpdaterImpl.fetch(UpdaterImpl.java:496)
at jetbrains.buildServer.buildTriggers.vcs.git.agent.UpdaterImpl.fetchDefaultBranch(UpdaterImpl.java:452)
at jetbrains.buildServer.buildTriggers.vcs.git.agent.UpdaterImpl.fetchFromOriginalRepository(UpdaterImpl.java:441)
at jetbrains.buildServer.buildTriggers.vcs.git.agent.UpdaterImpl.ensureCommitLoaded(UpdaterImpl.java:432)
at jetbrains.buildServer.buildTriggers.vcs.git.agent.UpdaterImpl.doFetch(UpdaterImpl.java:427)
at jetbrains.buildServer.buildTriggers.vcs.git.agent.UpdaterImpl.doUpdate(UpdaterImpl.java:109)
at jetbrains.buildServer.buildTriggers.vcs.git.agent.UpdaterImpl.update(UpdaterImpl.java:102)
at jetbrains.buildServer.buildTriggers.vcs.git.agent.GitAgentVcsSupport.updateSources(GitAgentVcsSupport.java:90)
at jetbrains.buildServer.agent.impl.patch.ProjectSourcesOnAgent$1.run(ProjectSourcesOnAgent.java:252)
at java.lang.Thread.run(Thread.java:744)
VCS根设置:
Type of VCS: Git
Fetch URL: https://stash.mySite.com:8081/scm/myProject.git
Push URL: Empty
Default branch: refs/heads/master
Authentication method: Password
Test connection: ok
请注意,我使用https连接git-Client和Stash之间的对话。
与上面在代理上手动工作的TeamCity日志中相同的命令:buildAgent:~/cd/opt/buildAgent/work/413442a249b8bad8 buildAgent::/opt/buildAgent/work/413442a249b8bad8
结果关联
* [new tag] myProject-1.2 -> myProject-1.2
* [new tag] myProject-1.3 -> myProject-1.3
* [new tag] myProject-1.4 -> myProject-1.4
* Closing connection #0
如何修复它?
我解决了这个问题。我们使用Stash,因此在构建代理中,我应该向~/. gitconfig添加Stash的用户。
[user]
name = MyUserName
email = myEmail
在团队城市获取URL路径到git回购的Stash也应该有这个用户,例如:
https:myUser@stash.mySite.com:8081
无法对代理执行签出:“”C:\Program Files\git\bin\git.exe“-C Core.askpass=C:\TeamCity\BuildAgent\Temp\BuildTmp\Pass8517307457314531623.bat-C Credential.helper=-C Credential.helper=C:/TeamCity/Buildagent/Temp/Build
我做了一个自定义GTM来跟踪结账步骤。我使用自定义JS变量来填充电子商务对象。 我得到步骤1进入我的GA,但不是其他选项,尽管在预览模式下,我看到代码正确地发射。 签出过程如下所示: 实例com/cart-通过GTM发送步骤1(跟踪类型-事件,触发器-URL)示例。com/签出-通过GTM发送步骤2(跟踪类型-事件,触发器-URL) 第3步在元素#装运可见时触发(轨迹类型-事件,触发器-元素可见性
我刚学了几天Hadoop,当我在Hadoop中执行Mahout的示例代码时,我得到了以下错误: 代码段
我在使用时遇到了一些问题。运行命令
我有一个常规的云服务器设置,我有一个移动应用程序通过HTTP请求与服务器交谈。我也有一个Wifi设备,我需要发送消息,我想通过MQTT做到这一点。当移动应用程序发生一些变化时,我希望云服务器通过MQTT发布一个主题,这样wifi设备就可以接收消息。经纪人也可以是客户吗?我是不是理解错了?
我是java新手。我正在尝试编写一个java代理。当用演示应用程序运行它时,它失败了,有以下消息: 以下是代码和pom文件:https://gist.github.com/proywm/f27b72d01aa66afc7f0f8c098e33e914 你能告诉我如何解决这个问题吗?