Skip to content

Commit

Permalink
Use latest docker-compose v2 version (#1233)
Browse files Browse the repository at this point in the history
Use latest docker-compose v2 version in the CI pipelines
  • Loading branch information
mrodm authored Apr 26, 2023
1 parent 3ad49c9 commit c8d09fc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
env:
SETUP_GVM_VERSION: 'v0.5.0' # https://github.com/andrewkroh/gvm/issues/44#issuecomment-1013231151
DOCKER_COMPOSE_VERSION: "1.25.5" # "v2.15.1"
DOCKER_COMPOSE_VERSION: "v2.17.2"
ELASTIC_PACKAGE_COMPOSE_DISABLE_ANSI: "true"
KIND_VERSION: 'v0.17.0'
K8S_VERSION: 'v1.26.0'
Expand Down
11 changes: 11 additions & 0 deletions .buildkite/scripts/integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ fi
echo "--- Run integration test ${TARGET}"
if [[ "${TARGET}" == "${PARALLEL_TARGET}" ]]; then
make install

# allow to fail this command, to be able to upload safe logs
set +e
make PACKAGE_UNDER_TEST=${PACKAGE} ${TARGET}
testReturnCode=$?
set -e

if [[ "${UPLOAD_SAFE_LOGS}" -eq 1 ]] ; then
upload_safe_logs \
Expand All @@ -124,6 +129,12 @@ if [[ "${TARGET}" == "${PARALLEL_TARGET}" ]]; then
"build/container-logs/*.log" \
"insecure-logs/${PACKAGE}/container-logs/"
fi

if [ $testReturnCode != 0 ]; then
echo "make PACKAGE_UDER_TEST=${PACKAGE} ${TARGET} failed with ${testReturnCode}"
exit ${testReturnCode}
fi

make check-git-clean
exit 0
fi
Expand Down
5 changes: 4 additions & 1 deletion internal/compose/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,13 @@ func NewProject(name string, paths ...string) (*Project, error) {
c.dockerComposeV1 = true
return &c, nil
}

versionMessage := fmt.Sprintf("Determined Docker Compose version: %v", ver)
if ver.Major() == 1 {
logger.Debugf("Determined Docker Compose version: %v, the tool will use Compose V1", ver)
versionMessage = fmt.Sprintf("%s, the tool will use Compose V1", versionMessage)
c.dockerComposeV1 = true
}
logger.Debug(versionMessage)

v, ok := os.LookupEnv(DisableANSIComposeEnv)
if !c.dockerComposeV1 && ok && strings.ToLower(v) != "false" {
Expand Down

0 comments on commit c8d09fc

Please sign in to comment.