Switch CI from Forgejo Actions to Jenkins
Remove GitHub/Forgejo workflow; add Jenkinsfile that runs production readiness scripts, compose config smoke, and frappe/erpnext image pull.
This commit is contained in:
parent
4144bd1115
commit
538a2474dd
4 changed files with 51 additions and 57 deletions
53
.github/workflows/production-readiness.yml
vendored
53
.github/workflows/production-readiness.yml
vendored
|
|
@ -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
|
|
||||||
44
Jenkinsfile
vendored
Normal file
44
Jenkinsfile
vendored
Normal file
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,7 +7,7 @@ Validated Docker Compose stack for [ERPNext](https://erpnext.com) on [Coolify](h
|
||||||
## Quick start (Coolify)
|
## Quick start (Coolify)
|
||||||
|
|
||||||
1. **New Resource** → **Docker Compose**
|
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`
|
3. **Compose file:** `docker-compose.yml`
|
||||||
4. Set environment variables from [`example.env`](example.env) (at minimum `DB_PASSWORD`, `SITE_NAME`, `ADMIN_PASSWORD`)
|
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`**
|
5. Assign your domain to service **`frontend`**, port **`8080`**
|
||||||
|
|
@ -29,12 +29,15 @@ Login: user `Administrator`, password = `ADMIN_PASSWORD`.
|
||||||
| `websocket` | Socket.IO realtime |
|
| `websocket` | Socket.IO realtime |
|
||||||
| `queue-short` / `queue-long` / `scheduler` | Background workers |
|
| `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/ci-readiness.sh` — secrets, docs, compose checks
|
||||||
- `scripts/ci/validate-docker-compose.sh` — Coolify compose rules + `docker compose config`
|
- `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:
|
Run locally:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ Login at `https://erp.yourdomain.com` — user `Administrator`.
|
||||||
|
|
||||||
## CI / production gate
|
## 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:
|
Local check:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue