diff --git a/.buildkite/release-docker/run.sh b/.buildkite/release-docker/run.sh index 204f7ff2a..dc57e51d7 100644 --- a/.buildkite/release-docker/run.sh +++ b/.buildkite/release-docker/run.sh @@ -20,14 +20,11 @@ DOCKER_PASSWORD=$(vault read -field token /secret/ci/elastic-rally/release/docke retry 5 docker login -u elasticmachine -p $DOCKER_PASSWORD unset DOCKER_PASSWORD -set -x tmp_dir=$(mktemp --directory) pushd "$tmp_dir" git clone https://github.com/elastic/rally pushd rally -printenv - # checkout the latest version, to make sure we get the latest docker security fixes if [[ ! -z "${BUILDKITE_BRANCH}" ]]; then git checkout "${BUILDKITE_BRANCH}" @@ -37,6 +34,7 @@ fi git --no-pager show +set -x export TERM=dumb export LC_ALL=en_US.UTF-8 ./release-docker.sh "$RELEASE_VERSION" "$ARCH" "$PUSH_LATEST" diff --git a/esrally/_version.py b/esrally/_version.py index f6f9a7ebb..04f0e7534 100644 --- a/esrally/_version.py +++ b/esrally/_version.py @@ -1 +1 @@ -__version__ = "2.11.0-testing" +__version__ = "2.11.0.dev0" diff --git a/it/docker_dev_image_test.py b/it/docker_dev_image_test.py index 4830a33dd..f504d25ec 100644 --- a/it/docker_dev_image_test.py +++ b/it/docker_dev_image_test.py @@ -60,6 +60,7 @@ def run_docker_compose_up(test_command): env_variables = os.environ.copy() env_variables["TEST_COMMAND"] = test_command env_variables["RALLY_VERSION"] = version.__version__ + env_variables["RALLY_VERSION_TAG"] = version.__version__ return process.run_subprocess_with_logging( f"docker-compose -f {it.ROOT_DIR}/docker/docker-compose-tests.yml up --abort-on-container-exit", env=env_variables diff --git a/release-docker-manifest.sh b/release-docker-manifest.sh index 3f8738b84..b7019fdb3 100755 --- a/release-docker-manifest.sh +++ b/release-docker-manifest.sh @@ -41,6 +41,7 @@ export GIT_SHA=$(git rev-parse --short HEAD) export DATE=$(date +%Y%m%d) export RALLY_VERSION_TAG="${RALLY_VERSION}-${DATE}" +export DOCKER_TAG_VERSION="${RALLY_VERSION}" export DOCKER_TAG_LATEST="latest" echo "========================================================" @@ -58,27 +59,36 @@ docker manifest create elastic/rally:${RALLY_VERSION_TAG} \ --amend elastic/rally:${RALLY_VERSION_TAG}-amd64 \ --amend elastic/rally:${RALLY_VERSION_TAG}-arm64 +trap push_failed ERR +echo "=======================================================" +echo "Publishing Docker image elastic/rally:$RALLY_VERSION_TAG" +echo "=======================================================" +docker manifest push elastic/rally:${RALLY_VERSION_TAG} +trap - ERR + if [[ $PUSH_LATEST == "true" ]]; then - trap push_failed ERR echo "=======================================================" - echo "Publishing Docker image elastic/rally:$RALLY_VERSION_TAG" + echo "Creating Docker manifest image for Rally $DOCKER_TAG_VERSION" echo "=======================================================" - docker manifest push elastic/rally:${RALLY_VERSION_TAG} - trap - ERR + + docker manifest create elastic/rally:${DOCKER_TAG_VERSION} \ + --amend elastic/rally:${RALLY_VERSION_TAG}-amd64 \ + --amend elastic/rally:${RALLY_VERSION_TAG}-arm64 echo "=======================================================" echo "Creating Docker manifest image for Rally $DOCKER_TAG_LATEST" echo "=======================================================" docker manifest create elastic/rally:${DOCKER_TAG_LATEST} \ - --amend elastic/rally:${DOCKER_TAG_LATEST}-amd64 \ - --amend elastic/rally:${DOCKER_TAG_LATEST}-arm64 + --amend elastic/rally:${RALLY_VERSION_TAG}-amd64 \ + --amend elastic/rally:${RALLY_VERSION_TAG}-arm64 echo "=======================================================" echo "Publishing Docker image elastic/rally:${DOCKER_TAG_LATEST}" echo "=======================================================" trap push_failed ERR + docker manifest push elastic/rally:${DOCKER_TAG_VERSION} docker manifest push elastic/rally:${DOCKER_TAG_LATEST} fi