diff --git a/WORKSPACE.yaml b/WORKSPACE.yaml index ac8a532d4ed6c3..ca81a830dc94e5 100644 --- a/WORKSPACE.yaml +++ b/WORKSPACE.yaml @@ -23,6 +23,7 @@ defaultArgs: REPLICATED_API_TOKEN: "" REPLICATED_APP: "" dockerVersion: 20.10.17 + dockerComposeVersion: "2.10.0-gitpod.1" provenance: enabled: true slsa: true diff --git a/components/docker-up/BUILD.yaml b/components/docker-up/BUILD.yaml index b5920968e38455..6ae5b624fdfea6 100644 --- a/components/docker-up/BUILD.yaml +++ b/components/docker-up/BUILD.yaml @@ -10,16 +10,20 @@ packages: - components/common-go:lib argdeps: - dockerVersion + - dockerComposeVersion env: - CGO_ENABLED=0 - GOOS=linux - DOCKER_VERSION=${dockerVersion} + - DOCKER_COMPOSE_VERSION=${dockerComposeVersion} prep: - ["mv", "docker-up/main.go", "."] - ["rmdir", "docker-up"] - ["go", "generate"] config: dontTest: true + buildArgs: + DOCKER_COMPOSE_VERSION: ${dockerComposeVersion} - name: bin-runc-facade type: go srcs: @@ -38,18 +42,22 @@ packages: dontTest: true - name: app type: generic + argdeps: + - dockerComposeVersion deps: - :bin-docker-up - :bin-runc-facade config: + buildArgs: + DOCKER_COMPOSE_VERSION: ${dockerComposeVersion} commands: - ["mv", "components-docker-up--bin-docker-up/docker-up", "docker-up"] - ["rm", "-r", "components-docker-up--bin-docker-up"] - ["mv", "components-docker-up--bin-runc-facade/docker-up", "runc-facade"] - ["rm", "-r", "components-docker-up--bin-runc-facade"] # Override docker-compose with custom version https://github.com/gitpod-io/compose/pull/1 - - ["curl", "--fail", "-sSL", "https://github.com/gitpod-io/compose/releases/download/v2.10.0-gitpod.0/docker-compose-linux-x86_64", "-o", "docker-compose-linux-x86_64"] - - ["curl", "--fail", "-sSL", "https://github.com/gitpod-io/compose/releases/download/v2.10.0-gitpod.0/checksums.txt", "-o", "checksums.txt"] + - ["curl", "--fail", "-sSL", "https://github.com/gitpod-io/compose/releases/download/v${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64", "-o", "docker-compose-linux-x86_64"] + - ["curl", "--fail", "-sSL", "https://github.com/gitpod-io/compose/releases/download/v${DOCKER_COMPOSE_VERSION}/checksums.txt", "-o", "checksums.txt"] - ["sha256sum", "-c", "checksums.txt"] - ["mv", "docker-compose-linux-x86_64", "docker-compose"] - ["chmod", "+x", "docker-compose"] diff --git a/components/docker-up/dependencies.sh b/components/docker-up/dependencies.sh index 023d861d10cfb1..206f1ba10af729 100755 --- a/components/docker-up/dependencies.sh +++ b/components/docker-up/dependencies.sh @@ -5,9 +5,10 @@ set -euo pipefail -DOCKER_COMPOSE_VERSION=2.8.0-gitpod.0 RUNC_VERSION=v1.1.4 +# DOCKER_VERSION and DOCKER_COMPOSE_VERSION are defined in WORKSPACE.yaml + curl -o docker.tgz -fsSL "https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz" curl -o docker-compose -fsSL "https://github.com/gitpod-io/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64" curl -o runc -fsSL "https://github.com/opencontainers/runc/releases/download/${RUNC_VERSION}/runc.amd64"