diff --git a/.github/workflows/production-readiness.yml b/.github/workflows/production-readiness.yml deleted file mode 100644 index 6c63de8..0000000 --- a/.github/workflows/production-readiness.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Production Readiness - -on: - push: - branches: [main] - pull_request: - branches: [main] - -concurrency: - group: erpnext-${{ github.ref }} - cancel-in-progress: true - -jobs: - readiness: - name: Coolify compose readiness - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Production readiness scan - run: | - chmod +x scripts/ci/*.sh - bash scripts/ci/ci-readiness.sh . - - - name: Validate docker-compose (Coolify rules) - run: bash scripts/ci/validate-docker-compose.sh . - - compose-smoke: - name: Render and validate stack - runs-on: ubuntu-latest - needs: readiness - steps: - - uses: actions/checkout@v4 - - - name: Render Coolify-safe compose (strip Coolify-only keys) - run: | - mkdir -p dist - sed '/exclude_from_hc:/d' docker-compose.yml > dist/docker-compose.coolify.yml - docker compose -f dist/docker-compose.coolify.yml config -q - echo "compose config OK" - - - name: Verify upstream ERPNext image is pullable - run: | - VERSION="$(grep -E '^ERPNEXT_VERSION=' example.env | cut -d= -f2)" - docker pull "frappe/erpnext:${VERSION}" - echo "frappe/erpnext:${VERSION} OK" - - - name: Upload rendered compose artifact - uses: actions/upload-artifact@v4 - with: - name: coolify-compose - path: dist/docker-compose.coolify.yml - if-no-files-found: error diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..d6f20f7 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,44 @@ +pipeline { + agent any + + options { + timestamps() + disableConcurrentBuilds() + } + + stages { + stage('Checkout') { + steps { + checkout scm + } + } + + 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 dist + 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 + } + } +} diff --git a/README.md b/README.md index b5582fc..88e2f9a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Validated Docker Compose stack for [ERPNext](https://erpnext.com) on [Coolify](h ## Quick start (Coolify) 1. **New Resource** → **Docker Compose** -2. **Git repository:** `https://git.aexoradao.com/epistemophiliac/production-erpnext` +2. **Git repository:** `https://git.aexoradao.com/epistemophiliac/erpnext` 3. **Compose file:** `docker-compose.yml` 4. Set environment variables from [`example.env`](example.env) (at minimum `DB_PASSWORD`, `SITE_NAME`, `ADMIN_PASSWORD`) 5. Assign your domain to service **`frontend`**, port **`8080`** @@ -29,12 +29,15 @@ Login: user `Administrator`, password = `ADMIN_PASSWORD`. | `websocket` | Socket.IO realtime | | `queue-short` / `queue-long` / `scheduler` | Background workers | -## CI +## CI (Jenkins) -Forgejo Actions runs on every push/PR to `main`: +Jenkins runs the same checks on every build via [`Jenkinsfile`](Jenkinsfile): - `scripts/ci/ci-readiness.sh` — secrets, docs, compose checks - `scripts/ci/validate-docker-compose.sh` — Coolify compose rules + `docker compose config` +- `docker compose config` + pull pinned `frappe/erpnext` image + +**Jenkins:** Multibranch Pipeline → `https://git.aexoradao.com/epistemophiliac/erpnext.git` → Script Path `Jenkinsfile` Run locally: diff --git a/docs/COOLIFY_DEPLOY.md b/docs/COOLIFY_DEPLOY.md index 783ed0b..7f049b4 100644 --- a/docs/COOLIFY_DEPLOY.md +++ b/docs/COOLIFY_DEPLOY.md @@ -93,7 +93,7 @@ Login at `https://erp.yourdomain.com` — user `Administrator`. ## CI / production gate -Every merge to `main` must pass `.github/workflows/production-readiness.yml` before Coolify auto-deploy (if wired). +Every merge to `main` should pass the Jenkins pipeline (`Jenkinsfile`) before Coolify deploy. Local check: