[CI] Rationalize Backtrace tokens

This commit is contained in:
Mat Sutcliffe
2020-09-15 18:23:39 +01:00
parent ff9baf605b
commit aa32544b53
5 changed files with 19 additions and 6 deletions

View File

@@ -70,7 +70,8 @@ jobs:
runs-on: ubuntu-16.04 runs-on: ubuntu-16.04
needs: preBuild needs: preBuild
env: env:
BACKTRACE_TOKEN: ${{ secrets.BACKTRACE_TOKEN }} BACKTRACE_SYMBOL_TOKEN: ${{ secrets.BACKTRACE_SYMBOL_TOKEN }}
BACKTRACE_MINIDUMP_TOKEN: ${{ secrets.BACKTRACE_MINIDUMP_TOKEN }}
BITROCK_BUILDER: ~/installbuilder/bin/builder BITROCK_BUILDER: ~/installbuilder/bin/builder
outputs: outputs:
warnings: ${{ steps.warnings.outputs.warnings }} warnings: ${{ steps.warnings.outputs.warnings }}
@@ -148,7 +149,8 @@ jobs:
runs-on: windows-2019 runs-on: windows-2019
needs: preBuild needs: preBuild
env: env:
BACKTRACE_TOKEN: ${{ secrets.BACKTRACE_TOKEN }} BACKTRACE_SYMBOL_TOKEN: ${{ secrets.BACKTRACE_SYMBOL_TOKEN }}
BACKTRACE_MINIDUMP_TOKEN: ${{ secrets.BACKTRACE_MINIDUMP_TOKEN }}
BITROCK_BUILDER: "$(USERPROFILE)/installbuilder/bin/builder-cli.exe" BITROCK_BUILDER: "$(USERPROFILE)/installbuilder/bin/builder-cli.exe"
outputs: outputs:
warnings: ${{ steps.warnings.outputs.warnings }} warnings: ${{ steps.warnings.outputs.warnings }}
@@ -231,7 +233,8 @@ jobs:
runs-on: windows-2019 runs-on: windows-2019
needs: preBuild needs: preBuild
env: env:
BACKTRACE_TOKEN: ${{ secrets.BACKTRACE_TOKEN }} BACKTRACE_SYMBOL_TOKEN: ${{ secrets.BACKTRACE_SYMBOL_TOKEN }}
BACKTRACE_MINIDUMP_TOKEN: ${{ secrets.BACKTRACE_MINIDUMP_TOKEN }}
BITROCK_BUILDER: "$(USERPROFILE)/installbuilder/bin/builder-cli.exe" BITROCK_BUILDER: "$(USERPROFILE)/installbuilder/bin/builder-cli.exe"
outputs: outputs:
warnings: ${{ steps.warnings.outputs.warnings }} warnings: ${{ steps.warnings.outputs.warnings }}
@@ -308,7 +311,8 @@ jobs:
runs-on: macos-10.15 runs-on: macos-10.15
needs: preBuild needs: preBuild
env: env:
BACKTRACE_TOKEN: ${{ secrets.BACKTRACE_TOKEN }} BACKTRACE_SYMBOL_TOKEN: ${{ secrets.BACKTRACE_SYMBOL_TOKEN }}
BACKTRACE_MINIDUMP_TOKEN: ${{ secrets.BACKTRACE_MINIDUMP_TOKEN }}
BITROCK_BUILDER: /Applications/installbuilder/bin/Builder.app/Contents/MacOS/installbuilder.sh BITROCK_BUILDER: /Applications/installbuilder/bin/Builder.app/Contents/MacOS/installbuilder.sh
outputs: outputs:
warnings: ${{ steps.warnings.outputs.warnings }} warnings: ${{ steps.warnings.outputs.warnings }}

View File

@@ -250,7 +250,7 @@ class Builder:
def __upload_symbol_files(self, symbols_package): def __upload_symbol_files(self, symbols_package):
print('Uploading symbols') print('Uploading symbols')
url = 'https://swift-project.sp.backtrace.io:6098/post' url = 'https://swift-project.sp.backtrace.io:6098/post'
token = os.environ['BACKTRACE_TOKEN'] token = os.environ['BACKTRACE_SYMBOL_TOKEN']
data = open(symbols_package, 'rb').read() data = open(symbols_package, 'rb').read()
params = ( params = (

View File

@@ -118,6 +118,9 @@ namespace BlackConfig
//! Vatsim client key //! Vatsim client key
static const QString &vatsimPrivateKey(); // defined in buildconfig_gen.cpp.in static const QString &vatsimPrivateKey(); // defined in buildconfig_gen.cpp.in
//! Backtrace token for minidump uploads
static const QString &backtraceToken(); // defined in buildconfig_gen.cpp.in
//! GitHub repository URL //! GitHub repository URL
static const QString &gitHubRepoUrl(); static const QString &gitHubRepoUrl();

View File

@@ -30,6 +30,12 @@ const QString &BlackConfig::CBuildConfig::vatsimPrivateKey()
return pk; return pk;
} }
const QString &BlackConfig::CBuildConfig::backtraceToken()
{
static const auto bt = QString { \"$$(BACKTRACE_MINIDUMP_TOKEN)\" };
return bt;
}
const QString &BlackConfig::CBuildConfig::gitHeadSha1() const QString &BlackConfig::CBuildConfig::gitHeadSha1()
{ {
static const QString gitHeadSha1(\"$$GIT_HEAD_SHA1\"); static const QString gitHeadSha1(\"$$GIT_HEAD_SHA1\");

View File

@@ -68,7 +68,7 @@ namespace BlackMisc
std::map<std::string, std::string> annotations; std::map<std::string, std::string> annotations;
// Backtrace annotations // Backtrace annotations
annotations["token"] = "b15efd93e290be3cf5d39750cadc092b651327ff0c027b80abd75e0ee50df1da"; annotations["token"] = CBuildConfig::backtraceToken().toStdString();
annotations["format"] = "minidump"; annotations["format"] = "minidump";
annotations["commit"] = CBuildConfig::gitHeadSha1().toStdString(); annotations["commit"] = CBuildConfig::gitHeadSha1().toStdString();
annotations["version"] = CBuildConfig::getVersionString().toStdString(); annotations["version"] = CBuildConfig::getVersionString().toStdString();