Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ function humanize(categoryId) {
return "Chef";
case "clickonce":
return "ClickOnce";
case "convex":
return "Convex";
case "cyberark":
return "CyberArk";
case "dll":
Expand Down
74 changes: 74 additions & 0 deletions step-templates/convex-deploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"Id": "22a4a875-e5fb-44c9-86d9-16911e58c0f0",
"Name": "Convex - Deploy",
"Description": "Deploys your Convex backend functions and schema to a target deployment using the [Convex CLI](https://docs.convex.dev/cli). Supports production, preview, and named deployments via a deploy key.\n\nRequires Node.js and npx available on the worker.",
"ActionType": "Octopus.Script",
"Version": 1,
"CommunityActionTemplateId": null,
"Packages": [],
"Properties": {
"Octopus.Action.Script.ScriptSource": "Inline",
"Octopus.Action.Script.Syntax": "Bash",
"Octopus.Action.Script.ScriptBody": "deployKey=$(get_octopusvariable \"ConvexDeploy.DeployKey\")\ndeploymentType=$(get_octopusvariable \"ConvexDeploy.DeploymentType\")\npreviewName=$(get_octopusvariable \"ConvexDeploy.PreviewName\")\nworkingDir=$(get_octopusvariable \"ConvexDeploy.WorkingDirectory\")\ncmdTimeout=$(get_octopusvariable \"ConvexDeploy.CommandTimeout\")\n\nif [ -z \"$deployKey\" ]; then\n echo \"ERROR: ConvexDeploy.DeployKey is required.\"\n exit 1\nfi\n\nif [ -z \"$deploymentType\" ]; then\n deploymentType=\"prod\"\nfi\n\nif [ -z \"$cmdTimeout\" ]; then\n cmdTimeout=\"300\"\nfi\n\nexport CONVEX_DEPLOY_KEY=\"$deployKey\"\n\nif [ -n \"$workingDir\" ]; then\n echo \"Changing to working directory: $workingDir\"\n cd \"$workingDir\" || { echo \"ERROR: Could not change to directory '$workingDir'\"; exit 1; }\nfi\n\nensure_node() {\n if command -v npx &>/dev/null; then\n echo \"Node.js found: $(node --version)\"\n return 0\n fi\n export NVM_DIR=\"${NVM_DIR:-$HOME/.nvm}\"\n if [ -s \"$NVM_DIR/nvm.sh\" ]; then\n \\. \"$NVM_DIR/nvm.sh\"\n if command -v npx &>/dev/null; then\n echo \"Node.js loaded via nvm: $(node --version)\"\n return 0\n fi\n fi\n echo \"Node.js not found. Installing via nvm...\"\n curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash\n \\. \"$NVM_DIR/nvm.sh\"\n nvm install --lts\n echo \"Node.js installed: $(node --version)\"\n}\nensure_node\n\necho \"Installing dependencies...\"\nnpm install\n\necho \"Convex deployment type: $deploymentType\"\n\ncase \"$deploymentType\" in\n prod)\n echo \"Deploying to production...\"\n timeout \"$cmdTimeout\" npx convex deploy --yes\n ;;\n preview)\n if [ -z \"$previewName\" ]; then\n echo \"ERROR: ConvexDeploy.PreviewName is required when deployment type is 'preview'.\"\n exit 1\n fi\n echo \"Deploying to preview deployment: $previewName\"\n timeout \"$cmdTimeout\" npx convex deploy --preview-name \"$previewName\" --yes\n ;;\n dev)\n echo \"Deploying to dev deployment...\"\n timeout \"$cmdTimeout\" npx convex deploy --yes\n ;;\n *)\n echo \"ERROR: Unknown deployment type '$deploymentType'. Must be one of: prod, preview, dev\"\n exit 1\n ;;\nesac\n\nif [ $? -ne 0 ]; then\n echo \"ERROR: Convex deployment failed.\"\n exit 1\nfi\n\necho \"Convex deployment completed successfully.\"\n"
},
"Parameters": [
{
"Id": "6727833e-b393-470c-ab79-e72c3749e402",
"Name": "ConvexDeploy.DeployKey",
"Label": "Deploy Key",
"HelpText": "The Convex deploy key for the target project. Generate one with `npx convex deployment token` or via the Convex dashboard. Store this as a sensitive Octopus variable.\n\nSee: [Creating deploy keys](https://docs.convex.dev/cli#deploy-keys)",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "Sensitive"
}
},
{
"Id": "0b361a83-c5b8-441e-846a-9bc88b2d7114",
"Name": "ConvexDeploy.DeploymentType",
"Label": "Deployment Type",
"HelpText": "The type of Convex deployment to target.\n\n- `prod` \u2014 production deployment (default)\n- `preview` \u2014 preview deployment (requires a preview name)\n- `dev` \u2014 development deployment",
"DefaultValue": "prod",
"DisplaySettings": {
"Octopus.ControlType": "Select",
"Octopus.SelectOptions": "prod|Production\npreview|Preview\ndev|Development"
}
},
{
"Id": "8adff0dc-16d9-44ff-b05a-fcb7b92ff3ce",
"Name": "ConvexDeploy.PreviewName",
"Label": "Preview Name",
"HelpText": "The name of the preview deployment. Only required when **Deployment Type** is set to `preview`.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "dc368708-12b9-4d03-aeda-e7cd8e8326c3",
"Name": "ConvexDeploy.WorkingDirectory",
"Label": "Working Directory",
"HelpText": "Optional. The directory containing your Convex project (where `convex/` lives). Defaults to the current working directory if left blank.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "17fc0144-7fdc-4c5b-80fb-7143d503fef6",
"Name": "ConvexDeploy.CommandTimeout",
"Label": "Command Timeout (seconds)",
"HelpText": "Maximum number of seconds to wait for the deploy command to complete. Defaults to 300 (5 minutes).",
"DefaultValue": "300",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
}
],
"LastModifiedBy": "itsmebenwalker",
"$Meta": {
"ExportedAt": "2026-05-29T00:00:00.000Z",
"OctopusVersion": "2026.1.0",
"Type": "ActionTemplate"
},
"Category": "convex"
}
94 changes: 94 additions & 0 deletions step-templates/convex-export-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"Id": "3f4519f7-78f6-4fb9-8bc5-97e138825bb8",
"Name": "Convex - Export Data",
"Description": "Exports a snapshot of your Convex deployment's data to a local file using the [Convex CLI](https://docs.convex.dev/cli). Designed to be run before a production deployment as a data backup or rollback safety net.\n\nThe export file can optionally be captured as an Octopus build artifact for storage and auditing.",
"ActionType": "Octopus.Script",
"Version": 1,
"CommunityActionTemplateId": null,
"Packages": [],
"Properties": {
"Octopus.Action.Script.ScriptSource": "Inline",
"Octopus.Action.Script.Syntax": "Bash",
"Octopus.Action.Script.ScriptBody": "deployKey=$(get_octopusvariable \"ConvexExport.DeployKey\")\noutputPath=$(get_octopusvariable \"ConvexExport.OutputPath\")\ndeploymentType=$(get_octopusvariable \"ConvexExport.DeploymentType\")\npreviewName=$(get_octopusvariable \"ConvexExport.PreviewName\")\nworkingDir=$(get_octopusvariable \"ConvexExport.WorkingDirectory\")\ncaptureArtifact=$(get_octopusvariable \"ConvexExport.CaptureAsArtifact\")\ncmdTimeout=$(get_octopusvariable \"ConvexExport.CommandTimeout\")\n\nif [ -z \"$deployKey\" ]; then\n echo \"ERROR: ConvexExport.DeployKey is required.\"\n exit 1\nfi\n\nif [ -z \"$deploymentType\" ]; then\n deploymentType=\"prod\"\nfi\n\nif [ -z \"$cmdTimeout\" ]; then\n cmdTimeout=\"600\"\nfi\n\nexport CONVEX_DEPLOY_KEY=\"$deployKey\"\n\nif [ -n \"$workingDir\" ]; then\n echo \"Changing to working directory: $workingDir\"\n cd \"$workingDir\" || { echo \"ERROR: Could not change to directory '$workingDir'\"; exit 1; }\nfi\n\ntimestamp=$(date +\"%Y%m%d_%H%M%S\")\n\nif [ -z \"$outputPath\" ]; then\n outputPath=\"convex-export-${timestamp}.zip\"\nfi\n\ndeploymentFlag=\"\"\ncase \"$deploymentType\" in\n prod)\n deploymentFlag=\"--prod\"\n ;;\n preview)\n if [ -z \"$previewName\" ]; then\n echo \"ERROR: ConvexExport.PreviewName is required when deployment type is 'preview'.\"\n exit 1\n fi\n deploymentFlag=\"--preview-name $previewName\"\n ;;\n dev)\n deploymentFlag=\"\"\n ;;\nesac\n\nensure_node() {\n if command -v npx &>/dev/null; then\n echo \"Node.js found: $(node --version)\"\n return 0\n fi\n export NVM_DIR=\"${NVM_DIR:-$HOME/.nvm}\"\n if [ -s \"$NVM_DIR/nvm.sh\" ]; then\n \\. \"$NVM_DIR/nvm.sh\"\n if command -v npx &>/dev/null; then\n echo \"Node.js loaded via nvm: $(node --version)\"\n return 0\n fi\n fi\n echo \"Node.js not found. Installing via nvm...\"\n curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash\n \\. \"$NVM_DIR/nvm.sh\"\n nvm install --lts\n echo \"Node.js installed: $(node --version)\"\n}\nensure_node\n\necho \"Exporting Convex data from: $deploymentType\"\necho \"Output file: $outputPath\"\n\ntimeout \"$cmdTimeout\" npx convex export $deploymentFlag --path \"$outputPath\"\n\nexitCode=$?\nif [ $exitCode -ne 0 ]; then\n echo \"ERROR: Convex export failed with exit code $exitCode.\"\n exit $exitCode\nfi\n\nif [ ! -f \"$outputPath\" ]; then\n echo \"ERROR: Export completed but output file not found at '$outputPath'.\"\n exit 1\nfi\n\nfileSize=$(du -sh \"$outputPath\" | cut -f1)\necho \"Export complete. File: $outputPath ($fileSize)\"\n\nif [ \"$captureArtifact\" = \"True\" ]; then\n new_octopusartifact \"$outputPath\"\n echo \"Export captured as Octopus artifact.\"\nfi\n"
},
"Parameters": [
{
"Id": "ba76acd0-99e4-4aa1-8554-e0696b528ed7",
"Name": "ConvexExport.DeployKey",
"Label": "Deploy Key",
"HelpText": "The Convex deploy key for the target project. Store this as a sensitive Octopus variable.\n\nSee: [Creating deploy keys](https://docs.convex.dev/cli#deploy-keys)",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "Sensitive"
}
},
{
"Id": "17b1f813-7b43-4528-bafe-5b52eac6df1b",
"Name": "ConvexExport.OutputPath",
"Label": "Output File Path",
"HelpText": "Optional. The local path where the export ZIP file should be written.\n\nDefaults to `convex-export-{timestamp}.zip` in the current working directory if left blank.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "e7002edd-eb0d-4c2b-979e-972c095eede5",
"Name": "ConvexExport.DeploymentType",
"Label": "Deployment Type",
"HelpText": "The Convex deployment to export data from.\n\n- `prod` \u2014 production deployment (default)\n- `preview` \u2014 preview deployment (requires a preview name)\n- `dev` \u2014 development deployment",
"DefaultValue": "prod",
"DisplaySettings": {
"Octopus.ControlType": "Select",
"Octopus.SelectOptions": "prod|Production\npreview|Preview\ndev|Development"
}
},
{
"Id": "81526834-4204-4696-bfc4-3e965dcb320d",
"Name": "ConvexExport.PreviewName",
"Label": "Preview Name",
"HelpText": "The name of the preview deployment. Only required when **Deployment Type** is `preview`.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "690649ca-3801-45d1-9a59-45e561c127f5",
"Name": "ConvexExport.WorkingDirectory",
"Label": "Working Directory",
"HelpText": "Optional. Path to the directory containing your Convex project. Defaults to the current working directory if left blank.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "036c1260-7b14-4c05-8948-858cc1b5c893",
"Name": "ConvexExport.CaptureAsArtifact",
"Label": "Capture as Octopus Artifact",
"HelpText": "When enabled, the exported file will be captured as an Octopus build artifact, making it available for download from the deployment details page.",
"DefaultValue": "True",
"DisplaySettings": {
"Octopus.ControlType": "Checkbox"
}
},
{
"Id": "186fac8e-92c9-482f-adea-551cb64dd999",
"Name": "ConvexExport.CommandTimeout",
"Label": "Command Timeout (seconds)",
"HelpText": "Maximum number of seconds to wait for the export to complete. Defaults to 600 (10 minutes). Large datasets may require a higher value.",
"DefaultValue": "600",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
}
],
"LastModifiedBy": "itsmebenwalker",
"$Meta": {
"ExportedAt": "2026-05-29T00:00:00.000Z",
"OctopusVersion": "2026.1.0",
"Type": "ActionTemplate"
},
"Category": "convex"
}
94 changes: 94 additions & 0 deletions step-templates/convex-run-function.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"Id": "307071fd-c649-4ab6-8b14-549da0943273",
"Name": "Convex - Run Function",
"Description": "Invokes a Convex mutation, action, or query against a deployment using the [Convex CLI](https://docs.convex.dev/cli). Ideal for running post-deploy data migrations, seeding initial data, or executing smoke-test queries as part of a deployment pipeline.",
"ActionType": "Octopus.Script",
"Version": 1,
"CommunityActionTemplateId": null,
"Packages": [],
"Properties": {
"Octopus.Action.Script.ScriptSource": "Inline",
"Octopus.Action.Script.Syntax": "Bash",
"Octopus.Action.Script.ScriptBody": "deployKey=$(get_octopusvariable \"ConvexRun.DeployKey\")\nfunctionPath=$(get_octopusvariable \"ConvexRun.FunctionPath\")\nfunctionArgs=$(get_octopusvariable \"ConvexRun.FunctionArgs\")\ndeploymentType=$(get_octopusvariable \"ConvexRun.DeploymentType\")\npreviewName=$(get_octopusvariable \"ConvexRun.PreviewName\")\nworkingDir=$(get_octopusvariable \"ConvexRun.WorkingDirectory\")\ncmdTimeout=$(get_octopusvariable \"ConvexRun.CommandTimeout\")\n\nif [ -z \"$deployKey\" ]; then\n echo \"ERROR: ConvexRun.DeployKey is required.\"\n exit 1\nfi\n\nif [ -z \"$functionPath\" ]; then\n echo \"ERROR: ConvexRun.FunctionPath is required.\"\n exit 1\nfi\n\nif [ -z \"$deploymentType\" ]; then\n deploymentType=\"prod\"\nfi\n\nif [ -z \"$cmdTimeout\" ]; then\n cmdTimeout=\"120\"\nfi\n\nexport CONVEX_DEPLOY_KEY=\"$deployKey\"\n\nif [ -n \"$workingDir\" ]; then\n echo \"Changing to working directory: $workingDir\"\n cd \"$workingDir\" || { echo \"ERROR: Could not change to directory '$workingDir'\"; exit 1; }\nfi\n\ndeploymentFlag=\"\"\ncase \"$deploymentType\" in\n prod)\n deploymentFlag=\"--prod\"\n ;;\n preview)\n if [ -z \"$previewName\" ]; then\n echo \"ERROR: ConvexRun.PreviewName is required when deployment type is 'preview'.\"\n exit 1\n fi\n deploymentFlag=\"--preview-name $previewName\"\n ;;\n dev)\n deploymentFlag=\"\"\n ;;\nesac\n\nensure_node() {\n if command -v npx &>/dev/null; then\n echo \"Node.js found: $(node --version)\"\n return 0\n fi\n export NVM_DIR=\"${NVM_DIR:-$HOME/.nvm}\"\n if [ -s \"$NVM_DIR/nvm.sh\" ]; then\n \\. \"$NVM_DIR/nvm.sh\"\n if command -v npx &>/dev/null; then\n echo \"Node.js loaded via nvm: $(node --version)\"\n return 0\n fi\n fi\n echo \"Node.js not found. Installing via nvm...\"\n curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash\n \\. \"$NVM_DIR/nvm.sh\"\n nvm install --lts\n echo \"Node.js installed: $(node --version)\"\n}\nensure_node\n\necho \"Running Convex function: $functionPath\"\necho \"Deployment type: $deploymentType\"\n\nif [ -n \"$functionArgs\" ]; then\n echo \"Args: $functionArgs\"\n timeout \"$cmdTimeout\" npx convex run $deploymentFlag \"$functionPath\" \"$functionArgs\"\nelse\n timeout \"$cmdTimeout\" npx convex run $deploymentFlag \"$functionPath\"\nfi\n\nexitCode=$?\nif [ $exitCode -ne 0 ]; then\n echo \"ERROR: Convex function '$functionPath' failed with exit code $exitCode.\"\n exit $exitCode\nfi\n\necho \"Convex function '$functionPath' completed successfully.\"\n"
},
"Parameters": [
{
"Id": "2768e849-72d0-4542-a60e-cc7596a1da91",
"Name": "ConvexRun.DeployKey",
"Label": "Deploy Key",
"HelpText": "The Convex deploy key for the target project. Store this as a sensitive Octopus variable.\n\nSee: [Creating deploy keys](https://docs.convex.dev/cli#deploy-keys)",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "Sensitive"
}
},
{
"Id": "717bb5dd-7e32-4689-8016-bf781d612051",
"Name": "ConvexRun.FunctionPath",
"Label": "Function Path",
"HelpText": "The path to the Convex function to invoke, in the format `module:functionName`.\n\nExamples:\n- `migrations:runV2`\n- `seed:populateDefaults`\n- `healthcheck:ping`",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "282ce782-e9dc-4cad-a3c2-68fecebda89b",
"Name": "ConvexRun.FunctionArgs",
"Label": "Function Arguments (JSON)",
"HelpText": "Optional. A JSON object of arguments to pass to the function.\n\nExample: `{\"dryRun\": false, \"batchSize\": 100}`\n\nLeave blank if the function takes no arguments.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "MultiLineText"
}
},
{
"Id": "6cb1f84c-16af-4cfe-aaef-a3b8bb37d0bf",
"Name": "ConvexRun.DeploymentType",
"Label": "Deployment Type",
"HelpText": "The Convex deployment to target.\n\n- `prod` \u2014 production deployment (default)\n- `preview` \u2014 preview deployment (requires a preview name)\n- `dev` \u2014 development deployment",
"DefaultValue": "prod",
"DisplaySettings": {
"Octopus.ControlType": "Select",
"Octopus.SelectOptions": "prod|Production\npreview|Preview\ndev|Development"
}
},
{
"Id": "8e0918a3-4625-4830-80fd-1b330da2101d",
"Name": "ConvexRun.PreviewName",
"Label": "Preview Name",
"HelpText": "The name of the preview deployment. Only required when **Deployment Type** is `preview`.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "fe0a3a69-6a44-4dcb-ba71-0b1e1546ea25",
"Name": "ConvexRun.WorkingDirectory",
"Label": "Working Directory",
"HelpText": "Optional. Path to the directory containing your Convex project. Defaults to the current working directory if left blank.",
"DefaultValue": "",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
},
{
"Id": "ac421438-68fa-4c33-a984-fa9cd7f9e007",
"Name": "ConvexRun.CommandTimeout",
"Label": "Command Timeout (seconds)",
"HelpText": "Maximum number of seconds to wait for the function to complete. Defaults to 120.",
"DefaultValue": "120",
"DisplaySettings": {
"Octopus.ControlType": "SingleLineText"
}
}
],
"LastModifiedBy": "itsmebenwalker",
"$Meta": {
"ExportedAt": "2026-05-29T00:00:00.000Z",
"OctopusVersion": "2026.1.0",
"Type": "ActionTemplate"
},
"Category": "convex"
}
Loading