docs(deployments): add Commit to Git step page#3196
Conversation
Document the new Commit to Git built-in step under a new Deployments > Git area. Covers the destination repository, commit message, commit method, input files, optional script, step verification, execution flow, and output variables, plus the Early Access caveats around credential types and pull request support. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…D060 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Remove the paragraph comparing the step to the Helm and script steps. - Clarify that the script runs after input sources are copied. - Document the CommitToGit.CommitSha output variable and how to resolve it via Octopus.Action[<step>].Git.CommitDetailsActionName. - Replace the incorrect flat-copy note with accurate warnings on wildcard prefix removal and relative source/destination paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Pull request environment is available at https://stoctodocspr3196.z22.web.core.windows.net. You can view the ephemeral environment status in Octopus Deploy. This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity. |
tleed5
left a comment
There was a problem hiding this comment.
Looks good, just one suggestion
| You can run a single script during the step, for example to transform your input files before Octopus commits them. Octopus runs the script after it copies your input sources into the repository, so the script can work with those files before they're committed. The script can be Bash, PowerShell, C#, or Python, and you can source it inline, from a package, or from a Git repository. | ||
|
|
||
| - For package and Git repository scripts, you can pass parameters and reference other packages as dependencies. Inline scripts don't support parameters. | ||
| - The script runs from the standard Calamari working directory, with the cloned destination repository available to it. Octopus exposes the path to the repository through the `Octopus.Calamari.Git.RepositoryPath` variable, which points to the root of the repository so your script can read and modify files before the commit. |
There was a problem hiding this comment.
Needing to use Octopus.Calamari.Git.RepositoryPath variable wasn't obvious to me at all when I was testing the step and I think a few others got confused as well. I think adding an example script just below this point would be useful. Something simple that showcases how to read files and write files to the repo
There was a problem hiding this comment.
yeah nice idea - I'll add something in
Show a basic script that uses Octopus.Calamari.Git.RepositoryPath in PowerShell, C#, Bash, and Python, grouped into tabs with the data-group details pattern. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Background
The new Commit to Git built-in step (
Octopus.CommitToGit) commits packages and files to a Git repository as part of a deployment process. It currently has no documentation. This step is in Early Access.Results
Adds documentation under a new Deployments → Git area:
src/pages/docs/deployments/git/index.md— short landing page for the Git steps area.src/pages/docs/deployments/git/commit-to-git.md— the step page at/docs/deployments/git/commit-to-git.The page covers the destination repository, commit message, Git commit method, input files (including the flat-copy behaviour), the optional script, step verification, what happens during deployment, and the output variables. It leads with an Early Access callout and a Caveats section documenting that the destination repository must use a Git credential library credential, that GitHub App connections aren't supported, and that SSH credentials can commit directly but can't create or wait for pull requests.
subfolderswas added todictionary-octopus.txt.🤖 Generated with Claude Code