Skip to content

Commit

Permalink
Cleanup ci refresh rollout (#1193)
Browse files Browse the repository at this point in the history
This commit updates the `docker-setup.sh` and `.travis.yml` files to follow the
current patterns in the CI refresh rolled out to accomidate the new release
cadence. The specific changes are explicitly passing a parameter to the docker
pull function in the setup script and ensuring that the travis config segments
steps correctly.
  • Loading branch information
donoghuc authored Dec 3, 2024
1 parent b558150 commit 8f9ecff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 5 additions & 4 deletions .ci/docker-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -e

pull_docker_snapshot() {
project="${1?project name required}"
stack_version_alias="${2?stack version alias required}"
local docker_image="docker.elastic.co/${project}/${project}${DISTRIBUTION_SUFFIX}:${ELASTIC_STACK_VERSION}"
echo "Pulling $docker_image"
if docker pull "$docker_image" ; then
Expand All @@ -30,8 +31,8 @@ if [ -z "${ELASTIC_STACK_VERSION}" ]; then
exit 1
fi

# save the original arg if needed
ELASTIC_STACK_VERSION_ARG="$ELASTIC_STACK_VERSION"
# The ELASTIC_STACK_VERSION may be an alias, save the original before translating it
ELASTIC_STACK_VERSION_ALIAS="$ELASTIC_STACK_VERSION"

echo "Fetching versions from $VERSION_URL"
VERSIONS=$(curl -s $VERSION_URL)
Expand Down Expand Up @@ -64,9 +65,9 @@ export DISTRIBUTION_SUFFIX
echo "Testing against version: $ELASTIC_STACK_VERSION (distribution: ${DISTRIBUTION:-"default"})"

if [[ "$ELASTIC_STACK_VERSION" = *"-SNAPSHOT" ]]; then
pull_docker_snapshot "logstash"
pull_docker_snapshot "logstash" $ELASTIC_STACK_VERSION_ALIAS
if [ "$INTEGRATION" == "true" ]; then
pull_docker_snapshot "elasticsearch"
pull_docker_snapshot "elasticsearch" $ELASTIC_STACK_VERSION_ALIAS
fi
fi

Expand Down
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ import:
jobs:
include:
- stage: "Integration Tests"
- env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=7.current
env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=7.current
- env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.previous
- env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.current
- env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.next
- env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.future
# - env: INTEGRATION=true SNAPSHOT=true LOG_LEVEL=info ELASTIC_STACK_VERSION=main
- stage: "Secure Integration Tests"
- env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.current SNAPSHOT=true
env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info ELASTIC_STACK_VERSION=8.current SNAPSHOT=true
- env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info ELASTIC_STACK_VERSION=7.current
- env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info ELASTIC_STACK_VERSION=7.current ES_SSL_KEY_INVALID=true
- env: SECURE_INTEGRATION=true INTEGRATION=true LOG_LEVEL=info ELASTIC_STACK_VERSION=7.current ES_SSL_SUPPORTED_PROTOCOLS=TLSv1.3

0 comments on commit 8f9ecff

Please sign in to comment.