cli icon indicating copy to clipboard operation
cli copied to clipboard

Add commands for Runbook operations, specifically 'create-runbook'

Open dgard1981 opened this issue 3 years ago • 1 comments

Good morning,

Can I please request that you add additional commands for Runbook operations to the Octopus CLI.

Presently the only Runbook operation in is run-runbook. What I'd like to see are these two operations -

  • create-runbook: Ideally this would work in almost exactly the same way as create-release, allowing the specification of defaultPackageVersion and package to set package versions to use with steps. I'd also like to be able to optionally publish the new Runbook after creation.
  • publish-runbook: This operation would allow publishing of an existing Runbook.

Assuming I have one or more steps in both my Deployment Process and a Runbook that references a script, currently when using AWS CodeBuild I can create a package, upload it to S3 and then create a release on Octopus, but I have to manually create the Runbook and then publish it. What I'd like to be able to do is something like this.

version: 0.2
env:
  shell: bash
phases:
  ...
  build:
    commands:
      - dotnet-octo pack --id="${PACKAGE_ID}" --basePath="${PACKAGE_BASE_PATH}" --version=${VERSION} --outFolder=Artifacts --format=zip
      - aws s3 cp Artifacts/${PACKAGE_ID}.*.zip ${BUCKET_FEED_URL}
      - dotnet-octo create-release --project ${PROJECT_ID} --space ${SPACE_ID} --defaultPackageVersion ${VERSION} --version ${VERSION} --ignoreExisting
      - dotnet-octo create-runbook --project ${PROJECT_ID} --space ${SPACE_ID} --defaultPackageVersion ${VERSION} --name ${VERSION} --ignoreExisting --publish

I'd be happy to provide further details if that would help.

Thanks. David

dgard1981 avatar Oct 11 '22 08:10 dgard1981

This is related to https://github.com/OctopusDeploy/cli/issues/165

toby-freemarket avatar May 22 '23 13:05 toby-freemarket