File tree Expand file tree Collapse file tree 6 files changed +31
-14
lines changed Expand file tree Collapse file tree 6 files changed +31
-14
lines changed Original file line number Diff line number Diff line change @@ -26,17 +26,28 @@ jobs:
2626 integration-test :
2727 runs-on : ubuntu-20.04
2828 name : " integration test"
29+ strategy :
30+ max-parallel : 1
31+ fail-fast : false
32+ matrix :
33+ include :
34+ - compose_version : ' 1.28.0'
35+ compose_path : ' /usr/local/bin'
36+ - compose_version : ' v2.0.1'
37+ compose_path : ' /usr/local/lib/docker/cli-plugins'
2938 steps :
3039 - name : Checkout
3140 uses : actions/checkout@v2
32-
33- - name : Pin docker-compose
41+
42+ - name : Get Compose
3443 run : |
35- COMPOSE_PATH=/usr/local/bin/docker-compose
36- source ./install/_min-requirements.sh
37- sudo rm $COMPOSE_PATH
38- sudo curl -L https://github.com/docker/compose/releases/download/${MIN_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o $COMPOSE_PATH
39- sudo chmod +x $COMPOSE_PATH
44+ # Always remove `docker compose` support as that's the newer version
45+ # and comes installed by default nowadays.
46+ sudo rm -f "/usr/local/lib/docker/cli-plugins/docker-compose"
47+ sudo rm -f "${{ matrix.compose_path }}/docker-compose"
48+ sudo mkdir -p "${{ matrix.compose_path }}"
49+ sudo curl -L https://github.com/docker/compose/releases/download/${{ matrix.compose_version }}/docker-compose-`uname -s`-`uname -m` -o "${{ matrix.compose_path }}/docker-compose"
50+ sudo chmod +x "${{ matrix.compose_path }}/docker-compose"
4051
4152 - name : Integration Test
4253 run : |
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2- set -e
2+ set -ex
33
44source " $( dirname $0 ) /../install/_lib.sh"
55
118118echo " ${_endgroup} "
119119
120120echo " ${_group} Ensure cleanup crons are working ..."
121- $dc ps | grep -q -- " - cleanup_.\+[[:space:]]\ +Up[[:space:]]\ +"
121+ $dc ps | grep -q -E " \-cleanup\s+running\s+|\- cleanup_.+\s +Up\s +"
122122echo " ${_endgroup} "
123123
124124echo " ${_group} Test custom CAs work ..."
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ services:
9393 smtp :
9494 << : *restart_policy
9595 image : tianon/exim4
96- hostname : ${SENTRY_MAIL_HOST:-}
96+ hostname : ${SENTRY_MAIL_HOST:-'' }
9797 volumes :
9898 - " sentry-smtp:/var/spool/exim4"
9999 - " sentry-smtp-log:/var/log/exim4"
Original file line number Diff line number Diff line change 2525 _endgroup=" "
2626fi
2727
28- dc=" docker-compose --ansi never"
28+ dc_base=" $( docker compose version > /dev/null && echo ' docker compose' || echo ' docker-compose' ) "
29+ dc=" $dc_base --ansi never"
2930dcr=" $dc run --rm"
3031
3132# A couple of the config files are referenced from other subscripts, so they
Original file line number Diff line number Diff line change @@ -3,8 +3,13 @@ echo "${_group}Checking minimum requirements ..."
33source " $( dirname $0 ) /_min-requirements.sh"
44
55DOCKER_VERSION=$( docker version --format ' {{.Server.Version}}' )
6- # Do NOT use $dc instead of `docker-compose` below as older versions don't support certain options and fail
7- COMPOSE_VERSION=$( docker-compose --version | sed ' s/docker-compose version \(.\{1,\}\),.*/\1/' )
6+ # Get semantic version of Docker Compose v2
7+ if docker compose version > /dev/null; then
8+ COMPOSE_VERSION=$( docker compose version --short | sed ' s/v\{0,1\}\(.\{1,\}\)/\1/' )
9+ else
10+ # Do NOT use $dc instead of `docker-compose` below as older versions don't support certain options and fail
11+ COMPOSE_VERSION=$( docker-compose --version | sed ' s/docker-compose version \(.\{1,\}\),.*/\1/' )
12+ fi
813RAM_AVAILABLE_IN_DOCKER=$( docker run --rm busybox free -m 2> /dev/null | awk ' /Mem/ {print $2}' ) ;
914CPU_AVAILABLE_IN_DOCKER=$( docker run --rm busybox nproc --all) ;
1015
Original file line number Diff line number Diff line change 1818 echo " "
1919 echo " You're all done! Run the following command to get Sentry running:"
2020 echo " "
21- echo " docker-compose up -d"
21+ echo " $dc_base up -d"
2222 echo " "
2323 echo " -----------------------------------------------------------------"
2424 echo " "
You can’t perform that action at this time.
0 commit comments