|
2 | 2 |
|
3 | 3 | A lightweight, local-first CI/CD tool written in Rust with a modern, real-time Terminal User Interface (TUI). |
4 | 4 |
|
5 | | -## Features |
6 | | -- **Artifact Management**: Define `artifacts` in your jobs. Conveyor will automatically collect and preserve these files (binaries, reports, etc.) in the build history. |
7 | | -- **Interactive History**: Browse previous builds, view their statuses, and inspect full terminal logs directly from the history tab. |
8 | | -- **Log Highlighting**: Real-time log search (`/`) not only filters lines but also highlights matching substrings for better visibility. |
9 | | -- **Cron Scheduling**: Automate your pipelines with standard cron expressions (e.g., `schedule: "0 */6 * * *"`). |
10 | | -- **Stages & Jobs**: Group related jobs into stages for better organization and a clearer overview of your pipeline's progress. |
11 | | -- **Build History & Persistence**: Automatically saves build results and logs to a local history, allowing you to review past performance and failures. |
12 | | -- **Sequential by Default**: Jobs run one-by-one in the order defined in your pipeline, ensuring a predictable flow. |
13 | | -- **Explicit Parallelism**: Use the `parallel: true` flag to run independent jobs concurrently. |
14 | | -- **Dependency Tracking (DAG)**: Fine-tune execution order with the `needs` keyword for complex dependency graphs. |
15 | | -- **Log Search & Filtering**: Quickly find errors or specific output with real-time log filtering (`/`). |
16 | | -- **Pipeline Hooks**: Define `on_success` and `on_failure` commands to run after the pipeline completes. |
17 | | -- **Responsive TUI**: A spacious, modern interface with OneDark colors that adapts to your terminal size. |
18 | | -- **Headless Mode**: Run pipelines in a non-interactive mode with real-time log streaming to stdout. Ideal for AI agents, CI automation, and scripts. |
19 | | -- **Git Integration**: Live display of current branch and latest commit info in the header. |
20 | | -- **Credential & Secret Management**: Declare required secrets in your pipeline. Conveyor will securely prompt for missing values at startup and automatically mask them (as `****`) in all TUI logs. |
21 | | -- **Environment Variables**: Support for pipeline-level, job-specific, local `env.yaml` variables, and secure `secrets.yaml`. |
22 | | -- **Cross-Platform**: Automatically selects the correct shell (`cmd` for Windows, `sh` for Linux/macOS). |
23 | | -- **Graceful Process Termination**: Safely cancels running jobs and cleans up orphaned compilation processes instantly when quitting (`Q`) or retrying (`R`). |
24 | | -- **Isolated Workspaces**: Remote pipelines clone into dynamically generated, globally unique directories to prevent file locking and stomping collisions. |
| 5 | +## Key Features |
| 6 | +- **Real-time TUI**: Modern, OneDark-inspired interface for live build monitoring. |
| 7 | +- **Artifacts & History**: Preserve build outputs and browse full logs of previous runs. |
| 8 | +- **Dependency Tracking**: Fine-grained execution control with DAG-based job dependencies. |
| 9 | +- **Flexible Scheduling**: Automate builds with standard Cron expressions. |
| 10 | +- **Secure by Default**: Automatic masking of secrets in logs and interactive credential prompting. |
| 11 | +- **Headless Mode**: Ideal for AI agents and CLI automation. |
25 | 12 |
|
26 | | -## Installation |
27 | | -Ensure you have the Rust toolchain installed. |
| 13 | +## Quick Start |
28 | 14 |
|
| 15 | +### 1. Installation |
29 | 16 | ```bash |
30 | | -git clone https://github.com/yourusername/conveyor.git |
| 17 | +git clone https://github.com/sumant1122/conveyor.git |
31 | 18 | cd conveyor |
32 | 19 | cargo build --release |
33 | 20 | ``` |
34 | 21 |
|
35 | | -## Usage |
36 | | -1. Create a `pipeline.yaml` in your project root. |
37 | | -2. (Optional) Create an `env.yaml` for local/secret environment variables. |
38 | | -3. Run Conveyor: |
39 | | - ```bash |
40 | | - cargo run |
41 | | - ``` |
42 | | - |
43 | | -### Remote Repositories |
44 | | -Conveyor can also run pipelines directly from a remote Git repository. It will clone the repository into a temporary workspace and automatically load the `pipeline.yaml` from its root. |
45 | | - |
46 | | -```bash |
47 | | -# Run the default branch (usually main) |
48 | | -cargo run -- https://github.com/user/repo.git |
49 | | - |
50 | | -# Run a specific branch |
51 | | -cargo run -- https://github.com/user/repo.git my-feature-branch |
52 | | -``` |
53 | | - |
54 | | -### Navigation & Controls |
55 | | -- **'1' / '2' / '3' / '4'**: Switch between **Dashboard**, **History**, **Pipeline Config**, and **Env Variables**. |
56 | | -- **Up/Down Arrows**: |
57 | | - - **Dashboard**: Select a job to view its logs. |
58 | | - - **History**: Select a previous build record. |
59 | | -- **'Enter'**: |
60 | | - - **History**: View the full details and logs of the selected historical build. |
61 | | -- **'Esc'**: |
62 | | - - **History Detail**: Return to the build list. |
63 | | - - **Search**: Clear search query or exit search mode. |
64 | | -- **'R'**: **Retry** the current pipeline (resets states and starts fresh). |
65 | | -- **'/'**: Enter **Search Mode** to filter and **highlight** logs in real-time. |
66 | | -- **'PgUp' / 'PgDn'**: Scroll through logs. |
67 | | -- **'q'**: Quit the application. |
68 | | - |
69 | | -## Pipeline Configuration (`pipeline.yaml`) |
70 | | -Example `pipeline.yaml` using modern features like **Stages**, **Cron**, and **Artifacts**, with **Simplified Syntax**: |
71 | | - |
| 22 | +### 2. Define your Pipeline |
| 23 | +Create a `pipeline.yaml` in your project root: |
72 | 24 | ```yaml |
73 | | -# name: Example Service (Optional: Defaults to 'Conveyor Build') |
74 | | -schedule: "0 */1 * * * *" # Run every minute |
75 | | -on_success: "echo 'Success!'" |
76 | | - |
77 | | -stages: |
| 25 | +jobs: |
78 | 26 | - name: Build |
79 | | - jobs: |
80 | | - - name: Compile |
81 | | - command: cargo build --release |
82 | | - artifacts: |
83 | | - - "target/release/conveyor" |
84 | | - |
| 27 | + command: cargo build |
85 | 28 | - name: Test |
86 | | - jobs: |
87 | | - - name: Unit Tests |
88 | | - steps: |
89 | | - - cargo test # Shorthand for simple commands |
90 | | - artifacts: |
91 | | - - "target/debug/deps/" |
92 | | - |
93 | | - - name: Deploy |
94 | | - jobs: |
95 | | - - name: Push Image |
96 | | - needs: ["Unit Tests"] |
97 | | - command: echo "Pushing..." |
98 | | -``` |
99 | | -
|
100 | | -*Note: The older flat `jobs:` format is still supported for backward compatibility.* |
101 | | - |
102 | | -## Local Environment Variables (`env.yaml` & `secrets.yaml`) |
103 | | -Store sensitive or machine-specific variables in an `env.yaml` file. Use `secrets.yaml` for credentials; any value defined here will be **masked** in the TUI logs. |
104 | | - |
105 | | -Example `env.yaml`: |
106 | | -```yaml |
107 | | -DEBUG: "true" |
108 | | -LOG_LEVEL: "info" |
109 | | -``` |
110 | | - |
111 | | -Example `secrets.yaml`: |
112 | | -```yaml |
113 | | -API_KEY: "my-very-secret-key" |
114 | | -SSH_PRIVATE_KEY: | |
115 | | - -----BEGIN RSA PRIVATE KEY----- |
116 | | - ... |
117 | | -``` |
118 | | - |
119 | | -To enforce secret entry, add them to your `pipeline.yaml`: |
120 | | -```yaml |
121 | | -name: My Pipeline |
122 | | -secrets: |
123 | | - - API_KEY |
124 | | - - DOCKER_PASSWORD |
| 29 | + command: cargo test |
125 | 30 | ``` |
126 | | -If these are not present in `secrets.yaml`, Conveyor will prompt for them securely at startup. |
127 | | - |
128 | | -### Headless Mode (for AI Agents & Automation) |
129 | | -To run Conveyor without the TUI, use the `--headless` flag. This will stream all logs directly to stdout and exit with a proper status code (0 for success, 1 for failure). |
130 | 31 |
|
| 32 | +### 3. Run |
131 | 33 | ```bash |
132 | | -# Run local pipeline |
133 | | -cargo run -- --headless |
134 | | -
|
135 | | -# Run remote repository |
136 | | -cargo run -- https://github.com/user/repo.git --headless |
| 34 | +cargo run |
137 | 35 | ``` |
138 | 36 |
|
139 | | -## Roadmap / Upcoming Enhancements |
140 | | -To closely mirror the capabilities of professional CI systems like Jenkins, the following features are planned: |
| 37 | +## Documentation |
| 38 | +For detailed information on configuration, navigation, and advanced features, see **[documentation.md](./documentation.md)**. |
141 | 39 |
|
142 | | -- **🎛️ Input Parameters**: Support for "Build with Parameters," allowing users to select options (like environment or version) before a pipeline starts. |
143 | | -- **🏗️ Distributed Agents**: The ability to delegate jobs to remote machines via SSH or a custom agent protocol. |
144 | | -- **🐳 Container Isolation**: Run jobs inside Docker/Podman containers for clean, reproducible environments. |
| 40 | +- **[Pipeline Configuration](./documentation.md#pipeline-configuration-pipelineyaml)**: Stages, Jobs, DAG, and Simplified Syntax. |
| 41 | +- **[Artifacts & Cron](./documentation.md#artifact-management)**: How to preserve build outputs and automate triggers. |
| 42 | +- **[Secrets Management](./documentation.md#environment--secrets)**: Local variables and automatic log masking. |
| 43 | +- **[Navigation Reference](./documentation.md#navigation--controls)**: Full list of TUI keybindings. |
145 | 44 |
|
146 | 45 | ## License |
147 | 46 | MIT |
0 commit comments