Redgate - Create Oracle Release

Octopus.TentaclePackage exported 2019-03-26 by octobob belongs to ‘Redgate’ category.

This step will use the Redgate Oracle Deployment Suite. It will create a delta sql script and report so you can review it prior to being deployed to the Oracle Server. This step will download a package containing the scripts generated by Redgate Source Control for Oracle.

Please note: the Redgate Oracle Deployment Suite must be installed on the target machine for this to work. The target machine must also have the ability to connect to the Oracle database.

Parameters

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

Deployment Suite for Oracle Install Path

Redgate.Oracle.InstallPath = C:\Program Files\Red Gate\

The location where the Deployment Suite for Oracle is installed to

Package Feed Id

Redgate.Oracle.PackageFeed = feeds-builtin

The id of the package feed to use. This will use the default feed id. If you need to use another feed id you can go to library -> external feeds and select the feed you want to use. If you look in the url, that is the feed id.

Package Name

Redgate.Oracle.PackageName =

The name of the package to deploy

Export Path

Redgate.Oracle.ExportPath =

The path where the scripts and reports will be exported to

TNS Name

Redgate.Oracle.Server =

The TNS Name entry in tnsnames.ora containing the necessary connection information

Oracle Username

Redgate.Oracle.Username =

The username of the user to sign with

Oracle User Password

Redgate.Oracle.Password =

The password of the user to login with

Source Schema

Redgate.Oracle.SourceSchema =

The source schema you wish to deploy from

Deployment Schema

Redgate.Oracle.DeploymentSchema =

The schema being deployed

Custom Filter Path (optional)

Redgate.Oracle.FilterPath =

By default, the filter.scpf will be used, if present for the deployment. Provide a relative path to the filter file you wish to use. It will be the path relative to the schema folder provided.

Behavior Options (optional)

Redgate.Oracle.BehaviorOptions =

Specify the behavior options as listed out in the documentation for Schema Compare for Oracle.

Default is “hdr” (scriptheader, defineoff, and detectcolumnrenames)

Exclude Options (optional)

Redgate.Oracle.ExcludeOptions =

Specify the exclude options as listed out in the documentation for Schema Compare for Oracle.

Default is no exclusions

Exclude Dependencies

Redgate.Oracle.ExcludeDependencies = False

Excludes dependent (referenced) objects from deployment. Default is false.

Ignore Options (optional)

Redgate.Oracle.IgnoreOptions =

Specify the ignore options as listed out in the documentation for Schema Compare for Oracle.

Default is “sdwqgva” (slowdependencies, dependentobjects, whitespace, doublequotes, storage, sequencevalue, and mviewvalue)

Storage Options (optional)

Redgate.Oracle.StorageOptions =

Specify the storage options as listed out in the documentation for Schema Compare for Oracle.

The default is “none”

Include Identical

Redgate.Oracle.IncludeIdentical = False

Include Identical options in the generated HTML report

Script body

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

