Skip to content

Commit

Permalink
Use fleet-server binary version for cloude2e images (#3314)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
michel-laterman authored Feb 23, 2024
1 parent 0114a25 commit 8f7dcc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ release-manager-release: ## - Builds a snapshot release. The Go version defined
## get-version : Get the Fleet server version
.PHONY: get-version
get-version:
@echo $(DEFAULT_VERSION)
@echo $(VERSION)

##################################################
# Integration testing targets
Expand Down
4 changes: 3 additions & 1 deletion dev-tools/cloud/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ VCS_REF=$(docker inspect -f '{{index .Config.Labels "org.label-schema.vcs-ref"}}
CUSTOM_IMAGE_TAG=${CUSTOM_IMAGE_TAG:-"${STACK_VERSION}-${USER_NAME}-$(date +%s)"}

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

docker build \
-f $REPO_ROOT/dev-tools/cloud/docker/Dockerfile \
--build-arg ELASTIC_AGENT_IMAGE=$BASE_IMAGE \
--build-arg STACK_VERSION=$STACK_VERSION \
--build-arg STACK_VERSION=${FLEET_VERSION} \
--build-arg VCS_REF_SHORT=${VCS_REF:0:6} \
--platform linux/$GOARCH \
-t ${CI_ELASTIC_AGENT_DOCKER_IMAGE}:${CUSTOM_IMAGE_TAG} \
Expand Down

0 comments on commit 8f7dcc9

Please sign in to comment.