Skip to content

Commit 956baf1

Browse files
committed
updated and roadmap
1 parent 59565c6 commit 956baf1

File tree

6 files changed

+131
-3
lines changed

6 files changed

+131
-3
lines changed

docs/astro.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ export default defineConfig({
7676
label: 'Reference',
7777
items: [{ label: 'Requirements', slug: 'reference/requirements' }],
7878
},
79+
{
80+
label: 'Project',
81+
items: [{ label: 'Roadmap', slug: 'roadmap' }],
82+
},
7983
],
8084
}),
8185
],

docs/src/content/docs/roadmap.mdx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: Roadmap
3+
description: Future features and enhancements planned for cigen
4+
---
5+
6+
## CI Provider Support
7+
8+
### GitHub Actions
9+
10+
Full support for GitHub Actions workflows, including:
11+
12+
- Matrix builds
13+
- Reusable workflows
14+
- GitHub-specific features (caching, artifacts, etc.)
15+
- Environment and deployment support
16+
17+
### Buildkite
18+
19+
Native Buildkite pipeline generation with:
20+
21+
- Dynamic pipelines
22+
- Plugin support
23+
- Agent targeting
24+
- Artifact management
25+
26+
### Jenkins
27+
28+
Jenkins pipeline generation supporting:
29+
30+
- Declarative pipelines
31+
- Jenkinsfile generation
32+
- Plugin integration
33+
- Multi-branch support
34+
35+
## Local Execution
36+
37+
First-class support for running all your CI jobs locally, similar to tools like Taskfile and [act](https://github.com/nektos/act):
38+
39+
- **Docker-based execution** - Run jobs in isolated containers matching your CI environment
40+
- **Native execution** - Run jobs directly on your machine for faster iteration
41+
- **Selective job execution** - Run individual jobs or entire workflows
42+
- **Environment parity** - Use the same configuration for CI and local runs
43+
44+
This enables rapid development and testing without pushing to CI.
45+
46+
## CLI Workflow Management
47+
48+
Interactive CLI tools to manage your CI pipelines:
49+
50+
- **Job status monitoring** - View real-time status of running jobs across providers
51+
- **Log fetching** - Download and view logs for failing jobs
52+
- **Local reproduction** - Automatically re-run failing tests on your machine with the same environment
53+
- **Pipeline control** - Trigger, cancel, or retry jobs from the command line
54+
- **Cross-provider interface** - Unified CLI regardless of which CI provider you use
55+
56+
This brings the power of CI/CD management directly to your terminal.

src/models/config.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ pub struct SetupOptions {
396396

397397
#[serde(skip_serializing_if = "Option::is_none")]
398398
pub runtime_image: Option<String>,
399+
400+
#[serde(skip_serializing_if = "Option::is_none")]
401+
pub compile_cigen: Option<bool>,
399402
}
400403

401404
#[derive(Debug, Clone, Serialize, Deserialize)]

src/providers/circleci/generator.rs

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,27 @@ impl CircleCIGenerator {
338338
.insert("setup".to_string(), setup_workflow);
339339

340340
// Build setup job
341-
// Choose setup runtime image: prefer configured one,
342-
// else default to docspringcom/cigen:latest
341+
// Choose setup runtime image based on configuration:
342+
// 1. If runtime_image is explicitly set, use it
343+
// 2. If compile_cigen is true, use Rust image for compilation
344+
// 3. Otherwise default to docspringcom/cigen:latest (has cigen pre-installed + openssh-client)
345+
let compile_cigen = config
346+
.setup_options
347+
.as_ref()
348+
.and_then(|o| o.compile_cigen)
349+
.unwrap_or(false);
350+
343351
let setup_image = config
344352
.setup_options
345353
.as_ref()
346354
.and_then(|o| o.runtime_image.clone())
347-
.unwrap_or_else(|| "docspringcom/cigen:latest".to_string());
355+
.unwrap_or_else(|| {
356+
if compile_cigen {
357+
"cimg/rust:1.75".to_string()
358+
} else {
359+
"docspringcom/cigen:latest".to_string()
360+
}
361+
});
348362

349363
let mut setup_job = cc::CircleCIJob {
350364
executor: None,
@@ -388,6 +402,31 @@ impl CircleCIGenerator {
388402
setup_job.steps.push(cc::CircleCIStep::new(checkout_step));
389403
}
390404

405+
// Optional cigen compilation from source for testing cigen changes on CI
406+
if compile_cigen {
407+
// Checkout cigen repository
408+
let checkout_cigen_cmd = r#"set -euo pipefail
409+
echo "Checking out cigen from GitHub..."
410+
git clone --depth 1 https://github.com/DocSpring/cigen.git /tmp/cigen
411+
cd /tmp/cigen"#;
412+
setup_job.steps.push(cc::CircleCIStep::new(run_step(
413+
"Checkout cigen repository",
414+
checkout_cigen_cmd,
415+
)));
416+
417+
// Compile cigen from source
418+
let compile_cigen_cmd = r#"set -euo pipefail
419+
cd /tmp/cigen
420+
echo "Compiling cigen from source..."
421+
cargo build --release
422+
echo "Cigen compiled successfully"
423+
echo "export PATH=\"/tmp/cigen/target/release:\$PATH\"" >> $BASH_ENV"#;
424+
setup_job.steps.push(cc::CircleCIStep::new(run_step(
425+
"Compile cigen from source",
426+
compile_cigen_cmd,
427+
)));
428+
}
429+
391430
// Optional self-check to ensure entrypoint is up to date
392431
if let Some(opts) = &config.setup_options
393432
&& let Some(sc) = &opts.self_check

src/providers/circleci/templates/shallow_checkout.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,19 @@ steps:
6666
KEYSCAN_BITBUCKET="<< parameters.keyscan_bitbucket >>"
6767
CHECKOUT_PATH="<< parameters.path >>"
6868
69+
# Verify ssh is available (required for git ssh operations and keyscan)
70+
if ! command -v ssh >/dev/null 2>&1; then
71+
echo "ERROR: ssh command not found" >&2
72+
echo "" >&2
73+
echo "You must run this command from a Docker image that has openssh-client installed." >&2
74+
echo "" >&2
75+
echo "Use a CircleCI convenience image (cimg/*) or install openssh-client in your Dockerfile:" >&2
76+
echo " - Debian/Ubuntu: RUN apt-get update && apt-get install -y openssh-client" >&2
77+
echo " - Alpine: RUN apk add --no-cache openssh-client" >&2
78+
echo " - RHEL/CentOS: RUN yum install -y openssh-clients" >&2
79+
exit 1
80+
fi
81+
6982
# Create SSH directory if not exists
7083
if [ ! -d ~/.ssh ]; then
7184
mkdir -p ~/.ssh

tests/snapshots/snapshot_circleci_rails__circleci_rails_config.snap

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,19 @@ commands:
5959
KEYSCAN_BITBUCKET="<< parameters.keyscan_bitbucket >>"
6060
CHECKOUT_PATH="<< parameters.path >>"
6161

62+
# Verify ssh is available (required for git ssh operations and keyscan)
63+
if ! command -v ssh >/dev/null 2>&1; then
64+
echo "ERROR: ssh command not found" >&2
65+
echo "" >&2
66+
echo "You must run this command from a Docker image that has openssh-client installed." >&2
67+
echo "" >&2
68+
echo "Use a CircleCI convenience image (cimg/*) or install openssh-client in your Dockerfile:" >&2
69+
echo " - Debian/Ubuntu: RUN apt-get update && apt-get install -y openssh-client" >&2
70+
echo " - Alpine: RUN apk add --no-cache openssh-client" >&2
71+
echo " - RHEL/CentOS: RUN yum install -y openssh-clients" >&2
72+
exit 1
73+
fi
74+
6275
# Create SSH directory if not exists
6376
if [ ! -d ~/.ssh ]; then
6477
mkdir -p ~/.ssh

0 commit comments

Comments
 (0)