test: update deployer default images (#19554)

This commit is contained in:
R.B. Boyer 2023-11-07 13:15:40 -06:00 committed by GitHub
parent 4d7754ad25
commit d203c0abe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 42 deletions

View File

@ -108,7 +108,7 @@ func (c testBasicL4ExplicitDestinationsCreator) NewConfig(t *testing.T) *topolog
} }
return &topology.Config{ return &topology.Config{
Images: topoutil.TargetImages(), Images: utils.TargetImages(),
Networks: []*topology.Network{ Networks: []*topology.Network{
{Name: clusterName}, {Name: clusterName},
{Name: "wan", Type: "wan"}, {Name: "wan", Type: "wan"},

View File

@ -108,7 +108,7 @@ func (c testBasicL4ImplicitDestinationsCreator) NewConfig(t *testing.T) *topolog
} }
return &topology.Config{ return &topology.Config{
Images: topoutil.TargetImages(), Images: utils.TargetImages(),
Networks: []*topology.Network{ Networks: []*topology.Network{
{Name: clusterName}, {Name: clusterName},
{Name: "wan", Type: "wan"}, {Name: "wan", Type: "wan"},

View File

@ -1,36 +0,0 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package topoutil
import (
"os"
"github.com/hashicorp/consul/test/integration/consul-container/libs/utils"
"github.com/hashicorp/consul/testing/deployer/topology"
)
func TargetImages() topology.Images {
// Start with no preferences.
var images topology.Images
if !runningInCI() {
// Until 1.17 GAs, we want the pre-release versions for these tests,
// run outside of CI for convenience.
images = topology.Images{
ConsulCE: HashicorpDockerProxy + "/hashicorppreview/consul:1.17-dev",
ConsulEnterprise: HashicorpDockerProxy + "/hashicorppreview/consul-enterprise:1.17-dev",
Dataplane: HashicorpDockerProxy + "/hashicorppreview/consul-dataplane:1.3-dev",
}
}
// We want the image overridden by the local build produced by
// 'make test-deployer-setup' or 'make dev-docker'.
testImages := utils.TargetImages()
images = images.OverrideWith(testImages)
return images
}
func runningInCI() bool {
return os.Getenv("GITHUB_ACTIONS") != "" || os.Getenv("CI") != ""
}

View File

@ -6,8 +6,8 @@
package topology package topology
const ( const (
DefaultConsulImage = "hashicorp/consul:1.16.2" DefaultConsulImage = "hashicorp/consul:1.17.0"
DefaultConsulEnterpriseImage = "hashicorp/consul-enterprise:1.16.2-ent" DefaultConsulEnterpriseImage = "hashicorp/consul-enterprise:1.17.0-ent"
DefaultEnvoyImage = "envoyproxy/envoy:v1.26.4" DefaultEnvoyImage = "envoyproxy/envoy:v1.27.2"
DefaultDataplaneImage = "hashicorp/consul-dataplane:1.2.2" DefaultDataplaneImage = "hashicorp/consul-dataplane:1.3.0"
) )

View File

@ -32,7 +32,9 @@ docker run -d --name consul-envoy-check "$consul_latest"
envoy_version="" envoy_version=""
while true; do while true; do
# We have to retry in case consul doesn't fully start up before we get here. # We have to retry in case consul doesn't fully start up before we get here.
set +e
envoy_version="$(docker exec consul-envoy-check sh -c 'wget -q localhost:8500/v1/agent/self -O -' | jq -r '.xDS.SupportedProxies.envoy[0]')" envoy_version="$(docker exec consul-envoy-check sh -c 'wget -q localhost:8500/v1/agent/self -O -' | jq -r '.xDS.SupportedProxies.envoy[0]')"
set -e
if [[ -n "$envoy_version" ]]; then if [[ -n "$envoy_version" ]]; then
break break
fi fi