Skip to content

Commit 8f7dcc9

Browse files
Use fleet-server binary version for cloude2e images (#3314)
Use the fleet-server binary version with snapshot flag when building the cloude2e test image instead of the stack version so fleet-server builds will not fail on version bumps.
1 parent 0114a25 commit 8f7dcc9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ release-manager-release: ## - Builds a snapshot release. The Go version defined
286286
## get-version : Get the Fleet server version
287287
.PHONY: get-version
288288
get-version:
289-
@echo $(DEFAULT_VERSION)
289+
@echo $(VERSION)
290290

291291
##################################################
292292
# Integration testing targets

dev-tools/cloud/docker/build.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ VCS_REF=$(docker inspect -f '{{index .Config.Labels "org.label-schema.vcs-ref"}}
2626
CUSTOM_IMAGE_TAG=${CUSTOM_IMAGE_TAG:-"${STACK_VERSION}-${USER_NAME}-$(date +%s)"}
2727

2828
SNAPSHOT=true make -C $REPO_ROOT release-linux/${GOARCH}
29+
FLEET_VERSION=$(SNAPSHOT=true make -s --no-print-directory -C $REPO_ROOT get-version)
30+
echo "Fleet version: ${FLEET_VERSION}"
2931

3032
docker build \
3133
-f $REPO_ROOT/dev-tools/cloud/docker/Dockerfile \
3234
--build-arg ELASTIC_AGENT_IMAGE=$BASE_IMAGE \
33-
--build-arg STACK_VERSION=$STACK_VERSION \
35+
--build-arg STACK_VERSION=${FLEET_VERSION} \
3436
--build-arg VCS_REF_SHORT=${VCS_REF:0:6} \
3537
--platform linux/$GOARCH \
3638
-t ${CI_ELASTIC_AGENT_DOCKER_IMAGE}:${CUSTOM_IMAGE_TAG} \

0 commit comments

Comments
 (0)