{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1a3a4c82-591c-4d15-ac2f-683e09541e28",
    "slug": "jenkins-ci",
    "name": "Jenkins",
    "description": "Automation server that builds, tests and deploys your code",
    "url": "https://railway.com/deploy/jenkins-ci",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/jenkins-railway"
    }
  },
  "services": [
    {
      "name": "jenkins",
      "source": {
        "repo": "https://github.com/gridalpha/jenkins-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/jenkins_home",
      "http": true
    },
    {
      "name": "jenkins-agent",
      "source": {
        "repo": "https://github.com/gridalpha/jenkins-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/jenkins/agent",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "jenkins",
      "description": "HTTP port Jenkins listens on",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "JENKINS_ADMIN_ID",
      "service": "jenkins",
      "description": "Administrator username, created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "JENKINS_AGENT_NAME",
      "service": "jenkins",
      "description": "Build agent node name",
      "secret": false,
      "strategy": "default",
      "default": "railway-agent"
    },
    {
      "key": "JENKINS_LOCATION_URL",
      "service": "jenkins",
      "description": "Public URL used in links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "JENKINS_ADMIN_PASSWORD",
      "service": "jenkins",
      "description": "Administrator password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "jenkins",
      "description": "Selects the controller Dockerfile",
      "secret": false,
      "strategy": "default",
      "default": "controller/Dockerfile"
    },
    {
      "key": "JENKINS_AGENT_CONNECT_PASSWORD",
      "service": "jenkins",
      "description": "Password for the agent connect account",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "jenkins",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "30"
    },
    {
      "key": "JENKINS_URL",
      "service": "jenkins-agent",
      "description": "Private controller address",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "JENKINS_AGENT_NAME",
      "service": "jenkins-agent",
      "description": "Must match the controller node name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "jenkins-agent",
      "description": "Selects the agent Dockerfile",
      "secret": false,
      "strategy": "default",
      "default": "agent/Dockerfile"
    },
    {
      "key": "JENKINS_AGENT_CONNECT_PASSWORD",
      "service": "jenkins-agent",
      "description": "Agent connect account password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "jenkins-ci"
      }
    },
    "cli": "railway deploy --template jenkins-ci",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1a3a4c82-591c-4d15-ac2f-683e09541e28",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "63509d93-96e8-4fda-9255-34f029fa2f02": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/jenkins.svg",
                  "name": "jenkins",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/login",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/jenkins-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port Jenkins listens on",
                      "defaultValue": "8080"
                    },
                    "JENKINS_ADMIN_ID": {
                      "isOptional": false,
                      "description": "Administrator username, created on first boot",
                      "defaultValue": "admin"
                    },
                    "JENKINS_AGENT_NAME": {
                      "isOptional": false,
                      "description": "Build agent node name",
                      "defaultValue": "railway-agent"
                    },
                    "JENKINS_LOCATION_URL": {
                      "isOptional": false,
                      "description": "Public URL used in links",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "JENKINS_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "Administrator password",
                      "defaultValue": "{{JENKINS_ADMIN_PASSWORD}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Selects the controller Dockerfile",
                      "defaultValue": "controller/Dockerfile"
                    },
                    "JENKINS_AGENT_CONNECT_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the agent connect account",
                      "defaultValue": "{{JENKINS_AGENT_CONNECT_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "30"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "63509d93-96e8-4fda-9255-34f029fa2f02": {
                      "mountPath": "/var/jenkins_home"
                    }
                  }
                },
                "fa15eaee-b963-434f-97b8-cd071bebdc70": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/jenkins.svg",
                  "name": "jenkins-agent",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/jenkins-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "JENKINS_URL": {
                      "isOptional": false,
                      "description": "Private controller address",
                      "defaultValue": "http://${{jenkins.RAILWAY_PRIVATE_DOMAIN}}:8080"
                    },
                    "JENKINS_AGENT_NAME": {
                      "isOptional": false,
                      "description": "Must match the controller node name",
                      "defaultValue": "${{jenkins.JENKINS_AGENT_NAME}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Selects the agent Dockerfile",
                      "defaultValue": "agent/Dockerfile"
                    },
                    "JENKINS_AGENT_CONNECT_PASSWORD": {
                      "isOptional": false,
                      "description": "Agent connect account password",
                      "defaultValue": "${{jenkins.JENKINS_AGENT_CONNECT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "fa15eaee-b963-434f-97b8-cd071bebdc70": {
                      "mountPath": "/home/jenkins/agent"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "jenkins",
      "method": "GET",
      "path": "/login",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T16:14:49.616Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T14:12:38.245Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_b4ca63363f244a819b18",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 119,
    "typical_build_seconds": 40,
    "typical_start_seconds": 10,
    "slowest_service": "jenkins-agent"
  }
}
