Skip to content

In ubuntu2004_test automatically find the latest available patch version for each C* major.minor #4025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .build/docker/ubuntu2004_test.docker
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,11 @@ RUN /bin/bash -c "export CASS_DRIVER_NO_CYTHON=1 CASS_DRIVER_NO_EXTENSIONS=1 \
&& pip3 freeze --user"

# Initialize the CCM git repo as well as this also can fail to clone
RUN /bin/bash -c "source ${BUILD_HOME}/env3.8/bin/activate && \
ccm create -n 1 -v git:cassandra-4.1 test && ccm remove test && \
ccm create -n 1 -v git:cassandra-4.0 test && ccm remove test"
RUN /bin/bash -c 'source ${BUILD_HOME}/env3.8/bin/activate && \
latest_4_0=$(curl -s https://downloads.apache.org/cassandra/ | grep -oP "(?<=href=\")4\.0\.[0-9]+(?=\")" | sort -V | tail -1 | cut -d"." -f3) && \
for i in $(seq 1 $latest_4_0); do echo $i ; ccm create --quiet -n 1 -v binary:4.0.$i test && ccm remove test ; done && \
latest_4_1=$(curl -s https://downloads.apache.org/cassandra/ | grep -oP "(?<=href=\")4\.1\.[0-9]+(?=\")" | sort -V | tail -1 | cut -d"." -f3) && \
for i in $(seq 1 $latest_4_1); do echo $i ; ccm create --quiet -n 1 -v binary:4.1.$i test && ccm remove test ; done'

# Initialize ccm versions. right side of each sequence needs to be updated with new releases.
# this can be checked with:
Expand All @@ -139,7 +141,8 @@ RUN rm -fr ${BUILD_HOME}/.ccm/repository/_git_cache_apache
RUN /bin/bash -c 'source ${BUILD_HOME}/env3.8/bin/activate && \
ccm create --quiet -n 1 -v git:cassandra-5.0 test && ccm remove test && \
ccm create --quiet -n 1 -v git:trunk test && ccm remove test && \
for i in {1..2} ; do echo $i ; ccm create --quiet -n 1 -v binary:5.0.$i test && ccm remove test ; done'
latest_5_0=$(curl -s https://downloads.apache.org/cassandra/ | grep -oP "(?<=href=\")5\.0\.[0-9]+(?=\")" | sort -V | tail -1 | cut -d"." -f3) && \
for i in $(seq 1 $latest_5_0); do echo $i ; ccm create --quiet -n 1 -v binary:5.0.$i test && ccm remove test ; done'

# the .git subdirectories to pip installed cassandra-driver breaks virtualenv-clone, so just remove them
# and other directories we don't need in image
Expand Down