CI/CD Templates for iDempiere

Ready-to-use pipeline configurations for building, testing, and deploying plugins.

GitHub Actions — Build & Test

Builds an iDempiere plugin with Maven, runs JUnit tests, and packages the artifact. Triggered on push to main/develop and pull requests.

name: iDempiere Plugin CI

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

env:
  IDEMPIERE_VERSION: "12"
  JAVA_VERSION: "17"

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up JDK
        uses: actions/setup-java@v4
        with:
          java-version: ${{ env.JAVA_VERSION }}
          distribution: temurin
          cache: maven

      - name: Clone iDempiere source
        run: |
          git clone --depth 1 --branch release-${{ env.IDEMPIERE_VERSION }} \
            https://github.com/idempiere/idempiere.git /tmp/idempiere

      - name: Build iDempiere target platform
        working-directory: /tmp/idempiere
        run: mvn verify -pl org.idempiere.p2.targetplatform -am -DskipTests

      - name: Build plugin
        run: mvn verify -Dtarget.platform=/tmp/idempiere

      - name: Run tests
        run: mvn test -Dtarget.platform=/tmp/idempiere

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: plugin-jar
          path: target/*.jar
          retention-days: 30

GitLab CI — Build & Deploy

Three-stage pipeline (build, test, deploy) for GitLab CI/CD. Includes Maven caching and manual deploy gate.

stages:
  - build
  - test
  - deploy

variables:
  IDEMPIERE_VERSION: "12"
  JAVA_VERSION: "17"
  MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"

cache:
  paths:
    - .m2/repository/

build:
  stage: build
  image: maven:3.9-eclipse-temurin-17
  script:
    - git clone --depth 1 --branch release-${IDEMPIERE_VERSION}
        https://github.com/idempiere/idempiere.git /tmp/idempiere
    - cd /tmp/idempiere && mvn verify -pl org.idempiere.p2.targetplatform -am -DskipTests
    - cd $CI_PROJECT_DIR && mvn package -Dtarget.platform=/tmp/idempiere
  artifacts:
    paths:
      - target/*.jar
    expire_in: 7 days

test:
  stage: test
  image: maven:3.9-eclipse-temurin-17
  script:
    - git clone --depth 1 --branch release-${IDEMPIERE_VERSION}
        https://github.com/idempiere/idempiere.git /tmp/idempiere
    - cd /tmp/idempiere && mvn verify -pl org.idempiere.p2.targetplatform -am -DskipTests
    - cd $CI_PROJECT_DIR && mvn test -Dtarget.platform=/tmp/idempiere
  needs: []

deploy:
  stage: deploy
  image: alpine:latest
  script:
    - echo "Deploy step — customize for your environment"
    - echo "Example: scp target/*.jar user@server:/opt/idempiere/plugins/"
  only:
    - main
  when: manual

Docker Compose — Dev Environment

Complete iDempiere development environment with PostgreSQL. Mount your local plugins directory for hot-deploy during development.

version: "3.8"

services:
  idempiere:
    image: idempiere/idempiere:12
    container_name: idempiere-dev
    ports:
      - "8080:8080"
      - "8443:8443"
      - "12612:12612"  # OSGi console
    environment:
      - IDEMPIERE_DB_HOST=postgres
      - IDEMPIERE_DB_PORT=5432
      - IDEMPIERE_DB_NAME=idempiere
      - IDEMPIERE_DB_USER=adempiere
      - IDEMPIERE_DB_PASS=adempiere
    volumes:
      - ./plugins:/opt/idempiere/plugins
      - idempiere-data:/opt/idempiere/data
    depends_on:
      postgres:
        condition: service_healthy
    restart: unless-stopped

  postgres:
    image: postgres:15
    container_name: idempiere-db
    ports:
      - "5432:5432"
    environment:
      - POSTGRES_DB=idempiere
      - POSTGRES_USER=adempiere
      - POSTGRES_PASSWORD=adempiere
    volumes:
      - pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U adempiere -d idempiere"]
      interval: 10s
      timeout: 5s
      retries: 5
    restart: unless-stopped

volumes:
  pgdata:
  idempiere-data:

You Missed