Avoid docker compose subcommand (not in static docker CLI). Cache binaries in .ci-bin and drop duplicate checkout stage.
58 lines
1.6 KiB
Groovy
58 lines
1.6 KiB
Groovy
pipeline {
|
|
agent any
|
|
|
|
options {
|
|
timestamps()
|
|
disableConcurrentBuilds()
|
|
}
|
|
|
|
stages {
|
|
stage('Production readiness') {
|
|
steps {
|
|
sh 'chmod +x scripts/ci/*.sh'
|
|
sh 'bash scripts/ci/ci-readiness.sh .'
|
|
sh 'bash scripts/ci/validate-docker-compose.sh .'
|
|
}
|
|
}
|
|
|
|
stage('Compose smoke') {
|
|
steps {
|
|
sh '''
|
|
set -euo pipefail
|
|
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 [ ! -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"
|
|
docker version
|
|
docker-compose version
|
|
|
|
sed '/exclude_from_hc:/d' docker-compose.yml > dist/docker-compose.coolify.yml
|
|
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"
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
success {
|
|
archiveArtifacts artifacts: 'dist/docker-compose.coolify.yml', fingerprint: true, onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|