Skip to Content
DocsDevopsArtifact ShipperDeployment-Szenarien

Deployment-Szenarien

Der Artifact Shipper unterstützt verschiedene Deployment-Szenarien für unterschiedliche Anwendungsfälle.

Lokale Dateien

Das einfachste Szenario: Deployment von Artefakten aus einem lokalen Verzeichnis.

Beispiel

{ "artifacts": [ { "type": "local", "path": "./diagrams", "pattern": "**/*.bpmn" } ], "targets": [ { "type": "processcube-engine", "url": "https://engine.processcube.io" } ] }

Verwendung

docker run -v $(pwd)/config.json:/config/config.json \ -v $(pwd)/diagrams:/diagrams \ 5minds/processcube_artifact_shipper:latest

Wichtig: Das lokale Verzeichnis muss als Volume in den Container gemountet werden.

Git Repository

Deployment direkt aus einem Git-Repository.

Beispiel

{ "credentials": { "git": { "username": "deployment-user", "token": "ghp_xxxxxxxxxxxxx" } }, "artifacts": [ { "type": "git", "repository": "https://github.com/company/processes.git", "branch": "main", "path": "bpmn-diagrams", "pattern": "**/*.bpmn" } ], "targets": [ { "type": "processcube-engine", "url": "https://engine.processcube.io" } ] }

Öffentliche Repositories

Für öffentliche Git-Repositories können die Credentials weggelassen werden:

{ "artifacts": [ { "type": "git", "repository": "https://github.com/public/processes.git", "branch": "main", "pattern": "**/*.bpmn" } ] }

Private Repositories

Für private Repositories wird ein Personal Access Token benötigt:

  1. GitHub: Settings → Developer settings → Personal access tokens → Generate new token

    • Scope: repo (Full control of private repositories)
  2. GitLab: Settings → Access Tokens → Add a personal access token

    • Scope: read_repository
  3. Azure DevOps: User Settings → Personal access tokens → New Token

    • Scope: Code (Read)

Multi-Source Deployment

Deployment aus mehreren Quellen gleichzeitig.

Beispiel

{ "artifacts": [ { "type": "git", "repository": "https://github.com/company/core-processes.git", "branch": "main", "pattern": "**/*.bpmn" }, { "type": "git", "repository": "https://github.com/company/support-processes.git", "branch": "release", "pattern": "**/*.bpmn" }, { "type": "local", "path": "./custom-flows", "pattern": "**/*.json" } ], "targets": [ { "type": "processcube-engine", "url": "https://engine.processcube.io" }, { "type": "processcube-lowcode", "url": "https://lowcode.processcube.io", "flowName": "main-flow" } ] }

Dieses Beispiel:

  • Lädt BPMN-Diagramme aus zwei verschiedenen Git-Repositories
  • Lädt zusätzlich lokale Flow-Definitionen
  • Deployed BPMN-Diagramme zur Engine
  • Deployed Flows zum LowCode-System

LowCode Flow Deployment

Deployment von Node-RED Flows im JSON- oder YAML-Format.

JSON-Format

{ "artifacts": [ { "type": "local", "path": "./flows", "pattern": "**/*.json" } ], "targets": [ { "type": "processcube-lowcode", "url": "https://lowcode.processcube.io", "flowName": "production-flow" } ] }

YAML-Format

{ "artifacts": [ { "type": "local", "path": "./flows", "pattern": "**/*.{yaml,yml}" } ], "targets": [ { "type": "processcube-lowcode", "url": "https://lowcode.processcube.io", "flowName": "production-flow" } ] }

Branch-basiertes Deployment

Deployment aus verschiedenen Branches für unterschiedliche Umgebungen.

Development

{ "artifacts": [ { "type": "git", "repository": "https://github.com/company/processes.git", "branch": "develop", "pattern": "**/*.bpmn" } ], "targets": [ { "type": "processcube-engine", "url": "https://dev.engine.processcube.io" } ] }

Production

{ "artifacts": [ { "type": "git", "repository": "https://github.com/company/processes.git", "branch": "main", "pattern": "**/*.bpmn" } ], "targets": [ { "type": "processcube-engine", "url": "https://engine.processcube.io" } ] }

Selective Deployment

Deployment nur bestimmter Artefakte mittels Glob-Patterns.

Beispiel: Nur Haupt-Prozesse

{ "artifacts": [ { "type": "git", "repository": "https://github.com/company/processes.git", "pattern": "main-processes/**/*.bpmn" } ] }

Beispiel: Ausschluss von Test-Prozessen

{ "artifacts": [ { "type": "local", "path": "./diagrams", "pattern": "**/*.bpmn", "exclude": "**/*-test.bpmn" } ] }

Hinweis: Das exclude-Pattern ist optional und ermöglicht den Ausschluss bestimmter Dateien.

Environment-spezifisches Deployment

Verwendung von Preprocessors für unterschiedliche Umgebungen.

Beispiel

{ "artifacts": [ { "type": "git", "repository": "https://github.com/company/processes.git", "pattern": "**/*.bpmn" } ], "preprocessors": [ { "type": "replace", "pattern": "\\$\\{API_URL\\}", "replacement": "https://api.production.example.com" }, { "type": "replace", "pattern": "\\$\\{ENV\\}", "replacement": "production" } ], "targets": [ { "type": "processcube-engine", "url": "https://engine.processcube.io" } ] }

In den BPMN-Diagrammen können dann Platzhalter verwendet werden:

<serviceTask id="callApi" name="Call API"> <extensionElements> <processcube:url>${API_URL}/endpoint</processcube:url> </extensionElements> </serviceTask>

Diese werden beim Deployment automatisch durch die konfigurierten Werte ersetzt.