Octolint a Space

Octopus.Script exported 2024-01-12 by ryanrousseau belongs to ‘Octopus’ category.

Run the octolint tool against a Space to get a usage recommendation report.

This step requires a worker or execution container that has docker installed.

Parameters

When steps based on the template are included in a project’s deployment process, the parameters below can be set.

Octopus Server URI

Octolint.Octopus.ServerUri = #{Octopus.Web.ServerUri}

The URI of the Octopus Server. For use on the same server, #{Octopus.Web.ServerUri} will work.

Octopus Server API Key

Octolint.Octopus.ApiKey =

The API key with read permissions to the space being linted.

Octopus Space Name

Octolint.Octopus.SpaceName = #{Octopus.Space.Name}

The name of the Space being linted.

Script body

Steps based on this template will execute the following PowerShell script.

$server = $OctopusParameters["Octolint.Octopus.ServerUri"]
$apiKey = $OctopusParameters["Octolint.Octopus.ApiKey"]
$spaceName = $OctopusParameters["Octolint.Octopus.SpaceName"]

docker pull octopussamples/octolint
docker run --rm octopussamples/octolint -url "$server" -apiKey "$apiKey" -space "$spaceName" -verboseErrors

Provided under the Apache License version 2.0.

Report an issue

To use this template in Octopus Deploy, copy the JSON below and paste it into the Library → Step templates → Import dialog.

{
  "Id": "48e2b213-324a-43be-8fa1-f8e08a2bb547",
  "Name": "Octolint a Space",
  "Description": "Run the [octolint tool](https://github.com/OctopusSolutionsEngineering/OctopusRecommendationEngine) against a Space to get a usage recommendation report.\n\nThis step requires a worker or execution container that has docker installed.",
  "Version": 1,
  "ExportedAt": "2024-01-12T16:25:50.307Z",
  "ActionType": "Octopus.Script",
  "Author": "ryanrousseau",
  "Packages": [],
  "Parameters": [
    {
      "Id": "5d03c192-1126-4912-986e-799098fcf4a7",
      "Name": "Octolint.Octopus.ServerUri",
      "Label": "Octopus Server URI",
      "HelpText": "The URI of the Octopus Server. For use on the same server, #{Octopus.Web.ServerUri} will work.",
      "DefaultValue": "#{Octopus.Web.ServerUri}",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "58392cba-5d54-4ba1-9447-388b0bc439fb",
      "Name": "Octolint.Octopus.ApiKey",
      "Label": "Octopus Server API Key",
      "HelpText": "The API key with [read permissions](https://github.com/OctopusSolutionsEngineering/OctopusRecommendationEngine#permissions) to the space being linted.",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "Sensitive"
      }
    },
    {
      "Id": "b51e59f4-86ca-423d-87a0-f29faa1cd159",
      "Name": "Octolint.Octopus.SpaceName",
      "Label": "Octopus Space Name",
      "HelpText": "The name of the Space being linted.",
      "DefaultValue": "#{Octopus.Space.Name}",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    }
  ],
  "Properties": {
    "Octopus.Action.RunOnServer": "true",
    "Octopus.Action.Script.ScriptSource": "Inline",
    "Octopus.Action.Script.Syntax": "PowerShell",
    "Octopus.Action.Script.ScriptBody": "$server = $OctopusParameters[\"Octolint.Octopus.ServerUri\"]\n$apiKey = $OctopusParameters[\"Octolint.Octopus.ApiKey\"]\n$spaceName = $OctopusParameters[\"Octolint.Octopus.SpaceName\"]\n\ndocker pull octopussamples/octolint\ndocker run --rm octopussamples/octolint -url \"$server\" -apiKey \"$apiKey\" -space \"$spaceName\" -verboseErrors"
  },
  "Category": "Octopus",
  "HistoryUrl": "https://github.com/OctopusDeploy/Library/commits/master/step-templates//opt/buildagent/work/75443764cd38076d/step-templates/octopus-octolint-a-space.json",
  "Website": "/step-templates/48e2b213-324a-43be-8fa1-f8e08a2bb547",
  "Logo": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAC1QTFRFT6Tl////L5Pg8vj9Y67omsvwPJrisdfzfbzs5fL7y+T32Ov5isLucLXqvt31CJPHWwAABMJJREFUeNrs3deW4jAMAFDF3U75/89dlp0ZhiU4blJEjvQ8hYubLJsA00UCBCIQgQhEIAIRiEAEIhCBCEQgAhGIQAQiEIEIhD8kJm+t+QprfdKfB9HbYpx6CWfspj8HMi+gMgHL/AmQA8W3JTKH+ALFv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GH4tMzWwR+lZhRkJYSsC0thpmCYqyngOz3rN2FLBZ2wZflBCggUHF0Vnp88JKienzIXLSEZCZqU7IKr/gQW9yx3pzV7Y9kvWZWTRRIqDmTtRUnU7b2lLcTYmoqHqnmiO1poER0SPkAeZMAZxaJx0Y3TCdAclsIqDz03ALcyxfTCZBsthoGXWmigGyVhWPLFJJfuuKQWycoEFdXbH4dJJoJxNR1eD/kshz6yn48cF8yW8sFoitflB1w6Q8n+/15Za7oA17/pYNmYgP5fmWm8L1NOHPWgK8kuFew1/JXtOA0yJCv7ah7X8ObUuT5kObU30+fDZm8+zqP+HTIpK0xQ796b5Kv2hSIQAQiEIEIRCACEYhABCIQgQhEIAIRiEAEIpBf8UeAAQAEjtYmlDTcCgAAAABJRU5ErkJggg==",
  "$Meta": {
    "Type": "ActionTemplate"
  }
}

History

Page updated on Friday, January 12, 2024