वीएसओ बिल्ड vNext पर बिल्ड सफल होने पर मैं स्वचालित रूप से एक प्रतिबद्धता टैग करना चाहता हूं। मैंने इस पृष्ठ को https://msdn.microsoft.com/Library/vs/alm/Build/scripts/variables सहित दस्तावेज़ पढ़ा है और मैंने एक छोटी PowerShell स्क्रिप्ट सेट की है। सबसे पहले, ऐसा लगता है कि BUILD_REPOSITORY_AUTH_USERNAME चर (और उसका मित्र पासवर्ड) खाली है। मुझे लगता है कि वे केवल बाहरी गिट्स के साथ उपलब्ध हैं? दूसरा, ऐसा लगता है कि निर्माण के लिए चेकआउट उन कार्यों के माध्यम से किया जाता है जो LibGit2Sharp चलाते हैं, इसलिए किसी भी सहायक में प्रमाण-पत्र संग्रहित नहीं होते हैं।विजुअल स्टूडियो ऑनलाइन (बिल्ड vNext, होस्टेड पूल) पर निर्माण के अंत में गिट टैग
यह मेरा PowerShell स्क्रिप्ट है:
git tag $Env:BUILD_BUILDNUMBER
git status
git config -l
git push --progress https://$Env:GITUSER:$Env:[email protected]/DefaultCollection/_git/myproject tag $Env:BUILD_BUILDNUMBER
git status
exit
यह मेरी मशीन पर लेकिन एजेंट (की मेजबानी पूल) पर अच्छी तरह से काम, लेकिन यह धक्का आदेश में एजेंट बने रहने लगता है (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
******************************************************************************
आप देख सकते हैं, और न ही धक्का स्थिति कमांड के लिए कोई लॉग। इसे प्राप्त करने के तरीके पर कोई विचार?
ऐसा लगता है कि कोई भी env परिवर्तनीय BUILD_REPOSITORY_AUTH_USERNAME नहीं है। तो यह एक बड़ा सवाल है कि गिट में अधिकृत कैसे करें। – Ilya