我想在VSO build vNext上构建成功时自动标记提交.我已经阅读了包含此页面的文档https://msdn.microsoft.com/Library/vs/alm/Build/scripts/variables,我已经设置了一个小的PowerShell脚本.首先,似乎BUILD_REPOSITORY_AUTH_USERNAME变量(及其朋友密码)为空.我猜它们只适用于外部gits?其次,似乎通过运行LibGit2Sharp的任务完成构建检查,因此凭据不会存储在任何帮助程序中.
这是我的PowerShell脚本:
git tag $Env:BUILD_BUILDNUMBER
git status
git config -l
git push --progress https://$Env:GITUSER:$Env:GITPASSWORD@myrepo.visualstudio.com/DefaultCollection/_git/myproject tag $Env:BUILD_BUILDNUMBER
git status
exit
Run Code Online (Sandbox Code Playgroud)
它在我的机器上运行良好但在代理程序(托管池)上运行良好但它似乎在push命令上挂起代理程序(1小时后,它被控制器自动杀死).
这是日志:
******************************************************************************
Starting task: Powershell: tools/GitCommands.ps1
******************************************************************************
HEAD detached at 819e778
nothing to commit, working directory clean
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/bin/curl-ca-bundle.crt
sendemail.smtpserver=/bin/msmtp.exe
diff.astextplain.textconv=astextplain
rebase.autosquash=true
core.bare=false
core.filemode=false
core.symlinks=false
core.ignorecase=true
core.logallrefupdates=true
core.repositoryformatversion=0
remote.origin.url=https://myrepo.visualstudio.com/DefaultCollection/_git/myproject
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
******************************************************************************
Finishing task: PowerShell
******************************************************************************
Run Code Online (Sandbox Code Playgroud)
如您所见,push和status命令都没有日志.有关如何实现这一点的任何想法?
通常在 ASP.Net Core 网站中添加 Application Insights(即使没有配置)时,Visual Studio 中的 Application Insights 搜索窗口会显示收集的所有遥测数据(请求、异常等)。
在开发 Azure 函数时,同一窗口非常空,并且没有遥测显示。我已经检查了两种情况下的 TelemetryConfiguration,两者看起来都一样。我高度怀疑这是主机进程/子进程运行隔离并使其无法看到正在发生的事情的功能的问题。
我错过了什么吗?是否值得在任何 GitHub 存储库中打开错误/功能请求?
azure visual-studio azure-application-insights .net-core azure-functions