Skip to content

docs(deployments): add Commit to Git step page#3196

Merged
rain-on merged 9 commits into
mainfrom
tmm/commit_to_git
Jun 4, 2026
Merged

docs(deployments): add Commit to Git step page#3196
rain-on merged 9 commits into
mainfrom
tmm/commit_to_git

Conversation

@rain-on
Copy link
Copy Markdown
Contributor

@rain-on rain-on commented Jun 3, 2026

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.

subfolders was added to dictionary-octopus.txt.

🤖 Generated with Claude Code

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>
rain-on and others added 5 commits June 3, 2026 16:01
…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>
@team-marketing-branch-protections
Copy link
Copy Markdown

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.

@rain-on rain-on requested a review from tleed5 June 4, 2026 02:24
Copy link
Copy Markdown
Contributor

@tleed5 tleed5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah nice idea - I'll add something in

rain-on and others added 3 commits June 4, 2026 16:09
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>
@rain-on rain-on merged commit 9067401 into main Jun 4, 2026
5 checks passed
@rain-on rain-on deleted the tmm/commit_to_git branch June 4, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants