mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
build: update hc-install to current (#24199)
Installing Vault and Consul from releases.hashicorp.com via `hc-install` has been failing intermittently. Update the `hc-install` binaries to be current and add one retry to downloads for our compat tests so that we can get builds more reliably green while the underlying issue is being debugged.
This commit is contained in:
@@ -137,7 +137,7 @@ deps: ## Install build and development dependencies
|
||||
go install github.com/bufbuild/buf/cmd/buf@v0.36.0
|
||||
go install github.com/hashicorp/go-changelog/cmd/changelog-build@latest
|
||||
go install golang.org/x/tools/cmd/stringer@v0.18.0
|
||||
go install github.com/hashicorp/hc-install/cmd/hc-install@v0.6.1
|
||||
go install github.com/hashicorp/hc-install/cmd/hc-install@v0.9.0
|
||||
go install github.com/shoenig/go-modtool@v0.2.0
|
||||
|
||||
.PHONY: lint-deps
|
||||
|
||||
@@ -40,8 +40,15 @@ func downloadConsulBuild(t *testing.T, b build, baseDir string) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
defer cancel()
|
||||
|
||||
cmd := exec.CommandContext(ctx, "hc-install", "install", "-version", b.Version, "-path", path, "consul")
|
||||
cmd := exec.CommandContext(ctx, "hc-install", "install",
|
||||
"-version", b.Version, "-path", path, "consul")
|
||||
bs, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
t.Logf("download: failed to download %s, retrying once: %v", b.Version, err)
|
||||
cmd = exec.CommandContext(ctx, "hc-install", "install",
|
||||
"-version", b.Version, "-path", path, "consul")
|
||||
bs, err = cmd.CombinedOutput()
|
||||
}
|
||||
must.NoError(t, err, must.Sprintf("failed to download consul %s: %s", b.Version, string(bs)))
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ sudo apt-get install -y \
|
||||
apt-transport-https ca-certificates gnupg2 stress
|
||||
|
||||
# Install hc-install
|
||||
curl -o /tmp/hc-install.zip https://releases.hashicorp.com/hc-install/0.5.2/hc-install_0.5.2_linux_amd64.zip
|
||||
curl -o /tmp/hc-install.zip https://releases.hashicorp.com/hc-install/0.9.0/hc-install_0.9.0_linux_amd64.zip
|
||||
sudo unzip -d /usr/local/bin /tmp/hc-install.zip
|
||||
|
||||
# Install sockaddr
|
||||
|
||||
@@ -329,6 +329,12 @@ func downloadVaultBuild(t *testing.T, b build) {
|
||||
|
||||
cmd := exec.CommandContext(ctx, "hc-install", "install", "-version", b.Version, "-path", path, "vault")
|
||||
bs, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
t.Logf("download: failed to download %s, retrying once: %v", b.Version, err)
|
||||
cmd = exec.CommandContext(ctx, "hc-install", "install",
|
||||
"-version", b.Version, "-path", path, "vault")
|
||||
bs, err = cmd.CombinedOutput()
|
||||
}
|
||||
must.NoError(t, err, must.Sprintf("failed to download vault %s: %s", b.Version, string(bs)))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user