microsoft / azure-pipelines-agent

Azure Pipelines Agent 🚀
MIT License
1.73k stars 870 forks source link

Run agent in Service mode #1058

Closed jachakrohit07 closed 7 years ago

jachakrohit07 commented 7 years ago

Can you please specify in detail how I can run the build agent on the TFS server in the "Service mode" as the build agent stops working sometimes just before the release to the production?

TingluoHuang commented 7 years ago

@jachakrohit07 here is the doc for agent config https://www.visualstudio.com/en-us/docs/build/actions/agents/v2-windows#download-and-configure-the-agent

can you share detail error you get?

jachakrohit07 commented 7 years ago

To run the agent interactively I type " C:\Agent\Agent\VsoAgent.exe" in the command prompt on my TFS server. But to use it in the "Service" mode, what are the commands for it?

TingluoHuang commented 7 years ago

@jachakrohit07 you need config the agent as windows service, please follow doc to configure the agent https://www.visualstudio.com/en-us/docs/build/actions/agents/v1-windows#download-and-configure-the-agent

also, looks like you are using 1.x agent, please consider switch to use 2.x agent, since 1.x has been deprecated.

jachakrohit07 commented 7 years ago

I have urgent question regarding changeset report generation in tfs as I want to link changeset id to tasks in the report. Please help I tried following query but final result gives no rows.

SELECT DISTINCT --df.[FileName] --,df.FilePath dwi.System_title AS 'Title' ,dcs.ChangesetID AS 'ChangeSetID' ,dwi.System_id AS 'WorkItemID' ,dwi.System_WorkItemType ,dwi.System_State ,dwi.System_CreatedDate ,dwi.System_ChangedDate

FROM DimFile df JOIN FactCodeChurn fcc ON df.FileSK = fcc.FilenameSK JOIN FactWorkItemChangeset fwi ON fcc.ChangesetSK = fwi.ChangesetSK JOIN DimWorkItem dwi ON fwi.WorkItemID = dwi.System_id AND fwi.TeamProjectCollectionSK = dwi.TeamProjectCollectionSK AND fwi.RemovedDateTime = CONVERT(DATETIME, N'9999', 126) JOIN DimChangeset dcs ON dcs.ChangesetSK = fcc.ChangesetSK

WHERE dwi.System_revisedDate = CONVERT(DATETIME, N'9999', 126) --AND df.FilePath LIKE '%$repositorylocation%' --AND dwi.System_WorkItemType IN ('Product Backlog Item', 'Task', 'Bug')

ORDER BY dcs.ChangesetID

On Wed, Jul 5, 2017 at 3:37 PM, Ting notifications@github.com wrote:

@jachakrohit07 https://github.com/jachakrohit07 here is the doc for agent config https://www.visualstudio.com/en-us/docs/build/actions/ agents/v2-windows#download-and-configure-the-agent

can you share detail error you get?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/vsts-agent/issues/1058#issuecomment-313219773, or mute the thread https://github.com/notifications/unsubscribe-auth/AIP1qLQ0O0HBbxpFXOUM_crkHFpgyK2bks5sK_QggaJpZM4OO1gp .