コミュニティからの入力がない場合、ここには最初の作業用のkludgeがあります。
最初のビルド
が最初チームシティービルドステップの最初の行
であるステップ:
git verify-commit HEAD~0
export VERIFY_EXIT_CODE=$?
if [ "$VERIFY_EXIT_CODE" -eq "0" ]
then
echo "Git commit GPG signature is VERIFIED"
else
echo "Git commit GPG signature is NOT VERIFIED"
build stop
fi
GPG署名が
ザが検証GPG署名を有するコミット
を検証し、出力はこのようになります。
[12:17:54] Step 1/3: Verify GPG signature on commit (Command Line)
[12:17:54][Step 1/3] Starting: /home/*******/Applications/TeamCity/buildAgent_***_1/temp/agentTmp/custom_script5468853061762530637
[12:17:54][Step 1/3] in directory: /home/*******/Applications/TeamCity/buildAgent_***_1/work/c8edabae02b7df61
[12:17:54][Step 1/3]
[12:17:54][Step 1/3] git verify-commit HEAD~0
[12:17:54][Step 1/3] gpg: Signature made Tue 05 Sep 2017 12:15:59 PM MDT using RSA key ID 71F1FCB8
[12:17:54][Step 1/3] gpg: Good signature from "My Name (*** gpg key) <******@*****.***>"
[12:17:54][Step 1/3]
[12:17:54][Step 1/3] export VERIFY_EXIT_CODE=$?=0
[12:17:54][Step 1/3] Git commit GPG signature is VERIFIED
[12:17:54][Step 1/3] Process exited with code 0
GPG署名が未確認
コミットは何の検証GPG署名を持っていない、またはチームシティーは、公開鍵が見つからない場合は、出力は次のようになります。
[12:10:37] Step 1/3: Verify gpg signature on git repository (Command Line)
[12:10:37][Step 1/3] Starting: /home/*******/Applications/TeamCity/buildAgent_***_1/temp/agentTmp/custom_script4984466249864504039
[12:10:37][Step 1/3] in directory: /home/*******/Applications/TeamCity/buildAgent_***_1/work/c8edabae02b7df61
[12:10:37][Step 1/3] git verify-commit HEAD~0
[12:10:37][Step 1/3] Git repository is NOT VERIFIED
[12:10:37][Step 1/3]
[12:10:37][Step 1/3] export VERIFY_EXIT_CODE=$?=1
[12:10:37][Step 1/3] Git repository is NOT VERIFIED
[12:10:37][Step 1/3]
[12:10:37][Step 1/3] build stop
[12:10:37][Step 1/3] /home/*******/Applications/TeamCity/buildAgent_***_1/temp/agentTmp/custom_script4984466249864504039: line 19: build: command not found
[12:10:37][Step 1/3] Process exited with code 127
[12:10:37][Step 1/3] Process exited with code 127
[12:10:37][Step 1/3] Step Verify gpg signature on git repository (Command Line) failed
[12:10:37][Step 1/3] Error message is logged