From 752f6da269a0b4f6cb1c357c1e434d34aed8fbfb Mon Sep 17 00:00:00 2001 From: epistemophiliac Date: Tue, 16 Jun 2026 18:29:47 -0400 Subject: [PATCH] Always use standalone docker-compose in Jenkins CI Avoid docker compose subcommand (not in static docker CLI). Cache binaries in .ci-bin and drop duplicate checkout stage. --- Jenkinsfile | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6411f68..856e361 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,12 +7,6 @@ pipeline { } stages { - stage('Checkout') { - steps { - checkout scm - } - } - stage('Production readiness') { steps { sh 'chmod +x scripts/ci/*.sh' @@ -25,27 +19,29 @@ pipeline { steps { sh ''' set -euo pipefail - mkdir -p .ci-bin - if ! command -v docker >/dev/null 2>&1; then + mkdir -p .ci-bin dist + + if [ ! -x .ci-bin/docker ]; then echo "Installing static docker CLI..." curl -fsSL "https://download.docker.com/linux/static/stable/x86_64/docker-27.4.1.tgz" \ | tar xz --strip-components=1 -C .ci-bin docker/docker chmod +x .ci-bin/docker fi - if ! command -v docker-compose >/dev/null 2>&1 && ! docker compose version >/dev/null 2>&1; then - echo "Installing docker-compose plugin binary..." + + if [ ! -x .ci-bin/docker-compose ]; then + echo "Installing docker-compose binary..." curl -fsSL "https://github.com/docker/compose/releases/download/v2.32.4/docker-compose-linux-x86_64" \ -o .ci-bin/docker-compose chmod +x .ci-bin/docker-compose fi + export PATH="$PWD/.ci-bin:$PATH" - COMPOSE="docker compose" - if ! docker compose version >/dev/null 2>&1; then - COMPOSE="docker-compose" - fi - mkdir -p dist + docker version + docker-compose version + sed '/exclude_from_hc:/d' docker-compose.yml > dist/docker-compose.coolify.yml - $COMPOSE -f dist/docker-compose.coolify.yml config -q + docker-compose -f dist/docker-compose.coolify.yml config -q + VERSION="$(grep -E '^ERPNEXT_VERSION=' example.env | cut -d= -f2)" docker pull "frappe/erpnext:${VERSION}" echo "frappe/erpnext:${VERSION} OK"