Skip to content

Commit

Permalink
ci(bosh): always print out the effective HAProxy config on deployment
Browse files Browse the repository at this point in the history
When the deployment doens't meet expectations, the resulting config
was not printed, which made debugging the error more difficult.

This ensures that the active HAProxy config, as currently deployed,
will be output, even if the deployment later fails (but shouldn't).
  • Loading branch information
peanball committed Oct 29, 2024
1 parent 5b7ffb1 commit 06ce19d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions acceptance-tests/bosh_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ func deployHAProxy(baseManifestVars baseManifestVars, customOpsfiles []string, c
cmd, varsStoreReader := deployBaseManifestCmd(baseManifestVars.deploymentName, opsfiles, manifestVars)

dumpCmd(cmd)

// Dump HAProxy config to help debugging
haproxyInfo := buildHAProxyInfo(baseManifestVars, varsStoreReader)
dumpHAProxyConfig(haproxyInfo)

session, err := gexec.Start(cmd, GinkgoWriter, GinkgoWriter)
Expect(err).NotTo(HaveOccurred())

Expand All @@ -158,12 +163,6 @@ func deployHAProxy(baseManifestVars baseManifestVars, customOpsfiles []string, c
Eventually(session, 20*time.Minute, time.Second).Should(gexec.Exit())
Expect(session.ExitCode()).NotTo(BeZero())
}

haproxyInfo := buildHAProxyInfo(baseManifestVars, varsStoreReader)

// Dump HAProxy config to help debugging
dumpHAProxyConfig(haproxyInfo)

return haproxyInfo, varsStoreReader
}

Expand Down

0 comments on commit 06ce19d

Please sign in to comment.