YAMS Uploader

Octopus.Script exported 2016-11-24 by jkonecki belongs to ‘Other’ category.

Upload YAMS application.

YAMS is a library that can be used to deploy and host microservices in the cloud or on premises. This step uses YAMS Uploader to publish applications to YAMS cluster.

Parameters

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

Yams Uploader Step

YamsUploaderStep =

The step that installed Applicita.YamsUploader package

Package Step

PackageStep

The step that installed Application package

Application Id

AppId

YAMS Application Id

Application Version

AppVersion = #{Octopus.Release.Number}

SemVer version of the application

Cluster Id

ClusterId

null

Storage Connection String

Storage

Connection string for YAMS storage account

Script body

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

$yamsUploaderInstallationParameter = "Octopus.Action[$YamsUploaderStep].Output.Package.InstallationDirectoryPath"
Write-Host "Yams Uploader installation path parameter: $yamsUploaderInstallationParameter" 
$applicationInstallationParameter = "Octopus.Action[$PackageStep].Output.Package.InstallationDirectoryPath"
Write-Host "Application Package installation path parameter: $applicationInstallationParameter" 

$yamsUploader = $OctopusParameters[$yamsUploaderInstallationParameter] + "\content\YamsUploader.exe"
Write-Host "Running Yams Uploader: $yamsUploader" 

$binaries = $OctopusParameters[$applicationInstallationParameter]
Write-Host "Uploading application: $binaries"

& "$yamsUploader" -YamsStorage "$Storage" -ClusterId "$ClusterId" -BinariesPath "$binaries" -AppVersion "$AppVersion" -AppId "$AppId"

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": "a1d95c5f-42fb-43b3-8bee-74a255f2ae71",
  "Name": "YAMS Uploader",
  "Description": "Upload YAMS application.\n\n[YAMS](https://github.com/Microsoft/Yams) is a library that can be used to deploy and host microservices in the cloud or on premises. This step uses [YAMS Uploader](https://github.com/Applicita/YamsUploader) to publish applications to YAMS cluster.",
  "Version": 1,
  "ExportedAt": "2016-11-24T18:45:19.864Z",
  "ActionType": "Octopus.Script",
  "Author": "jkonecki",
  "Parameters": [
    {
      "Id": "b3c01e47-0141-4756-bbf5-d43069a8a30b",
      "Name": "YamsUploaderStep",
      "Label": "Yams Uploader Step",
      "HelpText": "The step that installed Applicita.YamsUploader package",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "StepName"
      },
      "Links": {}
    },
    {
      "Id": "605e9675-50b0-4c84-86a0-897c9c2d9124",
      "Name": "PackageStep",
      "Label": "Package Step",
      "HelpText": "The step that installed Application package",
      "DefaultValue": null,
      "DisplaySettings": {
        "Octopus.ControlType": "StepName"
      },
      "Links": {}
    },
    {
      "Id": "d1b26565-cd68-45df-bf14-0b68724a0e29",
      "Name": "AppId",
      "Label": "Application Id",
      "HelpText": "YAMS Application Id",
      "DefaultValue": null,
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      },
      "Links": {}
    },
    {
      "Id": "cc6d856a-a8d8-4621-81f0-c8f2063e5dc0",
      "Name": "AppVersion",
      "Label": "Application Version",
      "HelpText": "SemVer version of the application",
      "DefaultValue": "#{Octopus.Release.Number}",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      },
      "Links": {}
    },
    {
      "Id": "c582ccd6-4f00-4362-ace7-dffe5ed23bae",
      "Name": "ClusterId",
      "Label": "Cluster Id",
      "HelpText": null,
      "DefaultValue": null,
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      },
      "Links": {}
    },
    {
      "Id": "1d8eb780-e240-4a65-bcdc-9df1c8bac7cb",
      "Name": "Storage",
      "Label": "Storage Connection String",
      "HelpText": "Connection string for YAMS storage account",
      "DefaultValue": null,
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      },
      "Links": {}
    }
  ],
  "Properties": {
    "Octopus.Action.Script.Syntax": "PowerShell",
    "Octopus.Action.Script.ScriptSource": "Inline",
    "Octopus.Action.RunOnServer": "false",
    "Octopus.Action.Script.ScriptBody": "$yamsUploaderInstallationParameter = \"Octopus.Action[$YamsUploaderStep].Output.Package.InstallationDirectoryPath\"\nWrite-Host \"Yams Uploader installation path parameter: $yamsUploaderInstallationParameter\" \n$applicationInstallationParameter = \"Octopus.Action[$PackageStep].Output.Package.InstallationDirectoryPath\"\nWrite-Host \"Application Package installation path parameter: $applicationInstallationParameter\" \n\n$yamsUploader = $OctopusParameters[$yamsUploaderInstallationParameter] + \"\\content\\YamsUploader.exe\"\nWrite-Host \"Running Yams Uploader: $yamsUploader\" \n\n$binaries = $OctopusParameters[$applicationInstallationParameter]\nWrite-Host \"Uploading application: $binaries\"\n\n& \"$yamsUploader\" -YamsStorage \"$Storage\" -ClusterId \"$ClusterId\" -BinariesPath \"$binaries\" -AppVersion \"$AppVersion\" -AppId \"$AppId\"",
    "Octopus.Action.Script.ScriptFileName": null,
    "Octopus.Action.Package.FeedId": null,
    "Octopus.Action.Package.PackageId": null
  },
  "Category": "Other",
  "HistoryUrl": "https://github.com/OctopusDeploy/Library/commits/master/step-templates//opt/buildagent/work/75443764cd38076d/step-templates/yams-upload.json",
  "Website": "/step-templates/a1d95c5f-42fb-43b3-8bee-74a255f2ae71",
  "Logo": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAET9JREFUeNrsnV2MG1cVx2fGH2t7vU6zm27TTdxNgCTbVkUKggBFDR9FIKoWVX2o1BeeqNQXHnjgueozD7z2CSQEQgKEqlIVgSjQlrYQWoHaom6a0u7GyWbrxrus159je8zfvonZ2p7xx5w7c2d8/opWG9vruXPu755z7sfcq7fbbY3FopbOYLEYLBaDxWKw2AosBovFYLEYLBaLwWIxWCwGi8VisFgMFovBYrEYLBaDxWKwWCwGi8VgsRgsFovBki7Yx7KsvhcNw9B1nY3DYI1Qq9WyuhIYDYXJTgKy3k8oEomwSWcULJDUbDatmyL/fuOmotHobHI2Q2AJmARPHl9aEDZTkIUcLNwdSBJIqXCnCJcCL/wMd5YWWrCEc2o0GsqWMBaLCTfGYAVACHONroJyX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