Skip to content

Commit f34fec5

Browse files
michel-latermanmergify[bot]
authored andcommitted
Fail cloude2e step if tests can't run, fix image publication (#5000)
Fail the pipeline if cloude2e tests can't run. mage docker:image now uses the DOCKER_IMAGE env var. (cherry picked from commit 8adb94d)
1 parent 3d924c2 commit f34fec5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.buildkite/scripts/cloud_e2e_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if [[ "${FLEET_SERVER_URL}" == "" ]]; then
4141
--style "error"
4242
fi
4343
echo "${message}"
44-
exit 0
44+
exit 1
4545
fi
4646

4747
echo "--- Trigger cloud E2E test"

magefile.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,7 @@ func (Docker) Cover() error {
968968
// DEV creates a development image.
969969
// SNAPSHOT creates a snapshot image.
970970
// VERSION_QUALIFIER may be used to manually specify a version qualifer for the image tag.
971+
// DOCKER_IMAGE may be used to completely specify the image name.
971972
// DOCKER_IMAGE_TAG may be used to completely specify the image tag.
972973
func (Docker) Image() error {
973974
dockerFile := "Dockerfile"
@@ -982,6 +983,9 @@ func (Docker) Image() error {
982983
dockerFile = dockerBuilderFIPS
983984
image += "-fips"
984985
}
986+
if v, ok := os.LookupEnv(envDockerImage); ok && v != "" {
987+
image = v
988+
}
985989

986990
return sh.RunWithV(map[string]string{"DOCKER_BUILDKIT": "1"}, "docker", "build",
987991
"--build-arg", "GO_VERSION="+getGoVersion(),
@@ -1615,7 +1619,6 @@ func (Test) Benchstat() error {
16151619
func (Test) E2e() {
16161620
os.Setenv(envDev, "true")
16171621
os.Setenv(envSnapshot, "true")
1618-
os.Setenv(envDockerImage, "fleet-server-e2e-agent")
16191622

16201623
// Set PLATFORMS to linux/$GOARCH + a binary for the local system
16211624
pList := []string{

0 commit comments

Comments
 (0)