summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortpowell-progress <104777878+tpowell-progress@users.noreply.github.com>2023-02-27 11:01:38 -0800
committerGitHub <noreply@github.com>2023-02-27 14:01:38 -0500
commit69a19c2ce7cf6933dfc4c4a32e159b1b44847ff5 (patch)
tree38129ac4184b22fdca36d6580ae579fdbde0cde1
parentb12e038a577f12bede63eeffe876a0b40ab762dc (diff)
downloadchef-69a19c2ce7cf6933dfc4c4a32e159b1b44847ff5.tar.gz
Force errors after bundler (#13613)
Signed-off-by: Thomas Powell <powell@progress.com>
-rw-r--r--.expeditor/scripts/omnibus_chef_build.ps19
1 files changed, 6 insertions, 3 deletions
diff --git a/.expeditor/scripts/omnibus_chef_build.ps1 b/.expeditor/scripts/omnibus_chef_build.ps1
index bcedaa1b60..5bd8bfbcf5 100644
--- a/.expeditor/scripts/omnibus_chef_build.ps1
+++ b/.expeditor/scripts/omnibus_chef_build.ps1
@@ -3,17 +3,17 @@ $ScriptDir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
if ($env:BUILDKITE_ORGANIZATION_SLUG -eq "chef-oss" )
{
Write-Output "--- Generating self-signed Windows package signing certificate"
- $thumb = (New-SelfSignedCertificate -Type Custom -Subject "CN=Chef Software, O=Progress, C=US" -KeyUsage DigitalSignature -FriendlyName "Chef Software Inc." -CertStoreLocation "Cert:\LocalMachine\My" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")).Thumbprint
+ $thumb = (New-SelfSignedCertificate -Type Custom -Subject "CN=Chef Software, O=Progress, C=US" -KeyUsage DigitalSignature -FriendlyName "Chef Software Inc." -CertStoreLocation "Cert:\LocalMachine\My" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")).Thumbprint
}
else
{
Write-Output "--- Installing Windows package signing certificate"
$windows_certificate_json = "windows-package-signing-certificate.json"
$windows_certificate_pfx = "windows-package-signing-certificate.pfx"
-
+
aws ssm get-parameter --name "windows-package-signing-cert" --with-decryption --region "us-west-1" --query Parameter.Value --output text | Set-Content -Path $windows_certificate_json
If ($lastexitcode -ne 0) { Throw $lastexitcode }
-
+
$cert_passphrase = Get-Content $windows_certificate_json | ConvertFrom-Json | Select-Object -ExpandProperty cert_passphrase | ConvertTo-SecureString -asplaintext -force
Get-Content $windows_certificate_json | ConvertFrom-Json | Select-Object -ExpandProperty cert_content_base64 | Set-Content -Path $windows_certificate_pfx
Remove-Item -Force $windows_certificate_json
@@ -54,9 +54,11 @@ Write-Output "--- Running bundle install for Omnibus"
Set-Location "$($ScriptDir)/../../omnibus"
bundle config set --local without development
bundle install
+if ( -not $? ) { throw "Running bundle install failed" }
Write-Output "--- Building Chef"
bundle exec omnibus build chef -l internal --override append_timestamp:false
+if ( -not $? ) { throw "omnibus build chef failed" }
Write-Output "--- Uploading package to BuildKite"
C:\buildkite-agent\bin\buildkite-agent.exe artifact upload "pkg/*.msi*"
@@ -68,4 +70,5 @@ if ($env:BUILDKITE_ORGANIZATION_SLUG -ne "chef-oss" )
Write-Output "--- Publishing package to Artifactory"
bundle exec ruby "${ScriptDir}/omnibus_chef_publish.rb"
+ if ( -not $? ) { throw "chef publish failed" }
}