Skip to content

Commit 3ee7855

Browse files
Fail cloude2e step if tests can't run, fix image publication (elastic#5000)
Fail the pipeline if cloude2e tests can't run. mage docker:image now uses the DOCKER_IMAGE env var.
1 parent fed2569 commit 3ee7855

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
@@ -966,6 +966,7 @@ func (Docker) Cover() error {
966966
// DEV creates a development image.
967967
// SNAPSHOT creates a snapshot image.
968968
// VERSION_QUALIFIER may be used to manually specify a version qualifer for the image tag.
969+
// DOCKER_IMAGE may be used to completely specify the image name.
969970
// DOCKER_IMAGE_TAG may be used to completely specify the image tag.
970971
func (Docker) Image() error {
971972
dockerFile := "Dockerfile"
@@ -980,6 +981,9 @@ func (Docker) Image() error {
980981
dockerFile = dockerBuilderFIPS
981982
image += "-fips"
982983
}
984+
if v, ok := os.LookupEnv(envDockerImage); ok && v != "" {
985+
image = v
986+
}
983987

984988
return sh.RunWithV(map[string]string{"DOCKER_BUILDKIT": "1"}, "docker", "build",
985989
"--build-arg", "GO_VERSION="+getGoVersion(),
@@ -1602,7 +1606,6 @@ func (Test) Benchstat() error {
16021606
func (Test) E2e() {
16031607
os.Setenv(envDev, "true")
16041608
os.Setenv(envSnapshot, "true")
1605-
os.Setenv(envDockerImage, "fleet-server-e2e-agent")
16061609

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

0 commit comments

Comments
 (0)