Skip to content

Commit 3d5fd0b

Browse files
committed
enable orchestrator workflow synthesis via env var
1 parent 9fdd0d0 commit 3d5fd0b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

pkg/cli/compile_command.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,10 @@ func CompileWorkflows(config CompileConfig) ([]*workflow.WorkflowData, error) {
439439

440440
// Campaign spec is valid and referenced workflows exist.
441441
// Optionally synthesize an orchestrator workflow for this campaign
442-
// and compile it via the standard workflow pipeline.
443-
if !noEmit {
442+
// and compile it via the standard workflow pipeline. This is gated
443+
// behind an environment variable so campaign specs can be validated
444+
// in CI without requiring experimental orchestrator support.
445+
if !noEmit && os.Getenv("GH_AW_EXPERIMENTAL_CAMPAIGN_ORCHESTRATOR") == "1" {
444446
orchestratorData, orchestratorPath := campaign.BuildOrchestrator(spec, resolvedFile)
445447
lockFile := strings.TrimSuffix(orchestratorPath, ".md") + ".lock.yml"
446448
result.CompiledFile = lockFile
@@ -746,8 +748,10 @@ func CompileWorkflows(config CompileConfig) ([]*workflow.WorkflowData, error) {
746748

747749
// Campaign spec is valid and referenced workflows exist.
748750
// Optionally synthesize an orchestrator workflow for this campaign
749-
// and compile it via the standard workflow pipeline.
750-
if !noEmit {
751+
// and compile it via the standard workflow pipeline. This is gated
752+
// behind an environment variable so campaign specs can be validated
753+
// in CI without requiring experimental orchestrator support.
754+
if !noEmit && os.Getenv("GH_AW_EXPERIMENTAL_CAMPAIGN_ORCHESTRATOR") == "1" {
751755
orchestratorData, orchestratorPath := campaign.BuildOrchestrator(spec, file)
752756
lockFile := strings.TrimSuffix(orchestratorPath, ".md") + ".lock.yml"
753757
result.CompiledFile = lockFile

0 commit comments

Comments
 (0)