Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for running Git runbooks #441

Merged
merged 21 commits into from
Nov 22, 2024

Conversation

geofflamrock
Copy link
Contributor

@geofflamrock geofflamrock commented Nov 1, 2024

This PR is part of a series that adds support to the CLI for interacting with runbooks stored in Git for version controlled projects

Background

Git runbooks operate differently to runbooks stored in the Octopus database in that there are no draft/published snapshots, these are replaced with running a runbook using a Git reference such as main. This means that in order to run a runbook that uses packages or Git resources these need to be supplied as part of the run creation.

Changes

This PR adds support for running a Git runbook. It detects whether the project selected is storing runbooks in Git and if so will support new parameters:

  • --git-ref: The Git ref to run for (required).
  • --package-version: The default version to use for any packages.
  • --packages: Specific versions of packages.
  • --git-resources: Git resources to select.

The parameters for package versions and Git resources operate in the same way as creating releases and use the same code from #440.

This PR requires OctopusDeploy/go-octopusdeploy#278 to be merged and a new version of the go library to be available.

@geofflamrock geofflamrock changed the title Add support for running Git runbook Add support for running Git runbooks Nov 1, 2024
@geofflamrock geofflamrock assigned zentron and geofflamrock and unassigned zentron Nov 7, 2024
@geofflamrock geofflamrock marked this pull request as ready for review November 18, 2024 03:21
@geofflamrock geofflamrock changed the title Add support for running Git runbooks feat: Add support for running Git runbooks Nov 18, 2024
@geofflamrock geofflamrock requested a review from a team November 19, 2024 01:07
Copy link

@stevencl840 stevencl840 left a comment

Choose a reason for hiding this comment

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

It looks good to me but the tests have failed. I will take another look once they are green

@geofflamrock
Copy link
Contributor Author

It looks good to me but the tests have failed. I will take another look once they are green

Thanks @stevencl840 yep this PR needs to wait for OctopusDeploy/go-octopusdeploy#278 to be merged and a new version of the go library to be available before it will compile and pass the tests

Base automatically changed from geoffl-git-runbooks-part-1 to main November 19, 2024 03:39
@geofflamrock geofflamrock removed their assignment Nov 20, 2024
@geofflamrock geofflamrock merged commit 7cc29ad into main Nov 22, 2024
4 checks passed
@geofflamrock geofflamrock deleted the geoffl-git-runbooks-part-2 branch November 22, 2024 01:21
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.

3 participants