Skip to main content

Advanced Pipeline Examples

The Advanced Pipeline is the most powerful feature of Flutter Release X. It lets you define a series of custom automation steps in a single config.yaml, supporting any framework — not just Flutter.

Quick Start

Run frx init to auto-generate a starter config.yaml with pipeline examples for multiple frameworks.


FRX v0.6.0 introduces named pipelines, letting you define multiple workflows and run them individually.

pipelines:
build:
description: "Build and distribute the Flutter app"
steps:
- name: "Install Dependencies"
command: "flutter pub get"

- name: "Run Tests"
command: "flutter test"
retry: 2
timeout: 300

- name: "Build APK"
command: "flutter build apk --release"
timeout: 600
upload_output: true
output_path: "./build/app/outputs/flutter-apk/app-release.apk"
notify_slack: true

lint:
description: "Lint and analyze code"
steps:
- name: "Analyze"
command: "flutter analyze"
allow_failure: true

Run a specific pipeline:

frx pipeline run build
# or via build command:
frx build --pipeline build

List all configured pipelines:

frx pipeline list

Validate your configuration before running:

frx pipeline validate

📋 Step Configuration Reference

Every pipeline step supports the following fields:

FieldDescriptionRequiredDefault
nameUnique name for this step✅ Yes
commandShell command to execute✅ Yes
descriptionHuman-readable description shown in logsNo
working_directoryRun the command in a specific directoryNoCurrent dir
envMap of environment variables for this stepNo{}
timeoutMax execution time in secondsNoNo limit
retryNumber of retry attempts on failureNo0
retry_delaySeconds to wait between retriesNo5
conditionOnly run if this shell command exits 0No
continue_on_errorContinue pipeline even if this step failsNofalse
allow_failureTreat failure as a warning, not an errorNofalse
stop_on_failureHalt the pipeline on failureNotrue
upload_outputUpload the artifact after step completesNofalse
output_pathPath to the artifact to uploadNo
notify_slackSend a Slack notification after this stepNofalse
notify_teamsSend a Teams notification after this stepNofalse
custom_exit_conditionStop if this text appears in the outputNo
depends_onList of step names this step requires firstNo[]

🎯 Framework Examples

Flutter / Dart

pipelines:
flutter-ci:
description: "Full Flutter CI pipeline"
steps:
- name: "Get Dependencies"
command: "flutter pub get"
stop_on_failure: true

- name: "Analyze Code"
command: "flutter analyze"
custom_exit_condition: "issues found"
allow_failure: true

- name: "Run Tests"
command: "flutter test"
retry: 2
retry_delay: 5
timeout: 300

- name: "Build APK"
command: "flutter build apk --release"
timeout: 600
upload_output: true
output_path: "./build/app/outputs/flutter-apk/app-release.apk"
notify_slack: true
env:
BUILD_ENV: production

React / Next.js / Vite

pipelines:
react-ci:
description: "React production build pipeline"
steps:
- name: "Install Dependencies"
command: "npm ci"

- name: "Lint"
command: "npm run lint"
allow_failure: true

- name: "Run Tests"
command: "npm test"
custom_exit_condition: "Tests failed"

- name: "Build"
command: "npm run build"
upload_output: true
output_path: "./dist"
notify_slack: true

Python / FastAPI / Django

pipelines:
python-ci:
description: "Python app CI pipeline"
steps:
- name: "Install Dependencies"
command: "pip install -r requirements.txt"

- name: "Lint"
command: "flake8 ."
allow_failure: true

- name: "Run Tests"
command: "pytest"
custom_exit_condition: "FAILED"
retry: 2

- name: "Build Package"
command: "python setup.py sdist bdist_wheel"
upload_output: true
output_path: "./dist"

.NET / C#

pipelines:
dotnet-ci:
description: ".NET build and publish pipeline"
steps:
- name: "Restore Packages"
command: "dotnet restore"

- name: "Run Tests"
command: "dotnet test"
custom_exit_condition: "Test Run Failed"

- name: "Publish"
command: "dotnet publish -c Release -o ./publish"
upload_output: true
output_path: "./publish"
notify_teams: true

Go / Golang

pipelines:
go-ci:
description: "Go build and test pipeline"
steps:
- name: "Download Dependencies"
command: "go mod download"

- name: "Run Tests"
command: "go test ./..."
custom_exit_condition: "FAIL"

- name: "Build Binary"
command: "go build -o app ./cmd/main.go"
upload_output: true
output_path: "./app"
notify_slack: true

Docker

pipelines:
docker-ci:
description: "Docker build and test pipeline"
steps:
- name: "Build Image"
command: "docker build -t myapp:latest ."

- name: "Run Tests in Container"
command: "docker run --rm myapp:latest npm test"

- name: "Export Image"
command: "docker save myapp:latest -o myapp.tar"
upload_output: true
output_path: "./myapp.tar"

Node.js / Express

pipelines:
node-ci:
description: "Node.js API build pipeline"
steps:
- name: "Install Dependencies"
command: "npm ci"

- name: "Run Tests"
command: "npm test"

- name: "Build"
command: "npm run build"
upload_output: true
output_path: "./build"

🔧 Production-Ready Example

Here's a complete config.yaml showing a full setup with cloud integrations and an advanced pipeline:

upload_options:
github:
enabled: true
token: YOUR_GITHUB_TOKEN
repo: OWNER/REPO_NAME
tag: v1.0.0

slack:
enabled: true
bot_user_oauth_token: YOUR_BOT_TOKEN
default_channel_id: CHANNEL_ID
share_QR: true
share_link: true

qr_code:
enabled: true
save_file: true
show_in_command: true
size: 256
error_correction_level: low
save_path: "./release-qr-code.png"

pipelines:
release:
description: "Full release pipeline for Flutter app"
steps:
- name: "Install Dependencies"
command: "flutter pub get"
stop_on_failure: true

- name: "Run Tests"
command: "flutter test"
retry: 2
timeout: 300

- name: "Build APK"
command: "flutter build apk --release"
timeout: 600
upload_output: true
output_path: "./build/app/outputs/flutter-apk/app-release.apk"
notify_slack: true

Run this pipeline:

frx pipeline run release

⚠️ Key Notes

  • Sequential execution: Steps run in the order defined, unless depends_on is used.
  • Step isolation: Each step runs independently. A failed step stops the pipeline unless continue_on_error: true is set.
  • custom_exit_condition: A regex or text pattern — if found in the command's output, the step is treated as failed.
  • Retries: Use retry with retry_delay to handle flaky steps gracefully.
  • Legacy support: The pipeline_steps format still works and is treated as a single default pipeline.