undefined

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": "0aa40fba-949c-4065-a438-010349c3fd0c",
  "Name": "Redgate - Create Oracle Release",
  "Description": "This step will use the [Redgate Oracle Deployment Suite](https://www.red-gate.com/products/oracle-development/deployment-suite-for-oracle/).  It will create a delta sql script and report so you can review it prior to being deployed to the Oracle Server.  This step will download a package containing the scripts generated by Redgate Source Control for Oracle.\n\nPlease note: the Redgate Oracle Deployment Suite must be installed on the target machine for this to work.  The target machine must also have the ability to connect to the Oracle database.",
  "Version": 8,
  "ExportedAt": "2019-03-26T18:54:49.750Z",
  "ActionType": "Octopus.TentaclePackage",
  "Author": "octobob",
  "Packages": [
    {
      "Id": "c02bc919-e5e4-4d3e-b7c5-1f2489201850",
      "Name": "",
      "PackageId": "#{Redgate.Oracle.PackageName}",
      "FeedId": "#{Redgate.Oracle.PackageFeed}",
      "AcquisitionLocation": "Server",
      "Properties": {}
    }
  ],
  "Parameters": [
    {
      "Id": "fed1466b-b5d2-4815-9b54-7b7e696a97aa",
      "Name": "Redgate.Oracle.InstallPath",
      "Label": "Deployment Suite for Oracle Install Path",
      "HelpText": "The location where the Deployment Suite for Oracle is installed to",
      "DefaultValue": "C:\\Program Files\\Red Gate\\",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "bdeab5b9-c12c-43d8-9919-10e7c4a0e742",
      "Name": "Redgate.Oracle.PackageFeed",
      "Label": "Package Feed Id",
      "HelpText": "The id of the package feed to use.  This will use the default feed id.  If you need to use another feed id you can go to library -> external feeds and select the feed you want to use.  If you look in the url, that is the feed id.",
      "DefaultValue": "feeds-builtin",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "67da3f13-b1ca-48bb-a81a-dc3efe53dea3",
      "Name": "Redgate.Oracle.PackageName",
      "Label": "Package Name",
      "HelpText": "The name of the package to deploy",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "e12c322b-7e60-4b0e-8d80-2dbc2abca58f",
      "Name": "Redgate.Oracle.ExportPath",
      "Label": "Export Path",
      "HelpText": "The path where the scripts and reports will be exported to",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "ee435c96-3542-4b38-ad12-c38fc607c23d",
      "Name": "Redgate.Oracle.Server",
      "Label": "TNS Name",
      "HelpText": "The TNS Name entry in tnsnames.ora containing the necessary connection information",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "8d19f141-b250-4fc5-999d-457549cd041f",
      "Name": "Redgate.Oracle.Username",
      "Label": "Oracle Username",
      "HelpText": "The username of the user to sign with",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "138eff39-87e6-462d-808c-70259fd251cc",
      "Name": "Redgate.Oracle.Password",
      "Label": "Oracle User Password",
      "HelpText": "The password of the user to login with",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "Sensitive"
      }
    },
    {
      "Id": "3e164f6c-1bcd-4318-a72c-65bf21d64c9a",
      "Name": "Redgate.Oracle.SourceSchema",
      "Label": "Source Schema",
      "HelpText": "The source schema you wish to deploy from",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "49225f70-591c-4626-abc2-e351065b7510",
      "Name": "Redgate.Oracle.DeploymentSchema",
      "Label": "Deployment Schema",
      "HelpText": "The schema being deployed",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "243fd30b-333d-4d93-936a-da64e167f44c",
      "Name": "Redgate.Oracle.FilterPath",
      "Label": "Custom Filter Path (optional)",
      "HelpText": "By default, the filter.scpf will be used, if present for the deployment.  Provide a relative path to the filter file you wish to use. It will be the path relative to the schema folder provided.",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "21650183-f187-424a-bb62-2ade2805bbe7",
      "Name": "Redgate.Oracle.BehaviorOptions",
      "Label": "Behavior Options (optional)",
      "HelpText": "Specify the behavior options as listed out in the [documentation for Schema Compare for Oracle](https://documentation.red-gate.com/sco5/using-the-command-line/command-line-switches#Commandlineswitches-/behavior:%3Cvalue%3E).\n\nDefault is \"hdr\" (scriptheader, defineoff, and detectcolumnrenames)",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "a7404e1d-dc7a-4c2a-98a3-2e2298bc3763",
      "Name": "Redgate.Oracle.ExcludeOptions",
      "Label": "Exclude Options (optional)",
      "HelpText": "Specify the exclude options as listed out in the [documentation for Schema Compare for Oracle](https://documentation.red-gate.com/sco5/using-the-command-line/command-line-switches#Commandlineswitches-/exclude:%3Cbehavior%3E).\n\nDefault is no exclusions",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "6db5c28c-eb83-43d9-a839-904c8e66e83f",
      "Name": "Redgate.Oracle.ExcludeDependencies",
      "Label": "Exclude Dependencies",
      "HelpText": "Excludes dependent (referenced) objects from deployment.  Default is false.",
      "DefaultValue": "False",
      "DisplaySettings": {
        "Octopus.ControlType": "Checkbox"
      }
    },
    {
      "Id": "5de8b830-695b-458f-9774-9da89c712094",
      "Name": "Redgate.Oracle.IgnoreOptions",
      "Label": "Ignore Options (optional)",
      "HelpText": "Specify the ignore options as listed out in the [documentation for Schema Compare for Oracle](https://documentation.red-gate.com/sco5/using-the-command-line/command-line-switches#Commandlineswitches-/ignore:%3Cvalue%3E).  \n\nDefault is \"sdwqgva\" (slowdependencies, dependentobjects, whitespace, doublequotes, storage, sequencevalue, and mviewvalue)",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "75bad918-a431-4256-a5d6-94b4a79e3d13",
      "Name": "Redgate.Oracle.StorageOptions",
      "Label": "Storage Options (optional)",
      "HelpText": "Specify the storage options as listed out in the [documentation for Schema Compare for Oracle](https://documentation.red-gate.com/sco5/using-the-command-line/command-line-switches#Commandlineswitches-/storage:%3Cvalue%3E).\n\nThe default is \"none\"",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "dc806786-d26e-474b-bc14-7cc066c7a421",
      "Name": "Redgate.Oracle.IncludeIdentical",
      "Label": "Include Identical",
      "HelpText": "Include Identical options in the generated HTML report",
      "DefaultValue": "False",
      "DisplaySettings": {
        "Octopus.ControlType": "Checkbox"
      }
    }
  ],
  "Properties": {
    "Octopus.Action.Package.AutomaticallyRunConfigurationTransformationFiles": "True",
    "Octopus.Action.Package.AutomaticallyUpdateAppSettingsAndConnectionStrings": "True",
    "Octopus.Action.EnabledFeatures": "Octopus.Features.CustomScripts",
    "Octopus.Action.CustomScripts.PostDeploy.ps1": "$exportPath = $OctopusParameters[\"Redgate.Oracle.ExportPath\"]\n$server = $OctopusParameters[\"Redgate.Oracle.Server\"]\n$user = $OctopusParameters[\"Redgate.Oracle.Username\"]\n$password = $OctopusParameters[\"Redgate.Oracle.Password\"]\n$oracleTools = $OctopusParameters[\"Redgate.Oracle.InstallPath\"]\n$deploymentSchema = $OctopusParameters[\"Redgate.Oracle.DeploymentSchema\"]\n$sourceSchema = $OctopusParameters[\"Redgate.Oracle.SourceSchema\"]\n$packageInstallDirectory = $OctopusParameters[\"Octopus.Action.Package.InstallationDirectoryPath\"]\n$excludeOptions = $OctopusParameters[\"Redgate.Oracle.ExcludeOptions\"]\n$behaviorOptions = $OctopusParameters[\"Redgate.Oracle.BehaviorOptions\"]\n$ignoreOptions = $OctopusParameters[\"Redgate.Oracle.IgnoreOptions\"]\n$storageOptions = $OctopusParameters[\"Redgate.Oracle.StorageOptions\"]\n$excludeDependencies = $OctopusParameters[\"Redgate.Oracle.ExcludeDependencies\"]\n$filterPath = $OctopusParameters[\"Redgate.Oracle.FilterPath\"]\n$includeIdentical = $OctopusParameters[\"Redgate.Oracle.IncludeIdentical\"]\n\nWrite-Host \"Export Path: $exportPath\"\nWrite-Host \"Oracle Server: $server\"\nWrite-Host \"Oracle Username: $user\"\nWrite-Host \"Oracle Password not shown\"\nWrite-Host \"Oracle Source Schema: $sourceSchema\"\nWrite-Host \"Oracle Deployment Schema: $deploymentSchema\"\nWrite-Host \"Oracle Toolbelt Install Path: $oracleTools\"\nWrite-Host \"Package Install Directory: $packageInstallDirectory\"\nWrite-Host \"Filter Path: $filterPath\"\nWrite-Host \"Behavior Options: $behaviorOptions\"\nWrite-Host \"Exclude Options: $excludeOptions\"\nWrite-Host \"Exclude Dependencies: $excludeDependencies\"\nWrite-Host \"Ignore Options: $ignoreOptions\"\nWrite-Host \"Storage Options: $storageOptions\"\nWrite-Host \"Include Identical: $includeIdentical\"\n\n$sourceFolder = \"$packageInstallDirectory\\{$sourceSchema}\"\nWrite-Host \"Source Folder: $sourceFolder\"\n\n$maskedConnectionString = \"$user/*****@$server{$deploymentSchema}\"\n$unmaskedConnectionString = \"$user/$password@$server{$deploymentSchema}\"\nWrite-Host \"Creating a delta script by connecting to: $maskedConnectionString\"\n\n$oracleToolsSearchPath = \"$oracleTools\\**\\SCO.exe\"\n$scoexeOptions = Get-ChildItem -Path $oracleToolsSearchPath | Sort-Object [Version] -Descending\n\nif ($scoexeOptions -eq $null){\n    Write-Error \"Unable to find Oracle Schema Compare, please verify it is installed in the directory specified\"\n}\n \n$schemaCompareExe = $scoexeOptions[0]\nWrite-Host \"Running the exe $schemaCompareExe\"\n\n$deltaReportPath = \"$exportPath\\Changes.html\"\nWrite-Host \"Creating the delta report $deltaReportPath\"\n\n$changeScript = \"$exportPath\\Update.sql\"\nWrite-Host \"The change script is set to $changeScript\"\n\n$AllArgs = @(\n\t\"/source:`\"$sourceFolder`\"\", \n    \"/target:`\"$unmaskedConnectionString`\"\",\n    \"/scriptfile:`\"$changeScript`\"\",\n    \"/report:`\"$deltaReportPath`\"\", \n    \"/reporttype:Simple\")\n\nif ([string]::IsNullOrWhiteSpace($behaviorOptions) -eq $false){\n\tWrite-Host \"Behavior Options specified, adding them to the command line\"\n\t$AllArgs += \"/b:$behaviorOptions\"\n}\n\nif ([string]::IsNullOrWhiteSpace($excludeOptions) -eq $false){\n\tWrite-Host \"Exclude Options specified, adding them to the command line\"\n\t$AllArgs += \"/exc:$excludeOptions\"\n}\n\nif ([string]::IsNullOrWhiteSpace($ignoreOptions) -eq $false){\n\tWrite-Host \"Ignore Options specified, adding them to the command line\"\n\t$AllArgs += \"/i:$ignoreOptions\"\n}\n\nif ([string]::IsNullOrWhiteSpace($storageOptions) -eq $false){\n\tWrite-Host \"Storage Options specified, adding them to the command line\"\n\t$AllArgs += \"/g:$storageOptions\"\n}\n\nif ($excludeDependencies -eq \"True\"){\n\tWrite-Host \"Exclude Dependencies set to true, adding them to the command line\"\n\t$AllArgs += \"/excludedependencies\"\n}\n\nif ($includeIdentical -eq \"True\"){\n\tWrite-Host \"Include identical set to true, adding that to the command line\"\n    $AllArgs += \"/includeidentical\" \n}\n\nif ([string]::IsNullOrWhiteSpace($filterPath) -eq $false){\n\tWrite-Host \"Custom Filter Path specified, adding them to the command line\"\n\t$AllArgs += \"/f:`\"$sourceFolder\\$filterPath`\"\"\n}\n\n& \"$schemaCompareExe\" $AllArgs\n\n$successful = $false\n$upload = $false\nif ($lastExitCode -eq 61){\n\tWrite-Highlight \"Changes found, the delta script location is: $changeScript\"\n    Write-Highlight \"Uploading script and report as artifacts\"\n    \n\t$successful = $true\n    $upload = $true\n}\n\nif ($lastExitCode -eq 0){\n\tWrite-Highlight \"No changes were detected\"\n\t$successful = $true\n}\n\nSet-OctopusVariable -name \"OracleRedgateCreateReleaseChangesFound\" -value $upload\n\nif ($upload){\n  $environmentName = $OctopusParameters[\"Octopus.Environment.Name\"]\n  $artifactName = \"$environmentName\" + \"Changes.html\"\n  New-OctopusArtifact -Path \"$deltaReportPath\" -Name \"$artifactName\"\n  \n  $scriptArtifactName = \"$environmentName\" + \"Update.sql\"\n  New-OctopusArtifact -Path \"$changeScript\" -Name \"$scriptArtifactName\"    \n}\n\nSet-OctopusVariable -name \"DatabaseChangesFound\" -value $upload\n  \nif ($successful){  \n  exit 0\n}",
    "Octopus.Action.Package.PackageId": "#{Redgate.Oracle.PackageName}",
    "Octopus.Action.Package.FeedId": "#{Redgate.Oracle.PackageFeed}",
    "Octopus.Action.Package.DownloadOnTentacle": "False"
  },
  "Category": "Redgate",
  "HistoryUrl": "https://github.com/OctopusDeploy/Library/commits/master/step-templates//opt/buildagent/work/75443764cd38076d/step-templates/redgate-oracle-create-release.json",
  "Website": "/step-templates/0aa40fba-949c-4065-a438-010349c3fd0c",
  "Logo": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD9QTFRF9s3N7Z6e3U1N87+/+NjY0RIS2Tc3zgAA/O7u425u1SQk5Xp66Y2N/fPz76ys+eHh4F5e0AkJ/vj4/vz8////8g2GDwAABlRJREFUeNrsne2SpCoMhkEQ+RJQ+v6v9YDau+JO97a2IuxJdn7MVk3V+EzSQN6QiB7/iCEAARAAARAAARAAARAAARAAARAAARAAARAAAZAvrOeWUkSIwVprt7bwf2wIQYha3vuCQXpKjFbCNUzKoXtlQysZc05pQygvDmSkWMXnb9vuUwtAkjUKkzJAPKcEizcO+IBIOhycM94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xL3oDjlol42c87DfxKIiHd+KROWV3uKDkzjGaSmsRbExnAUGad6mJ0WAhDBBc5g0c5xMlc7tfXe5ut41/pH85gfpp+KzmYvPjdwxyEKaceWT9m4QJA93H66jq1c3g/hvenUlerlllJ1YvY2uVFqpDGQdXT556tpAkrVrfRW9OpDgkx9J6gNJLnQSWTFIcg3y12GlRpD1dWFvopTB2K1Xyk+JrjGcy36PnKwD5NnAJLChBSRW+0GGOBzTqdjbgywvJkPcAxJiX+koJlr+2UzMckCW8BEaE9rPbdN72hTvB5ladMTSohOf/liXJWW3gbTSOf26aWpnJm9yNlTGybbT3z88/yJ+nNTk6m2bscXVhudHpw4bfu4oFDc5m473fn4/+uMQLBx7MeaifIHuw0EqJYOMNo4aEZ+NGikUhCOs3K7hLyWBPMfxuCMCTCEgzwFJxwfW3A+yP4qKAuGxVyTOLT9riFh+kDGOBdFxhP+pg6lygng+DZ5hlww+ywDS8z2jc8oEsWje0eT1sw4vKytMn2S2500QZYLACFAAARAAARAAARAAKRDEujYrx+Auem1HfDtPRg6pd4mau47xHqlcThn2vqVnbz7CRYZEpJNi93DL3YmVR/rqN/VIceBNdgdSXW+Nuw5lYPjQhfWD4gM37oIQG2Sj7EHJ/6iK4h9Iu1NjbJBOk+PNA9/IQZwSdZIaNzBlKP+m+vKVrjUFAQmeOS5rxTdvBk98P9f1FKWxR0QLx3Yq7sM8+hSd04tykvbrH2MsIJipkPb39VXG2xyEWj4+zrIz1fhlufF+nCYf6blvaepimr/VU/dSf2I5OF/Fyj8yGbzpGEAABEAABEAABEAABEAABEAABEAABEAA5H8F8p8AAwD2WseknbBRCwAAAABJRU5ErkJggg==",
  "$Meta": {
    "Type": "ActionTemplate"
  }
}

History

Page updated on Tuesday, March 26, 2019