mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
Ensure provisioning works even without the secrets
Change-Id: I3869e881341a719da8a351095c3bf314c2fa2f34 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
@@ -31,9 +31,16 @@
|
||||
##
|
||||
#############################################################################
|
||||
|
||||
$auth_file = "C:\Users\qt\work\influxdb\coin_vms_writer.auth"
|
||||
|
||||
# Provisioning should run even without the secrets repository
|
||||
if (Test-Path $auth_file) {
|
||||
$auth_content = Get-Content $auth_file
|
||||
$influxdb_password = $auth_content.Substring($auth_content.LastIndexOf(':') + 1)
|
||||
Remove-Item $auth_file
|
||||
} else {
|
||||
$influxdb_password = "no_password_provided"
|
||||
}
|
||||
|
||||
$colon_file = Get-Content "C:\Users\qt\work\influxdb\coin_vms_writer.auth"
|
||||
$influxdb_password = $colon_file.Substring($colon_file.LastIndexOf(':') + 1)
|
||||
$telegraf_conf = "C:\telegraf-coin.conf"
|
||||
(Get-Content $telegraf_conf) | ForEach-Object { $_.Replace("COIN_VMS_WRITER_PASS", $influxdb_password) } | Out-File -Encoding UTF8 $telegraf_conf
|
||||
Remove-Item "C:\Users\qt\work\influxdb\coin_vms_writer.auth"
|
||||
|
||||
Reference in New Issue
Block a user