diff --git a/README.md b/README.md index d66adc28cf..180506c4d6 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,14 @@ See the [Octopus style guide](https://www.octopus.design/932c0f1a9/p/26f741-writ * Sign the [Contribution License Agreement (CLA)](https://cla-assistant.io/OctopusDeploy/docs) * We'll review your PR and accept it or suggest changes +### Default values + +When you need to use an example value in docs, please use the below: + +- Octopus URL: `https://your-octopus-url` +- Octopus API key: `API-YOUR-KEY` +- Snapshot name: `Snapshot XXXXX` + ## Required checks When you raise a pull request, the following checks will take place: diff --git a/dictionary-octopus.txt b/dictionary-octopus.txt index 752c48ea98..6b7801b0ba 100644 --- a/dictionary-octopus.txt +++ b/dictionary-octopus.txt @@ -1,10 +1,12 @@ -ABCXYZ accounttest +actionid +actiontemplates advfirewall ALLUSERSPROFILE anglin Anglin apikey +apikeys APPNAME approot appsettings @@ -26,6 +28,7 @@ Bento bootstrap bootstrapped bootstrapper +bufio Ceph changeit checkservices @@ -56,12 +59,16 @@ cutover dacpac Datacenter datetime +dateutil deallocate deallocated dearmor decryptable +defaultpackageversion deployers deploymentannotation +deploymentprocess +deploymentprocesses deployto DESTKEY DIND @@ -74,16 +81,22 @@ dpkg dryrun Dspring DWORD +elif Elyton emptytitle +environmentids expressjs +externalgroups +externalusers fanout Fargate feedcred Feedz.io +fieldnames fieldset Fifield figcaption +filedata filestore FIPS fontawesome @@ -99,6 +112,8 @@ groff Groupsand gruntfile gulpfile +hasattr +Hashtable hastscript healthcheck Helloworld @@ -111,18 +126,24 @@ HSTS HTTPAPI hyperthread hyperthreading +icontains +IGNORECASE IMDS +includesystem inetmgr inetsrv inkey INSTALLLOCATION internalcustomer +ioutil ipify +isdir Istio istioctl itemprop itemscope itemtype +Itoa ITSM jjones jsondecode @@ -137,15 +158,19 @@ kustomize lastmod latestdeployments libicu +libraryvariablesets lifecycles linecap linejoin linkerd Linq Liquibase +lstrip ltsc +machinepolicies maintenanceconfiguration majeure +makedirs mattc maxage mdast @@ -166,6 +191,7 @@ navigationid NETBIOS Netscaler netsh +netstandard newcert newguid NEWID @@ -179,13 +205,17 @@ noopener NOPASSWD noreferrer nosniff +notcontains +notlike NTLM nupkg NVARCHAR +O_WRONLY Obtainingthe Octo octoadmin octobak +Octodiff octofxjs octoha octojs @@ -210,11 +240,14 @@ oldthumbprint oneshot onlylogs openon +outfile +outputformat OWASP packageversion passout pemstore petclinic +Petlife petshop PKCE pkcs @@ -225,8 +258,12 @@ prerenderingchange printfn Println PROGRAMFILES +projectgroup +projectgroups +projecttriggers proxied proxying +pscustomobject pwsh pycryptodome querystring @@ -250,12 +287,19 @@ rolename ROOTDIR rootelement RSASSA +rstrip runbook +runbookprocesses +runbookruns runbooks +runbooksnapshot +runbooksnapshots +runbooksnapshottemplate RUNMANAGERONEXIT runtimes SAMEORIGIN Schannel +scopeduserroles secureclientcertificate servedby servername @@ -272,6 +316,7 @@ snapshotting sourcedata SOURCEKEY speculationrules +Sprintf sqlcmd SQLEXPRESS sqlvolume @@ -282,6 +327,8 @@ SSRS statefulset statefulsets sthumb +strconv +struct stylesheet subcontext sunsetting @@ -290,8 +337,10 @@ systemprofile tabindex tabpanel tagset +tagsets templateid templating +tenanttag tenanttype Tentacleinstallation Tentacleinstallers @@ -309,12 +358,17 @@ tsconfigs typeof umoci undeployed +Unmarshal upgradeavailability upgradelog upgrader +urllib urlset useronboarding +userroles +utcnow variablename +variableset vhdx Voltron WCAG @@ -322,6 +376,8 @@ webapps WEBDEPLOY webfonts webserver +websocket +websockets WEBSVR WFLYUT Wildfly @@ -329,9 +385,10 @@ WIXUI workerpool workerpools workertools +writeheader +writerow xlarge xmark xvzf xxlarge -YOURAPIKEY -youtu +youtu \ No newline at end of file diff --git a/src/pages/docs/administration/high-availability/configure/auto-scaling-high-availability-nodes.md b/src/pages/docs/administration/high-availability/configure/auto-scaling-high-availability-nodes.md index 165abad78d..bd31d30901 100644 --- a/src/pages/docs/administration/high-availability/configure/auto-scaling-high-availability-nodes.md +++ b/src/pages/docs/administration/high-availability/configure/auto-scaling-high-availability-nodes.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Auto Scaling High Availability Nodes description: What to consider if you want to use auto-scaling technology to scale out your Octopus Server High Availability Cluster automatically. navOrder: 50 @@ -15,7 +15,7 @@ At this time, we don't recommend auto-scaling if you are using polling tentacles ## Adding new nodes with Scale-out events -A scale-out event is when auto-scaling technology decides it is time to create a new virtual machine via a schedule or a metric-based trigger. Octopus High Availablity is designed for new nodes to come online at random intervals. When you create a new node, an entry is added to the `OctopusServerNodes` table with a default task cap of `5`. That node will start picking up tasks to process within 60 seconds. A scale-out event is treated no differently than a person manually creating a VM and configuring as a new node via the UI. +A scale-out event is when auto-scaling technology decides it is time to create a new virtual machine via a schedule or a metric-based trigger. Octopus High Availability is designed for new nodes to come online at random intervals. When you create a new node, an entry is added to the `OctopusServerNodes` table with a default task cap of `5`. That node will start picking up tasks to process within 60 seconds. A scale-out event is treated no differently than a person manually creating a VM and configuring as a new node via the UI. The sections below will walk you through _how_ to automate adding new nodes via a script. @@ -49,11 +49,11 @@ $msiFileName = "Octopus.$versionToDownload-x64.msi" $downloadUrl = "https://download.octopusdeploy.com/octopus/$msiFileName" $downloadFileName = "$downloadLocation\$msiFileName" -## Bits transfer is much faster than invoke-restmethod or invoke-webrequest for downloading files +## Bits transfer is much faster than Invoke-RestMethod or Invoke-WebRequest for downloading files Write-Output "Downloading $downloadUrl to $outfile" Start-BitsTransfer -source $downloadUrl -destination $outfile -$msiExitCode = (Start-Process -FilePath "msiexec.exe" -ArgumentList "/i $downloadFileNam /quiet" -Wait -Passthru).ExitCode +$msiExitCode = (Start-Process -FilePath "msiexec.exe" -ArgumentList "/i $downloadFileNam /quiet" -Wait -PassThru).ExitCode Write-Output "Server MSI installer returned exit code $msiExitCode" ``` @@ -94,13 +94,13 @@ $masterKey = "YOUR MASTER KEY" $databaseServer = "YOUR DATABASE SERVER" $databaseName = "YOUR DATABASE NAME" $userName = "YOUR DOMAIN SERVICE ACCOUNT USER NAME" -$password = "YOUR DOMAIN SERVCIE ACCOUNT PASSWORD" +$password = "YOUR DOMAIN SERVICE ACCOUNT PASSWORD" $taskCapSize = "5" ##set this to 0 for UI-only nodes! ## Add your network mapping script here! & "C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" create-instance --instance "Default" --config "C:\Octopus\OctopusServer.config" -& "C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" database --instance "Default" --masterKey "$masterkey" --connectionString "Data Source=$databaseserver;Initial Catalog=$databaseName;Integrated Security=True;" +& "C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" database --instance "Default" --masterKey "$masterKey" --connectionString "Data Source=$databaseServer;Initial Catalog=$databaseName;Integrated Security=True;" & "C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" configure --instance "Default" --webForceSSL "False" --webListenPrefixes "http://localhost:80/" --commsListenPort "10943" & "C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" service --instance "Default" --stop & "C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" service --instance "Default" --user "$userName" --password "$password" --install --reconfigure --start @@ -123,7 +123,7 @@ $taskCapSize = "5" ##set this to 0 for UI-only nodes! ## Add your network mapping script here! & "C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" create-instance --instance "Default" --config "C:\Octopus\OctopusServer.config" -& "C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" database --instance "Default" --masterKey "$masterkey" --connectionString "Data Source=$databaseServer;Initial Catalog=$databaseName;Integrated Security=False;User ID=$userName;Password=$password" +& "C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" database --instance "Default" --masterKey "$masterKey" --connectionString "Data Source=$databaseServer;Initial Catalog=$databaseName;Integrated Security=False;User ID=$userName;Password=$password" & "C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" configure --instance "Default" --webForceSSL "False" --webListenPrefixes "http://localhost:80/" --commsListenPort "10943" & "C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" service --instance "Default" --stop & "C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe" service --instance "Default" --user "$userName" --password "$password" --install --reconfigure --start @@ -226,8 +226,8 @@ The user required to run this script will need `Administrator` rights to your cl ::: ```powershell -$octopusUrl = "URL of your instances" # e.g. https://samples.octopus.app -$octopusApiKey = "YOUR API KEY" +$octopusUrl = "https://your-octopus-url" +$octopusApiKey = "API-YOUR-KEY" $nodeName = "Name of node to delete" function Write-OctopusVerbose @@ -303,7 +303,7 @@ function Invoke-OctopusApi return Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -Body $body -ContentType 'application/json; charset=utf-8' } - Write-OctopusVerbose "No data to post or put, calling bog standard invoke-restmethod for $url" + Write-OctopusVerbose "No data to post or put, calling bog standard Invoke-RestMethod for $url" $result = Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -ContentType 'application/json; charset=utf-8' return $result diff --git a/src/pages/docs/administration/reporting/report-on-deployments-excel-template.md b/src/pages/docs/administration/reporting/report-on-deployments-excel-template.md index 321b8ddeff..a35dc4ae64 100644 --- a/src/pages/docs/administration/reporting/report-on-deployments-excel-template.md +++ b/src/pages/docs/administration/reporting/report-on-deployments-excel-template.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Octopus reporting with an excel template description: Octopus reporting with an excel template navOrder: 100 @@ -13,7 +13,7 @@ To help you get started, we provide a sample Excel spreadsheet that you can conn ![](/docs/administration/reporting/images/3278354.png) ::: -## Getting started {#Reporting-Gettingstarted} +## Getting started The fastest way to get started is to use our Excel spreadsheet template. The spreadsheet uses Pivot Tables and Pivot Charts to summarize the data. You can use it as a starting point, and then modify or adapt it to suit your needs. @@ -41,7 +41,7 @@ To change the source of the data: ![](/docs/administration/reporting/images/3278360.png) -## Refreshing the data {#Reporting-Refreshingthedata} +## Refreshing the data Once you have set up your connection, you can refresh the data from the source whenever you like. If you make your own customizations to the spreadsheet, you can save them, and simply refresh the data in the sheet whenever you like. @@ -49,7 +49,7 @@ Once you have set up your connection, you can refresh the data from the source w ![](/docs/administration/reporting/images/3278361.png) ::: -## Using the XML feed {#Reporting-UsingtheXMLFeed} +## Using the XML feed The best way to consume reporting data from Octopus is using the XML feed. The feed is always available at: @@ -63,7 +63,7 @@ Where: For example: `https://demo.octopus.app/api/reporting/deployments/xml?apikey=API-GUEST` -`https://your.octopus.app/api/reporting/deployments/xml?apikey=API-1234567891234567891234567` +`https://your-octopus-url/api/reporting/deployments/xml?apikey=API-1234567891234567891234567` The XML feed can be consumed programmatically, or via Excel or [Microsoft PowerBI](https://powerbi.microsoft.com/). We have a blog on how to do this using [PowerBI](https://octopus.com/blog/powerbi-report-for-octopus-deploy) diff --git a/src/pages/docs/administration/reporting/report-on-deployments-using-excel.md b/src/pages/docs/administration/reporting/report-on-deployments-using-excel.md index bc1e3f4657..8a82adfbd4 100644 --- a/src/pages/docs/administration/reporting/report-on-deployments-using-excel.md +++ b/src/pages/docs/administration/reporting/report-on-deployments-using-excel.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Report on deployments using Excel & XML description: How to report on deployments using Excel & XML navOrder: 10 @@ -23,14 +23,14 @@ At a high-level, the steps are: ![](/docs/administration/reporting/images/3278122.png) ::: -## Export all deployments to an XML file {#ReportondeploymentsusingExcel-ExportalldeploymentstoanXMLfile} +## Export all deployments to an XML file Before we can report on the data using Excel, we need to export it in a format that Excel can import. The easiest way to do this is using an XML file. As of 2.5.10, the Octopus CLI can be used to export deployments to an XML file. The command looks like this: ```bash -octo dump-deployments --server http://your-octopus --apiKey API-YOURAPIKEY1234 --filePath=Deployments.xml +octo dump-deployments --server https://your-octopus-url --apiKey API-YOUR-KEY --filePath=Deployments.xml ``` :::div{.success} @@ -80,7 +80,7 @@ The command will produce an XML file with contents similar to the following: This file is now ready to be imported into Excel. -## Import the XML file in Excel {#ReportondeploymentsusingExcel-ImporttheXMLfileinExcel} +## Import the XML file in Excel Now that we have an XML file containing our deployments, we can import it into Microsoft Excel. In this example we are using Excel 2013. @@ -94,7 +94,7 @@ Now that we have an XML file containing our deployments, we can import it into M ![](/docs/administration/reporting/images/3278131.png) -## Report on the data using a pivot table {#ReportondeploymentsusingExcel-Reportonthedatausingapivottable} +## Report on the data using a pivot table It's easy to turn the table of deployments into a pivot table for reporting. diff --git a/src/pages/docs/deployments/node-js/node-on-linux.md b/src/pages/docs/deployments/node-js/node-on-linux.md index e6d3332523..898bee5ed7 100644 --- a/src/pages/docs/deployments/node-js/node-on-linux.md +++ b/src/pages/docs/deployments/node-js/node-on-linux.md @@ -150,7 +150,7 @@ gulp.task('bump', function(){ gulp.task('publish', ['bump', 'build'], function () { return gulp.src(['**/*', '!bin{,/**}', '!src{,/**}', '!gulpfile.js']) .pipe(octo.pack()) - .pipe(octo.push({apiKey: 'API-ABCXYZ', host: 'http://10.0.0.134'})); + .pipe(octo.push({apiKey: 'API-YOUR-KEY', host: 'http://10.0.0.134'})); }); ``` @@ -188,7 +188,7 @@ Modify the **gruntfile.js** file to add the following grunt tasks. Substitute th grunt.initConfig({ ... "octo-push": { - options: { host: 'http://10.0.0.134', apiKey: 'API-ABCXYZ' }, + options: { host: 'http://10.0.0.134', apiKey: 'API-YOUR-KEY' }, src: ['./bin/**/*'] }, "octo-pack": { diff --git a/src/pages/docs/deployments/patterns/elastic-and-transient-environments/immutable-infrastructure.md b/src/pages/docs/deployments/patterns/elastic-and-transient-environments/immutable-infrastructure.md index af94972a56..7619f73583 100644 --- a/src/pages/docs/deployments/patterns/elastic-and-transient-environments/immutable-infrastructure.md +++ b/src/pages/docs/deployments/patterns/elastic-and-transient-environments/immutable-infrastructure.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2024-05-01 +modDate: 2024-06-25 title: Immutable Infrastructure description: This guide covers deploying to immutable infrastructure where a new version of the infrastructure is provisioned and the old infrastructure is terminated. navOrder: 4 @@ -101,8 +101,8 @@ Wouldn't it be amazing if a developer checked in some changes to **Hello World** ```powershell Add-Type -Path 'Octopus.Client.dll' -$octopusURI = "http://your-octopus" -$apiKey = "API-ABC123" +$octopusURI = "https://your-octopus-url" +$apiKey = "API-YOUR-KEY" $endpoint = New-Object Octopus.Client.OctopusServerEndpoint $octopusURI, $apiKey $repository = New-Object Octopus.Client.OctopusRepository $endpoint diff --git a/src/pages/docs/deployments/patterns/elastic-and-transient-environments/keeping-deployment-targets-up-to-date.md b/src/pages/docs/deployments/patterns/elastic-and-transient-environments/keeping-deployment-targets-up-to-date.md index 00545e4966..507e4979ea 100644 --- a/src/pages/docs/deployments/patterns/elastic-and-transient-environments/keeping-deployment-targets-up-to-date.md +++ b/src/pages/docs/deployments/patterns/elastic-and-transient-environments/keeping-deployment-targets-up-to-date.md @@ -64,8 +64,8 @@ Automatic deployments attempts to calculate the release to use for a project and **Octopus CLI** ```bash -octo create-autodeployoverride --server http://octopus/ --apiKey API-ABCDEF123456 --project HelloWorld --environment Test -version 1.3.0 -octo delete-autodeployoverride --server http://octopus/ --apiKey API-ABCDEF123456 --project HelloWorld --environment Test +octo create-autodeployoverride --server https://your-octopus-url --apiKey API-YOUR-KEY --project HelloWorld --environment Test -version 1.3.0 +octo delete-autodeployoverride --server https://your-octopus-url --apiKey API-YOUR-KEY --project HelloWorld --environment Test ``` **Octopus.Client** @@ -73,8 +73,8 @@ octo delete-autodeployoverride --server http://octopus/ --apiKey API-ABCDEF12345 ```powershell Add-Type -Path 'Octopus.Client.dll' -$octopusURI = 'http://octopus' -$apiKey = "API-ABCDEF123456" +$octopusURI = 'https://your-octopus-url' +$apiKey = 'API-YOUR-KEY' $endpoint = New-Object Octopus.Client.OctopusServerEndpoint $octopusURI, $apiKey $repository = New-Object Octopus.Client.OctopusRepository $endpoint @@ -96,7 +96,7 @@ Octopus will attempt to automatically deploy the current releases for the enviro Troubleshoot automatic deployment by viewing the auto deploy logs from the diagnostics page in the configuration section or viewing the [Audit log](/docs/security/users-and-teams/auditing). :::div{.success} -**Why isn't my trigger working?** +**Why isn't my trigger working?** The verbose logs usually contain the reason why a project trigger didn't take any action. For example: `Auto-deploy: Machine 'Local' does not need to run release '2.6.6' for project 'My Project' and tenant because it already exists on the machine or is pending deployment.` diff --git a/src/pages/docs/infrastructure/deployment-targets/kubernetes/kubernetes-api/index.md b/src/pages/docs/infrastructure/deployment-targets/kubernetes/kubernetes-api/index.md index 5cf54035bd..74d021dd3f 100644 --- a/src/pages/docs/infrastructure/deployment-targets/kubernetes/kubernetes-api/index.md +++ b/src/pages/docs/infrastructure/deployment-targets/kubernetes/kubernetes-api/index.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2024-05-09 +modDate: 2024-06-25 title: Kubernetes API description: How to configure a Kubernetes cluster as a deployment target in Octopus navOrder: 20 @@ -387,7 +387,7 @@ exit 0 ### API calls failing -If you are finding that certain API calls are failing, for example `https://your.octopus.app/api/users/Users-1/apikeys?take=2147483647`, it's possible that your WAF is blocking the traffic. To confirm this you should investigate your WAF logs to determine why the API call is being blocked and make the necessary adjustments to your WAF rules. +If you are finding that certain API calls are failing, for example `https://your-octopus-url/api/users/Users-1/apikeys?take=2147483647`, it's possible that your WAF is blocking the traffic. To confirm this you should investigate your WAF logs to determine why the API call is being blocked and make the necessary adjustments to your WAF rules. ## Learn more diff --git a/src/pages/docs/infrastructure/deployment-targets/tentacle/polling-tentacles-over-port-443.md b/src/pages/docs/infrastructure/deployment-targets/tentacle/polling-tentacles-over-port-443.md index 65c622f76a..d32ac58f00 100644 --- a/src/pages/docs/infrastructure/deployment-targets/tentacle/polling-tentacles-over-port-443.md +++ b/src/pages/docs/infrastructure/deployment-targets/tentacle/polling-tentacles-over-port-443.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-06-23 +modDate: 2024-06-25 title: Polling Tentacles over Standard HTTPS Port description: Octopus Polling Tentacles open a connection to the Octopus Server over port 443 to ask the Server if there is any work to do. navOrder: 50 @@ -29,7 +29,7 @@ The setup of a Polling Tentacle for an [Octopus Cloud](/docs/octopus-cloud) inst ### Registering a new Tentacle ```powershell -.\Tentacle register-with --instance MyInstance --server "https://.octopus.app" --server-comms-address "https://polling..octopus.app" --comms-style TentacleActive --apiKey "API-YOURKEY" --environment "Test" --role "Web" +.\Tentacle register-with --instance MyInstance --server "https://.octopus.app" --server-comms-address "https://polling..octopus.app" --comms-style TentacleActive --apiKey "API-YOUR-KEY" --environment "Test" --role "Web" ``` ### Changing an existing Tentacle @@ -37,20 +37,20 @@ The setup of a Polling Tentacle for an [Octopus Cloud](/docs/octopus-cloud) inst ```powershell .\Tentacle service --instance MyInstance --stop .\Tentacle configure --reset-trust -.\Tentacle register-with --instance MyInstance --server "https://.octopus.app" --server-comms-address "https://polling..octopus.app" --comms-style TentacleActive --apiKey "API-YOURKEY" --environment "Test" --role "Web" +.\Tentacle register-with --instance MyInstance --server "https://.octopus.app" --server-comms-address "https://polling..octopus.app" --comms-style TentacleActive --apiKey "API-YOUR-KEY" --environment "Test" --role "Web" .\Tentacle service --instance MyInstance --start ``` ### Registering a new Worker ```powershell -.\Tentacle register-worker --instance MyInstance --server "https://.octopus.app" --server-comms-address "https://polling..octopus.app" --comms-style TentacleActive --apiKey "API-YOURKEY" --workerpool MyWorkerPool +.\Tentacle register-worker --instance MyInstance --server "https://.octopus.app" --server-comms-address "https://polling..octopus.app" --comms-style TentacleActive --apiKey "API-YOUR-KEY" --workerpool MyWorkerPool ``` ### Changing an existing Worker ```powershell .\Tentacle service --instance MyInstance --stop .\Tentacle configure --reset-trust -.\Tentacle register-worker --instance MyInstance --server "https://.octopus.app" --server-comms-address "https://polling..octopus.app" --comms-style TentacleActive --apiKey "API-YOURKEY" --workerpool MyWorkerPool +.\Tentacle register-worker --instance MyInstance --server "https://.octopus.app" --server-comms-address "https://polling..octopus.app" --comms-style TentacleActive --apiKey "API-YOUR-KEY" --workerpool MyWorkerPool .\Tentacle service --instance MyInstance --start ``` @@ -81,7 +81,7 @@ The setup of a Polling Tentacle for your self-hosted instance over port 443 is t ### Registering a new Tentacle ```powershell -.\Tentacle register-with --instance MyInstance --server "https://" --server-comms-address "https://" --comms-style TentacleActive --apiKey "API-YOURKEY" --environment "Test" --role "Web" +.\Tentacle register-with --instance MyInstance --server "https://" --server-comms-address "https://" --comms-style TentacleActive --apiKey "API-YOUR-KEY" --environment "Test" --role "Web" ``` ### Changing an existing Tentacle @@ -89,20 +89,20 @@ The setup of a Polling Tentacle for your self-hosted instance over port 443 is t ```powershell .\Tentacle service --instance MyInstance --stop .\Tentacle configure --reset-trust -.\Tentacle register-with --instance MyInstance --server "https://" --server-comms-address "https://" --comms-style TentacleActive --apiKey "API-YOURKEY" --environment "Test" --role "Web" +.\Tentacle register-with --instance MyInstance --server "https://" --server-comms-address "https://" --comms-style TentacleActive --apiKey "API-YOUR-KEY" --environment "Test" --role "Web" .\Tentacle service --instance MyInstance --start ``` ### Registering a new Worker ```powershell -.\Tentacle register-worker --instance MyInstance --server "https://" --server-comms-address "https://" --comms-style TentacleActive --apiKey "API-YOURKEY" --workerpool MyWorkerPool +.\Tentacle register-worker --instance MyInstance --server "https://" --server-comms-address "https://" --comms-style TentacleActive --apiKey "API-YOUR-KEY" --workerpool MyWorkerPool ``` ### Changing an existing Worker ```powershell .\Tentacle service --instance MyInstance --stop .\Tentacle configure --reset-trust -.\Tentacle register-worker --instance MyInstance --server "https://" --server-comms-address "https://" --comms-style TentacleActive --apiKey "API-YOURKEY" --workerpool MyWorkerPool +.\Tentacle register-worker --instance MyInstance --server "https://" --server-comms-address "https://" --comms-style TentacleActive --apiKey "API-YOUR-KEY" --workerpool MyWorkerPool .\Tentacle service --instance MyInstance --start ``` diff --git a/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/automating-tentacle-installation.mdx b/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/automating-tentacle-installation.mdx index 476790465a..4622a12ea8 100644 --- a/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/automating-tentacle-installation.mdx +++ b/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/automating-tentacle-installation.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Automating Tentacle installation description: Information on how to install and configure an Octopus Tentacle in a fully automated way from the command line. navOrder: 60 @@ -84,8 +84,8 @@ You can also register a Tentacle with the Octopus Server after it has been insta Add-Type -Path 'Newtonsoft.Json.dll' Add-Type -Path 'Octopus.Client.dll' -$octopusApiKey = 'API-ABCXYZ' -$octopusURI = 'http://YOUR_OCTOPUS' +$octopusURI = 'https://your-octopus-url' +$octopusApiKey = 'API-YOUR-KEY' $endpoint = new-object Octopus.Client.OctopusServerEndpoint $octopusURI, $octopusApiKey $repository = new-object Octopus.Client.OctopusRepository $endpoint diff --git a/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/azure-virtual-machines/configuration-structure.mdx b/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/azure-virtual-machines/configuration-structure.mdx index 6f51f8afa6..2629c8baa0 100644 --- a/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/azure-virtual-machines/configuration-structure.mdx +++ b/src/pages/docs/infrastructure/deployment-targets/tentacle/windows/azure-virtual-machines/configuration-structure.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Tentacle VM extension configuration structure description: Detailed file format information for the configuration files required for the Azure Tentacle VM Extension navOrder: 7 @@ -69,7 +69,7 @@ The schema for the private configuration file is: ```json { - "ApiKey": "API-1234567890ABCDEF1234567890" + "ApiKey": "API-YOUR-KEY" } ``` diff --git a/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-azure-ad-to-users.mdx b/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-azure-ad-to-users.mdx index e4775ab8b1..8572002d1f 100644 --- a/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-azure-ad-to-users.mdx +++ b/src/pages/docs/octopus-rest-api/examples/users-and-teams/add-azure-ad-to-users.mdx @@ -1,11 +1,11 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Add Azure Active Directory login to users description: An example script to add Azure Active Directory login details to Octopus user accounts. --- -import AddAzureADIdentityToUsersScripts from 'src/shared-content/scripts/add-azuread-identity-to-users-scripts.include.md'; +import AddAzureADIdentityToUsersScripts from 'src/shared-content/scripts/add-azure-ad-identity-to-users-scripts.include.md'; Octopus supports a number of external [authentication providers](/docs/security/authentication/), including [Azure Active Directory Authentication](/docs/security/authentication/azure-ad-authentication). If you want to use Azure Active Directory to authenticate but re-use existing Octopus user accounts, the easiest way is to add an Azure AD login: @@ -34,13 +34,13 @@ Provide values for: ### Add Azure AD identities to single user ```powershell PowerShell (REST API) -AddAzureADLogins -OctopusURL "https://your.octopus.app/" -OctopusAPIKey "API-KEY" -OctopusUsername "OctoUser" -AzureEmailAddress "octouser@exampledomain.com" -AzureDisplayName "Octo User" -ContinueOnError $False -Force $False -WhatIf $False -DebugLogging $False +AddAzureADLogins -OctopusURL "https://your-octopus-url/" -OctopusAPIKey "API-YOUR-KEY" -OctopusUsername "OctoUser" -AzureEmailAddress "octouser@exampledomain.com" -AzureDisplayName "Octo User" -ContinueOnError $False -Force $False -WhatIf $False -DebugLogging $False ``` ### Add Azure AD identities for multiple users from CSV file ```powershell PowerShell (REST API) -AddAzureADLogins -OctopusURL "https://your.octopus.app/" -OctopusAPIKey "API-KEY" -Path "/path/to/user_azure_ad_logins.csv" -ContinueOnError $False -Force $False -WhatIf $False -DebugLogging $False +AddAzureADLogins -OctopusURL "https://your-octopus-url/" -OctopusAPIKey "API-YOUR-KEY" -Path "/path/to/user_azure_ad_logins.csv" -ContinueOnError $False -Force $False -WhatIf $False -DebugLogging $False ``` ### Example CSV file diff --git a/src/pages/docs/octopus-rest-api/migration-api/index.md b/src/pages/docs/octopus-rest-api/migration-api/index.md index b7259bd766..a54d440fb7 100644 --- a/src/pages/docs/octopus-rest-api/migration-api/index.md +++ b/src/pages/docs/octopus-rest-api/migration-api/index.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Migration API description: Octopus includes a migration API that provides the ability to back-up and restore parts of an Octopus Deploy instance remotely. navOrder: 90 @@ -58,7 +58,7 @@ Partial Export API parameters: | IncludeTaskLogs | [Optional] Include the task log folder as part of the export | | EncryptPackage | [Optional] Encrypt the contents of your migration package _(Uses the `Password` as a shared key so this can be decrypted by your destination server)_ | | DestinationApiKey=VALUE | [Optional] The API key of your destination server _(Where you'll be importing this exported package)_ | -| DestinationPackageFeed=VALUE | [Optional] The destination Octopus Server base URL _(E.g. https://myOctopusServer.com)_ | +| DestinationPackageFeed=VALUE | [Optional] The destination Octopus Server base URL _(e.g. https://your-octopus-url)_ | | SuccessCallbackUri=VALUE | [Optional] A webhook URL you can add if you wish to be notified on successful completion of the migration task _(Your Octopus Server will call this URL using a GET request, appending the `packageId` and `packageVersion` to the URL as querystring parameters)_ | | FailureCallbackUri=VALUE | [Optional] A webhook URL you can add if you wish to be notified on failure of the migration task _(Your Octopus Server will call this URL using a GET request)_ | | TaskId | [Response only] This will be populated with the TaskId that gets queued for this migration | @@ -96,16 +96,16 @@ Request Method: POST Request URL: https://YOUR_SOURCE_OCTOPUS_SERVER/api/migrations/partialexport Request Headers: - Content-Type: application/json -- X-Octopus-ApiKey: API-YOUR_SOURCE_API_KEY +- X-Octopus-ApiKey: API-YOUR-SOURCE-KEY Request Body: { "PackageId": "MyAwesomeOctopusMigration", "PackageVersion": "1.0.0", "Password": "Demo1234", - "Projects": ["Rick Project", "Morty Project"], + "Projects": ["First Project", "Second Project"], "EncryptPackage": true, "IncludeTaskLogs": true, - "DestinationApiKey": "API-YOUR_DESTINATION_API_KEY", + "DestinationApiKey": "API-YOUR-DESTINATION-KEY", "DestinationPackageFeed": "https://YOUR_DESTINATION_OCTOPUS_SERVER" } ``` @@ -117,7 +117,7 @@ Request Method: POST Request URL: https://YOUR_DESTINATION_OCTOPUS_SERVER/api/migrations/import Request Headers: - Content-Type: application/json -- X-Octopus-ApiKey: API-YOUR_DESTINATION_OCTOPUS_SERVER +- X-Octopus-ApiKey: API-YOUR-DESTINATION-KEY Request Body: { "PackageId": "MyAwesomeOctopusMigration", @@ -147,9 +147,9 @@ Here's an example showing you how that might look, performing a `partial-export` Add-Type -Path 'YOUR_LOCAL_PATH\Octopus.Client.dll' $sourceOctopusURI = 'https://SOURCE_OCTOPUS_SERVER' -$sourceApikey = 'API-SOURCE_API_KEY' +$sourceApikey = 'API-YOUR-SOURCE-KEY' $destinationOctopusURI = 'https://DESTINATION_OCTOPUS_SERVER' -$destinationApikey = 'API-DESTINATION_API_KEY' +$destinationApikey = 'API-YOUR-DESTINATION-KEY' # Spaces related $sourceSpaceId = 'Spaces-1' @@ -158,7 +158,7 @@ $destinationPackageFeedSpaceId = 'Spaces-1' $migrationPackageId = 'MyAwesomeOctopusMigration' $migrationPackageVersion = '1.0.0' $migrationPassword = 'Demo1234' -$isDryRun = $true # Only set this to false when you've reviewed the dry run and are happy to proceed with the migration for realz. +$isDryRun = $true # Only set this to false when you've reviewed the dry run and are happy to proceed with the migration for real. $sourceEndpoint = New-Object Octopus.Client.OctopusServerEndpoint $sourceOctopusURI,$sourceApikey $sourceRepository = New-Object Octopus.Client.OctopusRepository $sourceEndpoint @@ -167,7 +167,7 @@ $migrationExportResource = new-object Octopus.Client.Model.Migrations.MigrationP $migrationExportResource.PackageId = $migrationPackageId $migrationExportResource.PackageVersion = $migrationPackageVersion $migrationExportResource.Password = $migrationPassword -$migrationExportResource.Projects = @('Rick Project', 'Morty Project') +$migrationExportResource.Projects = @('First Project', 'Second Project') $migrationExportResource.IgnoreCertificates = $false $migrationExportResource.IgnoreMachines = $false $migrationExportResource.IgnoreDeployments = $false diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/create-autodeployoverride.md b/src/pages/docs/octopus-rest-api/octopus-cli/create-autodeployoverride.md index 4381db7885..040bfcad09 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/create-autodeployoverride.md +++ b/src/pages/docs/octopus-rest-api/octopus-cli/create-autodeployoverride.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Create auto deployment override description: Using the Octopus CLI to create automatic deployment release overrides. navOrder: 100 @@ -87,28 +87,28 @@ Common options: fatal. Defaults to 'debug'. ``` -## Basic example {#Creatingautodeployoverrides-Basicexample} +## Basic example The following creates an automatic deployment release override for version 1.3.0 of the project *HelloWorld* to the environment Development: ```bash -octo create-autodeployoverride --project HelloWorld --environment Development --version 1.3.0 --server http://octopus/ --apikey API-ABCDEF123456 +octo create-autodeployoverride --project HelloWorld --environment Development --version 1.3.0 --server https://your-octopus-url --apikey API-YOUR-KEY ``` -## Tenanted example (by name) {#Creatingautodeployoverrides-Tenantedexample(byname)} +## Tenanted example (by name) The following creates an automatic deployment release override for version 1.3.0 of the project *HelloWorld* to the environment Development for the tenant *Acme*: ```bash -octo create-autodeployoverride --project HelloWorld --environment Development --tenant Acme --version 1.3.0 --server http://octopus/ --apikey API-ABCDEF123456 +octo create-autodeployoverride --project HelloWorld --environment Development --tenant Acme --version 1.3.0 --server https://your-octopus-url --apikey API-YOUR-KEY ``` -## Tenanted example (by tags) {#Creatingautodeployoverrides-Tenantedexample(bytags)} +## Tenanted example (by tags) The following creates an automatic deployment release override for version 1.3.0 of the project *HelloWorld* to the environment Development for all tenants with the *Hosting/Cloud* tag: ```bash -octo create-autodeployoverride --project HelloWorld --environment Development --tenanttag Hosting/Cloud --version 1.3.0 --server http://octopus/ --apikey API-ABCDEF123456 +octo create-autodeployoverride --project HelloWorld --environment Development --tenanttag Hosting/Cloud --version 1.3.0 --server https://your-octopus-url --apikey API-YOUR-KEY ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/create-release.md b/src/pages/docs/octopus-rest-api/octopus-cli/create-release.md index 85944f7f05..076ba32340 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/create-release.md +++ b/src/pages/docs/octopus-rest-api/octopus-cli/create-release.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-10-04 +modDate: 2024-06-25 title: Create release description: Using the Octopus CLI to create releases. navOrder: 100 @@ -72,7 +72,7 @@ Deployment: --waitForDeployment [Optional] Whether to wait synchronously for deployment to finish. --deploymentTimeout=VALUE - [Optional] Specifies maximum time (timespan + [Optional] Specifies maximum time (time span format) that the console session will wait for the deployment to finish(default 00:10:00). This will not stop the deployment. Requires -- @@ -81,7 +81,7 @@ Deployment: the deployment timeout is reached (flag, default false). --deploymentCheckSleepCycle=VALUE - [Optional] Specifies how much time (timespan + [Optional] Specifies how much time (time span format) should elapse between deployment status checks (default 00:00:10). --guidedFailure=VALUE [Optional] Whether to use guided failure mode. @@ -187,33 +187,33 @@ Common options: fatal. Defaults to 'debug'. ``` -## Basic Examples {#Creatingreleases-Basicexamples} +## Basic Examples This creates a new release of the *HelloWorld* project using the latest available NuGet packages for each step in the project. The version number of the release will be the highest version according to the [Release Versioning](/docs/releases/release-versioning) project setting: ```bash -octo create-release --project HelloWorld --server http://octopus/ --apiKey API-ABCDEF123456 +octo create-release --project HelloWorld --server https://your-octopus-url --apiKey API-YOUR-KEY ``` This creates a release with a specified release number, overriding the [Release Versioning](/docs/releases/release-versioning) project setting: ```bash -octo create-release --project HelloWorld --version 1.0.3 --server http://octopus/ --apiKey API-ABCDEF123456 +octo create-release --project HelloWorld --version 1.0.3 --server https://your-octopus-url --apiKey API-YOUR-KEY ``` -## Version controlled projects {#Creatingreleases-version-controlled} +## Version controlled projects For projects that use the [Config as Code feature](/docs/projects/version-control) (they are version controlled), you can create a release pointing at a git reference, e.g. a branch name or tag. This example creates a release using the branch name of `main`: ```bash -octo create-release --project HelloWorld --version 1.0.3 --server http://octopus/ --apiKey API-ABCDEF123456 --gitRef main +octo create-release --project HelloWorld --version 1.0.3 --server https://your-octopus-url --apiKey API-YOUR-KEY --gitRef main ``` :::div{.warning} If the provided project is **not a version controlled one**, passing `--gitRef` (or `--gitCommit`) will result in an error as these parameters are only valid for projects that are version controlled. ::: -## Specifying the Package Version {#Creatingreleases-Specifyingthepackageversion} +## Specifying the Package Version For each step that has a package, the version is determined in the following order: @@ -228,7 +228,7 @@ For each step that has a package, the version is determined in the following ord This creates a release *(1.0.3)* with a specified NuGet package version *(1.0.1)*: ```bash -octo create-release --project HelloWorld --version 1.0.3 --packageVersion 1.0.1 --server http://octopus/ --apiKey API-ABCDEF123456 +octo create-release --project HelloWorld --version 1.0.3 --packageVersion 1.0.1 --server https://your-octopus-url --apiKey API-YOUR-KEY ``` ### Option --package @@ -236,13 +236,13 @@ octo create-release --project HelloWorld --version 1.0.3 --packageVersion 1.0.1 This creates a release for a project with multiple packages, each with a different version. You can specify a step name and version pair with this option, allowing you to use different versions of the same package for different steps: ```bash -octo create-release --project HelloWorld --version 1.0.3 --package StepA:1.0.1 --package StepB:1.0.2 --server http://octopus/ --apiKey API-ABCDEF123456 +octo create-release --project HelloWorld --version 1.0.3 --package StepA:1.0.1 --package StepB:1.0.2 --server https://your-octopus-url --apiKey API-YOUR-KEY ``` If you want to use a specific version of a package for `StepA`, and the latest version of the package available for `StepB`, you can simply omit the parameter for the second step/package: ```bash -octo create-release --project HelloWorld --version 1.0.3 --package StepA:1.0.1 --server http://octopus/ --apiKey API-ABCDEF123456 +octo create-release --project HelloWorld --version 1.0.3 --package StepA:1.0.1 --server https://your-octopus-url --apiKey API-YOUR-KEY ``` The example above uses `1.0.1` for `StepA`, and the latest version available at the moment for `StepB`. @@ -251,7 +251,7 @@ For steps which have multiple packages (e.g. _Run a Script_ steps can [reference )), the format `StepName:PackageName:Version` can also be used: ```bash -octo create-release --project HelloWorld --version 1.0.3 --package StepA:Acme.Web:1.0.0 --package StepA:Acme.Data:2.0.0 --server http://octopus/ --apiKey API-ABCDEF123456 +octo create-release --project HelloWorld --version 1.0.3 --package StepA:Acme.Web:1.0.0 --package StepA:Acme.Data:2.0.0 --server https://your-octopus-url --apiKey API-YOUR-KEY ``` In the example above, `StepA` uses `1.0.0` for `Acme.Web` and `2.0.0` for `Acme.Data`. @@ -261,15 +261,15 @@ In the example above, `StepA` uses `1.0.0` for `Acme.Web` and `2.0.0` for `Acme. This creates a release for a project with multiple packages, by taking the version for each package from a folder containing the packages (this approach works well if your build server has just built the packages): ```bash -octo create-release --project HelloWorld --version 1.0.3 --packagesFolder packages --server http://octopus/ --apiKey API-ABCDEF123456 +octo create-release --project HelloWorld --version 1.0.3 --packagesFolder packages --server https://your-octopus-url --apiKey API-YOUR-KEY ``` -## Deploying a release after creating it {#Creatingreleases-Deployingareleaseaftercreatingit} +## Deploying a release after creating it To create a release **and** deploy it to an environment named Production: ```bash -octo create-release --project HelloWorld --deployto Production --server http://octopus/ --apiKey API-ABCDEF123456 --progress +octo create-release --project HelloWorld --deployto Production --server https://your-octopus-url --apiKey API-YOUR-KEY --progress ``` :::div{.hint} @@ -279,8 +279,8 @@ If the `--deployTo` parameter is specified and the [lifecycle](/docs/releases/li ## Release notes supported syntax -We use [showdownjs](https://github.com/showdownjs/showdown) to render release notes on the dashboard. -Showdownjs supports the common markdown syntax as well as a rich set of extras such as tables and task lists. For the full list see https://github.com/showdownjs/showdown/wiki/Showdown's-Markdown-syntax. +We use [Showdown](https://github.com/showdownjs/showdown) to render release notes on the dashboard. +Showdown supports the common markdown syntax as well as a rich set of extras such as tables and task lists. For the full list see https://github.com/showdownjs/showdown/wiki/Showdown's-Markdown-syntax. ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/delete-autodeployoverride.md b/src/pages/docs/octopus-rest-api/octopus-cli/delete-autodeployoverride.md index 655e735d39..65dad7fe01 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/delete-autodeployoverride.md +++ b/src/pages/docs/octopus-rest-api/octopus-cli/delete-autodeployoverride.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Delete auto deploy override description: Using the Octopus CLI to delete automatic deployment release overrides. navOrder: 100 @@ -85,28 +85,28 @@ Common options: fatal. Defaults to 'debug'. ``` -## Basic example {#Deletingautodeployoverrides-Basicexample} +## Basic example The following deletes an automatic deployment release override for the project *HelloWorld* to the environment Development: ```bash -octo delete-autodeployoverride --project HelloWorld --environment Development --server http://octopus/ --apikey API-ABCDEF123456 +octo delete-autodeployoverride --project HelloWorld --environment Development --server https://your-octopus-url --apikey API-YOUR-KEY ``` -## Tenanted example (by name) {#Deletingautodeployoverrides-Tenantedexample(byname)} +## Tenanted example (by name) The following deletes an automatic deployment release override for the project *HelloWorld* to the environment Development for the tenant *Acme*: ```bash -octo delete-autodeployoverride --project HelloWorld --environment Development --tenant Acme --server http://octopus/ --apikey API-ABCDEF123456 +octo delete-autodeployoverride --project HelloWorld --environment Development --tenant Acme --server https://your-octopus-url --apikey API-YOUR-KEY ``` -## tenanted example (by tags) {#deletingautodeployoverrides-tenantedexample(bytags)} +## tenanted example (by tags) The following deletes an automatic deployment release override for the project *HelloWorld* to the environment Development for all tenants with the *Hosting/Cloud* tag: ```bash -octo delete-autodeployoverride --project HelloWorld --environment Development --tenanttag Hosting/Cloud --server http://octopus/ --apikey API-ABCDEF123456 +octo delete-autodeployoverride --project HelloWorld --environment Development --tenanttag Hosting/Cloud --server https://your-octopus-url --apikey API-YOUR-KEY ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/deploy-release.md b/src/pages/docs/octopus-rest-api/octopus-cli/deploy-release.md index d40897a65d..768f098f94 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/deploy-release.md +++ b/src/pages/docs/octopus-rest-api/octopus-cli/deploy-release.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Deploy release description: Using the Octopus CLI to deploy releases. navOrder: 100 @@ -24,7 +24,7 @@ Deployment: --waitForDeployment [Optional] Whether to wait synchronously for deployment to finish. --deploymentTimeout=VALUE - [Optional] Specifies maximum time (timespan + [Optional] Specifies maximum time (time span format) that the console session will wait for the deployment to finish(default 00:10:00). This will not stop the deployment. Requires -- @@ -33,7 +33,7 @@ Deployment: the deployment timeout is reached (flag, default false). --deploymentCheckSleepCycle=VALUE - [Optional] Specifies how much time (timespan + [Optional] Specifies how much time (time span format) should elapse between deployment status checks (default 00:00:10). --guidedFailure=VALUE [Optional] Whether to use guided failure mode. @@ -147,24 +147,24 @@ Common options: fatal. Defaults to 'debug'. ``` -## Basic Examples {#Deployingreleases-Basicexamples} +## Basic Examples {#basic-examples} This example deploys release 1.0.0 of the *HelloWorld* project to the Production environment: ```bash -octo deploy-release --project HelloWorld --releaseNumber 1.0.0 --deployto Production --server http://octopus/ --apiKey API-ABCDEF123456 +octo deploy-release --project HelloWorld --releaseNumber 1.0.0 --deployto Production --server https://your-octopus-url --apiKey API-YOUR-KEY ``` This deploys the latest release in the *1.x Normal* Channel of the *HelloWorld* project to the Production environment: ```bash -octo deploy-release --project HelloWorld --channel "1.x Normal" --version latest --deployto Production --server http://octopus/ --apiKey API-ABCDEF123456 +octo deploy-release --project HelloWorld --channel "1.x Normal" --version latest --deployto Production --server https://your-octopus-url --apiKey API-YOUR-KEY ``` This deploys the latest release in the *1.x Normal* Channel of the *HelloWorld* project to the Production environment for the Tenants tagged as *Upgrade Ring/Early Adopters*: ```bash -octo deploy-release --project HelloWorld --channel "1.x Normal" --version latest --deployto Production --tenantTag "Upgrade Ring/Early Adopters" --server http://octopus/ --apiKey API-ABCDEF123456 +octo deploy-release --project HelloWorld --channel "1.x Normal" --version latest --deployto Production --tenantTag "Upgrade Ring/Early Adopters" --server https://your-octopus-url --apiKey API-YOUR-KEY ``` :::div{.success} diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/formatted-output.md b/src/pages/docs/octopus-rest-api/octopus-cli/formatted-output.md index 3ab2cba260..c71e711e56 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/formatted-output.md +++ b/src/pages/docs/octopus-rest-api/octopus-cli/formatted-output.md @@ -16,7 +16,7 @@ Most commands support printing the result in JSON format. To access JSON formatted output, use the `--outputformat=json` parameter. ```bash -octo list-projects --server http://your-octopus-server/ --apiKey API-ABCDEF123456 --outputformat=json +octo list-projects --server https://your-octopus-url --apiKey API-YOUR-KEY --outputformat=json ``` This command outputs the list of projects in parsable JSON format: @@ -36,7 +36,7 @@ This command outputs the list of projects in parsable JSON format: You can also work with the JSON output in PowerShell: ```powershell -$json = (./octo list-releases --server http://your-octopus-server/ --apikey API-ABCDEF123456 --project=OctoLifecycle --outputformat=json) | ConvertFrom-Json +$json = (./octo list-releases --server https://your-octopus-url --apikey API-YOUR-KEY --project=OctoLifecycle --outputformat=json) | ConvertFrom-Json $json | select -expand Releases | where {[datetime]$_.Assembled -gt ((Get-Date).AddMonths(-1))} ``` diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/index.mdx b/src/pages/docs/octopus-rest-api/octopus-cli/index.mdx index c68b017bb0..ef1e96ac3d 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/index.mdx +++ b/src/pages/docs/octopus-rest-api/octopus-cli/index.mdx @@ -93,7 +93,7 @@ Arguments are not case sensitive and can take the following forms: All commands require you to pass the URL of the Octopus Server's API endpoint, and an API key which is used to authenticate you. ```bash -octo ... --server http://your-octopus-server/ --apiKey API-ABCDEF123456 +octo ... --server https://your-octopus-url --apiKey API-YOUR-KEY ``` Most commands also support [JSON formatted output](/docs/octopus-rest-api/octopus-cli/formatted-output). diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/list-deployments.mdx b/src/pages/docs/octopus-rest-api/octopus-cli/list-deployments.mdx index 2644a8507f..6787ac936b 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/list-deployments.mdx +++ b/src/pages/docs/octopus-rest-api/octopus-cli/list-deployments.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: List deployments description: List a number of deployments by project, environment or by tenant. navOrder: 100 @@ -89,25 +89,25 @@ Common options: This example lists deployments for the specified project: ``` -octo.exe list-deployments --project="Octo Pet Shop - DB" --server="https://samples.octopus.app" --apiKey="API-MyApiKey" --space="Tenants - SaaS" +octo.exe list-deployments --project="Octo Pet Shop - DB" --server="https://samples.octopus.app" --apiKey="API-YOUR-KEY" --space="Tenants - SaaS" ``` This example lists the latest 5 deployments for the specified project: ``` -octo.exe list-deployments --project="Octo Pet Shop - DB" --server="https://samples.octopus.app" --apiKey="API-MyApiKey" --space="Tenants - SaaS" --number="5" +octo.exe list-deployments --project="Octo Pet Shop - DB" --server="https://samples.octopus.app" --apiKey="API-YOUR-KEY" --space="Tenants - SaaS" --number="5" ``` This example lists the latest 5 deployments to production: ``` -octo.exe list-deployments --project="Octo Pet Shop - DB" --server="https://samples.octopus.app" --apiKey="API-MyApiKey" --space="Tenants - SaaS" --number="5" --environment="Production" +octo.exe list-deployments --project="Octo Pet Shop - DB" --server="https://samples.octopus.app" --apiKey="API-YOUR-KEY" --space="Tenants - SaaS" --number="5" --environment="Production" ``` This example lists the latest 5 deployments to production for tenant Petlife: ``` -octo list-deployments --project="Octo Pet Shop - DB" --server="https://samples.octopus.app" --apiKey="API-MyApiKey" --space="Tenants - SaaS" --number="5" --environment="Production" --tenant="Petlife" +octo list-deployments --project="Octo Pet Shop - DB" --server="https://samples.octopus.app" --apiKey="API-YOUR-KEY" --space="Tenants - SaaS" --number="5" --environment="Production" --tenant="Petlife" ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/list-environments.mdx b/src/pages/docs/octopus-rest-api/octopus-cli/list-environments.mdx index 8045acb4fd..95419e2fc9 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/list-environments.mdx +++ b/src/pages/docs/octopus-rest-api/octopus-cli/list-environments.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: List environments description: List environments navOrder: 100 @@ -78,7 +78,7 @@ Common options: This example lists environments for space [Target - Docker](https://samples.octopus.app/app#/Spaces-103): ``` -octo list-environments --server="https://samples.octopus.app" --apiKey="API-MyApiKey" --space="Target - Docker" +octo list-environments --server="https://samples.octopus.app" --apiKey="API-YOUR-KEY" --space="Target - Docker" ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/list-latestdeployments.mdx b/src/pages/docs/octopus-rest-api/octopus-cli/list-latestdeployments.mdx index a9385db000..5dcaf02c92 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/list-latestdeployments.mdx +++ b/src/pages/docs/octopus-rest-api/octopus-cli/list-latestdeployments.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: List latest deployments description: List the releases last-deployed in each environment navOrder: 100 @@ -85,19 +85,19 @@ Common options: This example lists the latest deployment to Production for project `DACPAC SQL Server` in space [Target - SQL Server](https://samples.octopus.app/app#/Spaces-106): ``` -octo list-latestdeployments --project="DACPAC SQL Server" --environment="Production" --server="https://samples.octopus.app" --apiKey="API-MyApiKey" --space="Target - SQL Server" +octo list-latestdeployments --project="DACPAC SQL Server" --environment="Production" --server="https://samples.octopus.app" --apiKey="API-YOUR-KEY" --space="Target - SQL Server" ``` This example lists the latest deployment to Test and Production for project `DACPAC SQL Server` in space [Target - SQL Server](https://samples.octopus.app/app#/Spaces-106): ``` -octo list-latestdeployments --project="DACPAC SQL Server" --environment="Test" --environment="Production" --server="https://samples.octopus.app" --apiKey="API-MyApiKey" --space="Target - SQL Server" +octo list-latestdeployments --project="DACPAC SQL Server" --environment="Test" --environment="Production" --server="https://samples.octopus.app" --apiKey="API-YOUR-KEY" --space="Target - SQL Server" ``` This example lists the latest deployment to Test and Production for project `DACPAC SQL Server` and `DBUp SQL Server` in space [Target - SQL Server](https://samples.octopus.app/app#/Spaces-106): ``` -octo list-latestdeployments --project="DACPAC SQL Server" --environment="Test" --environment="Production" --server="https://samples.octopus.app" --apiKey="API-MyApiKey" --space="Target - SQL Server" --project="DBUp SQL Server" +octo list-latestdeployments --project="DACPAC SQL Server" --environment="Test" --environment="Production" --server="https://samples.octopus.app" --apiKey="API-YOUR-KEY" --space="Target - SQL Server" --project="DBUp SQL Server" ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/list-machines.mdx b/src/pages/docs/octopus-rest-api/octopus-cli/list-machines.mdx index 35b2358e03..f66821a612 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/list-machines.mdx +++ b/src/pages/docs/octopus-rest-api/octopus-cli/list-machines.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: List machines description: Lists all machines navOrder: 100 @@ -98,25 +98,25 @@ Common options: This example lists all machines on the instance: ``` -octo list-machines --server="https://MyOctopusServer" --apiKey="API-MyApiKey" +octo list-machines --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" ``` This example lists all machines that are in the Test environment: ``` -octo list-machines --server="https://MyOctopusServer" --apiKey="API-MyApiKey" --environment="Test" +octo list-machines --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" --environment="Test" ``` This example lists all machines that are in the Development environment and the Production environment: ``` -octo list-machines --server="https://MyOctopusServer" --apiKey="API-MyApiKey" --environment="Development" --environment="Production" +octo list-machines --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" --environment="Development" --environment="Production" ``` This example lists all machines that need a Calamari upgrade in space [Target - Hybrid](https://samples.octopus.app/app#/Spaces-342): ``` -octo list-machines --server="https://MyOctopusServer" --apiKey="API-MyApiKey" --calamari-outdated="true" --space="Target - Hybrid" +octo list-machines --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" --calamari-outdated="true" --space="Target - Hybrid" ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/list-projects.md b/src/pages/docs/octopus-rest-api/octopus-cli/list-projects.md index 3b0be3f35d..e5bab783fe 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/list-projects.md +++ b/src/pages/docs/octopus-rest-api/octopus-cli/list-projects.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: List projects description: Lists all projects navOrder: 100 @@ -75,7 +75,7 @@ Common options: This example displays the projects within the default space: ``` -octo list-projects --server="http://MyOctopusServer" --apiKey="API-MyApiKey" +octo list-projects --server="http://MyOctopusServer" --apiKey="API-YOUR-KEY" ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/list-releases.mdx b/src/pages/docs/octopus-rest-api/octopus-cli/list-releases.mdx index 92898ee98b..6f076e4876 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/list-releases.mdx +++ b/src/pages/docs/octopus-rest-api/octopus-cli/list-releases.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: List releases description: List releases by project navOrder: 100 @@ -83,13 +83,13 @@ Common options: This example lists all releases for the Wingtip Toys project on the default space: ``` -octo list-releases --project="WingtipToys" --server="https://MyOctopusServer" --apiKey="API-MyApiKey" +octo list-releases --project="WingtipToys" --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" ``` -This example lists all releases for projects `Dbup - AWS RDS`, `Flyway - AWS RDS`, and `RoundhousE - AWS RDS` on space [Target - MySQL](https://samples.octopus.app/app#/Spaces-242): +This example lists all releases for projects `DbUp - AWS RDS`, `Flyway - AWS RDS`, and `RoundhousE - AWS RDS` on space [Target - MySQL](https://samples.octopus.app/app#/Spaces-242): ``` -octo list-releases --project="Dbup - AWS RDS" --project="Flyway - AWS RDS" --project="RoundhousE - AWS RDS" --server="https://samples.octopus.app" --apiKey="API-MyApiKey" --space="Target - MySQL" +octo list-releases --project="DbUp - AWS RDS" --project="Flyway - AWS RDS" --project="RoundhousE - AWS RDS" --server="https://samples.octopus.app" --apiKey="API-YOUR-KEY" --space="Target - MySQL" ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/list-tenants.mdx b/src/pages/docs/octopus-rest-api/octopus-cli/list-tenants.mdx index 48fe5424e5..c8d081652f 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/list-tenants.mdx +++ b/src/pages/docs/octopus-rest-api/octopus-cli/list-tenants.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: List tenants description: List tenants navOrder: 100 @@ -78,13 +78,13 @@ Common options: This example lists the tenants on the default space: ``` -octo list-tenants --server="https://MyOctopusServer" --apiKey="API-MyApiKey" +octo list-tenants --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" ``` This example lists the tenants in the space [Pattern - Tenants](https://samples.octopus.app/app#/Spaces-682): ``` -octo list-tenants --server="https://samples.octopus.app" --apiKey="API-MyApiKey" --space="Pattern - Tenants" +octo list-tenants --server="https://samples.octopus.app" --apiKey="API-YOUR-KEY" --space="Pattern - Tenants" ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/list-workerpools.mdx b/src/pages/docs/octopus-rest-api/octopus-cli/list-workerpools.mdx index 9a02932d17..5748fa700f 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/list-workerpools.mdx +++ b/src/pages/docs/octopus-rest-api/octopus-cli/list-workerpools.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: List Worker pools description: List worker pools navOrder: 100 @@ -78,13 +78,13 @@ Common options: This example lists the worker pools in the default space: ``` -octo list-workerpools --server="https://MyOctopusServer" --apiKey="API-MyApiKey" +octo list-workerpools --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" ``` This example lists the worker pools in space [Target - PostgreSQL](https://samples.octopus.app/app#/Spaces-243): ``` -octo list-workerpools --server="https://samples.octopus.app" --apiKey="API-MyApiKey" --space="Target - PostgreSQL" +octo list-workerpools --server="https://samples.octopus.app" --apiKey="API-YOUR-KEY" --space="Target - PostgreSQL" ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/list-workers.mdx b/src/pages/docs/octopus-rest-api/octopus-cli/list-workers.mdx index 2876ab7c43..1d7baf7d30 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/list-workers.mdx +++ b/src/pages/docs/octopus-rest-api/octopus-cli/list-workers.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: List Workers description: Lists all workers navOrder: 100 @@ -97,19 +97,19 @@ Common options: This example lists worker machines in the `Default worker pool` in the default space: ``` -octo list-workers --workerPool="Default worker pool" --server="https://MyOctopusServer" --apiKey="API-MyApiKey" +octo list-workers --workerPool="Default worker pool" --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" ``` This example lists all workers in MyWorkerPool that are disabled: ``` -octo list-workers --workerPool="MyWorkerPool" --server="https://MyOctopusServer" --apiKey="API-MyApiKey" --disabled="true" +octo list-workers --workerPool="MyWorkerPool" --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" --disabled="true" ``` This example lists all workers with a status of `Unknown` in the [Target - NGINX](https://samples.octopus.app/app#/Spaces-104) space: ``` -octo list-workers --workerPool="Default worker pool" --server="https://samples.octopus.com" --apiKey="API--MyApiKey" --space="Target - NGINX" --health-status="Uknown" +octo list-workers --workerPool="Default worker pool" --server="https://samples.octopus.com" --apiKey="API-YOUR-KEY" --space="Target - NGINX" --health-status="Unknown" ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/prevent-releaseprogression.md b/src/pages/docs/octopus-rest-api/octopus-cli/prevent-releaseprogression.md index 6f16b285cf..1afc1304a8 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/prevent-releaseprogression.md +++ b/src/pages/docs/octopus-rest-api/octopus-cli/prevent-releaseprogression.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Prevent release progression description: Prevents a release from progressing to next phase navOrder: 100 @@ -82,7 +82,7 @@ Common options: This example prevents release 1.0.0.0 of WingtipToys from being deployed to the next environment: ``` -octo prevent-releaseprogression --project="WingtipToys" --releaseNumber="1.0.0.0" --reason="Invalid cast conversion exception" --server="https://MyOctopusServer" --apiKey="API-MyApiKey" +octo prevent-releaseprogression --project="WingtipToys" --releaseNumber="1.0.0.0" --reason="Invalid cast conversion exception" --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/push.md b/src/pages/docs/octopus-rest-api/octopus-cli/push.md index b383f1aacb..5d8a5dfe81 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/push.md +++ b/src/pages/docs/octopus-rest-api/octopus-cli/push.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Push description: Pushes a package (.nupkg, .zip, .tar.gz, etc.) package to the built-in NuGet repository in an Octopus Server. navOrder: 100 @@ -102,12 +102,12 @@ This example pushes a package to the built-in Octopus Deploy repository: Windows: ``` -octo push --package="c:\temp\MyPackage.1.0.0.0.zip" --server="https://MyOctopusServer" --apiKey="API-MyApiKey" +octo push --package="c:\temp\MyPackage.1.0.0.0.zip" --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" ``` Linux: ``` -octo push --package="/tmp/MyPackage.1.0.0.0.zip" --server="https://MyOctopusServer" --apiKey="API-MyApiKey" +octo push --package="/tmp/MyPackage.1.0.0.0.zip" --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" ``` ## Learn more diff --git a/src/pages/docs/octopus-rest-api/octopus-cli/run-runbook.md b/src/pages/docs/octopus-rest-api/octopus-cli/run-runbook.md index 35d9fde51b..11a4eb58a7 100644 --- a/src/pages/docs/octopus-rest-api/octopus-cli/run-runbook.md +++ b/src/pages/docs/octopus-rest-api/octopus-cli/run-runbook.md @@ -70,7 +70,7 @@ Run Runbook: --waitForRun [Optional] Whether to wait synchronously for deployment to finish. --progress [Optional] Show progress of the runbook run - --runTimeout=VALUE [Optional] Specifies maximum time (timespan + --runTimeout=VALUE [Optional] Specifies maximum time (time span format) that the console session will wait for the runbook run to finish (default 00:10:00). This will not stop the run. Requires -- @@ -78,7 +78,7 @@ Run Runbook: --cancelOnTimeout [Optional] Whether to cancel the runbook run if the run timeout is reached (flag, default false). --runCheckSleepCycle=VALUE - [Optional] Specifies how much time (timespan + [Optional] Specifies how much time (time span format) should elapse between runbook run status checks (default 00:00:10) --noRawLog [Optional] Don't print the raw log of failed @@ -140,7 +140,7 @@ Common options: fatal. Defaults to 'debug'. ``` -## Basic Examples {#RunningRunbooks-Basicexamples} +## Basic Examples {#basic-examples} This runs a runbook using the published snapshot: @@ -148,19 +148,19 @@ This runs a runbook using the published snapshot: octo run-runbook --runbook="Hello World" \ --project="Smurfs" \ --environment="Test" \ - --server="http://octopus/" \ - --apiKey="API-ABCDEF123456" + --server="https://your-octopus-url" \ + --apiKey="API-YOUR-KEY" ``` -This runs a runbook using a specific snapshot (e.g., Snapshot KGHSL3L): +This runs a runbook using a specific snapshot (e.g., Snapshot XXXXX): ```bash octo run-runbook --runbook="Hello World" \ --project="Smurfs" \ --environment="Test" \ - --snapshot="Snapshot KGHSL3L" \ - --server="http://octopus/" \ - --apiKey="API-ABCDEF123456" + --snapshot="Snapshot XXXXX" \ + --server="https://your-octopus-url" \ + --apiKey="API-YOUR-KEY" ``` To specify multiple environments, you can use the following: @@ -170,8 +170,8 @@ octo run-runbook --runbook="Hello World" \ --project="Smurfs" \ --environment="Test" \ --environment="Dev" \ - --server="http://octopus/" \ - --apiKey="API-ABCDEF123456" + --server="https://your-octopus-url" \ + --apiKey="API-YOUR-KEY" ``` :::div{.success} diff --git a/src/pages/docs/octopus-rest-api/octopus.client/getting-started.mdx b/src/pages/docs/octopus-rest-api/octopus.client/getting-started.mdx index 8e16b8c5bd..c3bf7de324 100644 --- a/src/pages/docs/octopus-rest-api/octopus.client/getting-started.mdx +++ b/src/pages/docs/octopus-rest-api/octopus.client/getting-started.mdx @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Getting started description: Getting started with the Octopus.Client. navOrder: 10 @@ -50,8 +50,8 @@ dotnet add package Octopus.Server.Client The easiest way to use the client is via the `OctopusRepository` helper: ```csharp -var server = "https://myoctopus.example.com/"; -var apiKey = "API-YOURKEY"; // Get this from your 'profile' page in the Octopus Web Portal +var server = "https://your-octopus-url"; +var apiKey = "API-YOUR-KEY"; // Get this from your 'profile' page in the Octopus Web Portal var endpoint = new OctopusServerEndpoint(server, apiKey); var repository = new OctopusRepository(endpoint); ``` @@ -68,8 +68,8 @@ repository.Users.SignIn(new LoginCommand { Username = "me", Password = "secret" The easiest way to use the client is via the `OctopusAsyncClient`: ```csharp -var server = "https://myoctopus.example.com/"; -var apiKey = "API-YOURKEY"; // Get this from your 'profile' page in the Octopus Web Portal +var server = "https://your-octopus-url"; +var apiKey = "API-YOUR-KEY"; // Get this from your 'profile' page in the Octopus Web Portal var endpoint = new OctopusServerEndpoint(server, apiKey); using (var client = await OctopusAsyncClient.Create(endpoint)) { @@ -129,8 +129,8 @@ Add-Type -Path $path ```powershell Add-Type -Path 'C:\PathTo\Octopus.Client.dll' -$server = "https://myoctopus.example.com" -$apiKey = "API-YOURKEY"; # Get this from your 'profile' page in the Octopus Web Portal +$server = "https://your-octopus-url" +$apiKey = "API-YOUR-KEY"; # Get this from your 'profile' page in the Octopus Web Portal $endpoint = New-Object Octopus.Client.OctopusServerEndpoint($server, $apiKey) $repository = New-Object Octopus.Client.OctopusRepository($endpoint) ``` diff --git a/src/pages/docs/octopus-rest-api/octopus.client/working-with-spaces.md b/src/pages/docs/octopus-rest-api/octopus.client/working-with-spaces.md index 10c8281338..beb86a3b2d 100644 --- a/src/pages/docs/octopus-rest-api/octopus.client/working-with-spaces.md +++ b/src/pages/docs/octopus-rest-api/octopus.client/working-with-spaces.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Working with Spaces description: How to work with Spaces in the Octopus.Client library. navOrder: 40 @@ -16,7 +16,7 @@ The first is the `OctopusClient.ForSpace` method: ```powershell # Create endpoint and client -$endpoint = New-Object Octopus.Client.OctopusServerEndpoint("https://myoctopus.example.com", "API-YOURKEY") +$endpoint = New-Object Octopus.Client.OctopusServerEndpoint("https://your-octopus-url", "API-YOUR-KEY") $client = New-Object Octopus.Client.OctopusClient($endpoint) # Get default repository and get space by name @@ -34,7 +34,7 @@ $projects = $repositoryForSpace.Projects.GetAll() ```csharp C# // Create endpoint and client -var endpoint = new OctopusServerEndpoint("https://myoctopus.example.com", "API-YOURKEY"); +var endpoint = new OctopusServerEndpoint("https://your-octopus-url", "API-YOUR-KEY"); var client = new OctopusClient(endpoint); // Get default repository and get space by name @@ -55,7 +55,7 @@ The other method is `OctopusRepositoryExtensions.ForSpace`: ```powershell # Create endpoint and repository -$endpoint = New-Object Octopus.Client.OctopusServerEndpoint("https://myoctopus.example.com", "API-YOURKEY") +$endpoint = New-Object Octopus.Client.OctopusServerEndpoint("https://your-octopus-url", "API-YOUR-KEY") $repository = New-Object Octopus.Client.OctopusRepository($endpoint) # Get space by name @@ -72,7 +72,7 @@ $projects = $repositoryForSpace.Projects.GetAll() ```csharp // Create endpoint and repository -var endpoint = new OctopusServerEndpoint("https://myoctopus.example.com", "API-YOURKEY"); +var endpoint = new OctopusServerEndpoint("https://your-octopus-url", "API-YOUR-KEY"); var repository = new OctopusRepository(endpoint); // Get space by name diff --git a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/deregister-from.md b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/deregister-from.md index 98b72dda8c..92297f390e 100644 --- a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/deregister-from.md +++ b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/deregister-from.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Deregister from description: Using the Tentacle.exe command line executable to deregister a deployment target from an Octopus Server. --- @@ -41,11 +41,11 @@ Or one of the common options: This example deregisters a Tentacle from the Octopus Server: ``` -tentacle deregister-from --server="https://MyOctopusServer" --apiKey="API-MyApiKey" +tentacle deregister-from --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" ``` This example deregisters the instance `MyNewInstance` from the space `MyNewSpace`: ``` -tentacle deregister-from --server="https://MyOctopusServer" --apiKey="API-MyApiKey" --instance="MyNewInstance" --space="MyNewSpace" +tentacle deregister-from --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" --instance="MyNewInstance" --space="MyNewSpace" ``` diff --git a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/deregister-worker.md b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/deregister-worker.md index 2423ed0399..cdf054eb07 100644 --- a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/deregister-worker.md +++ b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/deregister-worker.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Deregister Worker description: Using the Tentacle.exe command line executable to deregister a Worker from an Octopus Server. --- @@ -41,11 +41,11 @@ Or one of the common options: This example deregisters a worker from the Octopus Server: ``` -tentacle deregister-worker --server="https://MyOctopusServer" --apiKey="API-MyApiKey" +tentacle deregister-worker --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" ``` This example deregisters the worker instance `MyNewInstance` from space `MyNewSpace`: ``` -tentacle deregister-worker --server="https://MyOctopusServer" --apiKey="API-MyApiKey" --instance="MyNewInstance" --space="MyNewSpace" +tentacle deregister-worker --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" --instance="MyNewInstance" --space="MyNewSpace" ``` diff --git a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/poll-server.md b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/poll-server.md index 9535787e05..bc8d0f77c6 100644 --- a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/poll-server.md +++ b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/poll-server.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Poll server description: Using the Tentacle.exe command line executable to configure the Octopus Server this Tentacle will poll. --- @@ -48,5 +48,5 @@ Or one of the common options: This example configures the Octopus Server that the polling Tentacle polls: ``` -tentacle poll-server --server="https://MyOctopusServer" --apiKey="API-MyApiKey" +tentacle poll-server --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" ``` diff --git a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/register-with.md b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/register-with.md index 04c8aff928..c5d48ff8cd 100644 --- a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/register-with.md +++ b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/register-with.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Register with description: Using the Tentacle.exe command line executable to register this machine as a deployment target with an Octopus Server. --- @@ -91,11 +91,11 @@ Or one of the common options: This example registers a listening Tentacle to the Octopus Server with the `Development` environment and `OctoFX-Web` role: ``` -tentacle register-with --server="https://MyOctopusServer" --apiKey="API-MyApiKey" --environment="Development" --role="OctoFX-Web" +tentacle register-with --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" --environment="Development" --role="OctoFX-Web" ``` This example registers a polling Tentacle with the `Development` environment and `OctoFX-Web` role in the `OctoFX` space: ``` -tentacle register-with --server="https://MyOctopusServer" --apiKey="API-MyApiKey" --environment="Development" --role="OctoFX-Web" --space="OctoFX" --comms-style="TentacleActive" +tentacle register-with --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" --environment="Development" --role="OctoFX-Web" --space="OctoFX" --comms-style="TentacleActive" ``` diff --git a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/register-worker.md b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/register-worker.md index b28a3c8e51..7897c727ca 100644 --- a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/register-worker.md +++ b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/register-worker.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Register Worker description: Using the Tentacle.exe command line executable to register this machine as a Worker with an Octopus Server. --- @@ -76,11 +76,11 @@ Or one of the common options: This example registers a listening Tentacle to the worker pool `MyWorkerPool`: ``` -tentacle register-worker --server="https://MyOctopusServer" --apiKey="API-MyApiKey" --workerpool="MyWorkerPool" +tentacle register-worker --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" --workerpool="MyWorkerPool" ``` This example registers a polling Tentacle to the worker pool `MyWorkerPool` in the space `MyNewSpace`: ``` -tentacle register-worker --server="https://MyOctopusServer" --apiKey="API-MyApiKey" --workerpool="MyWorkerPool --space="MyNewSpace" --comms-style="TentacleActive" +tentacle register-worker --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" --workerpool="MyWorkerPool --space="MyNewSpace" --comms-style="TentacleActive" ``` diff --git a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/server-comms.md b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/server-comms.md index 7ca5e96319..e666de1015 100644 --- a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/server-comms.md +++ b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/server-comms.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Server comms description: Using the Tentacle.exe command line executable to configure how the Tentacle communicates with the Octopus Server. --- @@ -48,5 +48,5 @@ tentacle server-comms --style="TentaclePassive" --thumbprint="3FBFB8E1EE6B113370 This example configures the Tentacle instance `MyNewInstance` to communicate with the Octopus Server in polling mode: ``` -tentacle server-comms --style="TentacleActive" --instance="MyNewInstance" --thumbprint="3FBFB8E1EE6B1133701190306E2CBBFB39C30C8D" --host="https://MyOctopusServer" +tentacle server-comms --style="TentacleActive" --instance="MyNewInstance" --thumbprint="3FBFB8E1EE6B1133701190306E2CBBFB39C30C8D" --host="https://your-octopus-url" ``` diff --git a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/show-configuration.md b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/show-configuration.md index b0c54a46ed..12b56ea47d 100644 --- a/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/show-configuration.md +++ b/src/pages/docs/octopus-rest-api/tentacle.exe-command-line/show-configuration.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2023-01-01 -modDate: 2023-01-01 +modDate: 2024-06-25 title: Show configuration description: Outputs the Tentacle configuration --- @@ -50,5 +50,5 @@ tentacle show-configuration This example displays the configuration of the Tentacle (or Worker) on the machine, as well as the configuration from the Octopus Server in JSON format: ``` -tentacle show-configuration --server="https://MyOctopusServer" --apiKey="API-MyApiKey" +tentacle show-configuration --server="https://your-octopus-url" --apiKey="API-YOUR-KEY" ``` diff --git a/src/pages/docs/releases/creating-a-release.md b/src/pages/docs/releases/creating-a-release.md index 252eb704d8..c3de91509e 100644 --- a/src/pages/docs/releases/creating-a-release.md +++ b/src/pages/docs/releases/creating-a-release.md @@ -1,7 +1,7 @@ --- layout: src/layouts/Default.astro pubDate: 2024-04-29 -modDate: 2024-04-29 +modDate: 2024-06-25 title: Creating a release description: Learn how to create a release in Octopus Deploy navOrder: 2 @@ -46,7 +46,7 @@ Deployments scheduled for the future can be viewed under the Project Overview pa For everyone using the [Octopus CLI](/docs/octopus-rest-api/octopus-cli), you can use the following option: ```powershell -octo deploy-release --deployAt="2014-07-12 17:54:00 +11:00" --project=HelloWorld --releaseNumber=1.0.0 --deployto=Production --server=http://octopus/api --apiKey=ABCDEF123456 +octo deploy-release --deployAt="2014-07-12 17:54:00 +11:00" --project=HelloWorld --releaseNumber=1.0.0 --deployto=Production --server=https://your-octopus-url --apiKey=API-YOUR-KEY ``` ### Exclude steps from releases diff --git a/src/shared-content/installation/migrate-from-windows-to-linux-container.include.md b/src/shared-content/installation/migrate-from-windows-to-linux-container.include.md index 8ce1c488a5..be578d697b 100644 --- a/src/shared-content/installation/migrate-from-windows-to-linux-container.include.md +++ b/src/shared-content/installation/migrate-from-windows-to-linux-container.include.md @@ -126,13 +126,13 @@ If you wish to use a new URL, you will need to run this script on each machine h Windows: ``` -C:\Program Files\Octopus Deploy\Tentacle>Tentacle poll-server --server=https://your.octopus.server --apikey=API-MyApiKey --server-comms-port=10943 +C:\Program Files\Octopus Deploy\Tentacle>Tentacle poll-server --server=https://your-octopus-url --apikey=API-YOUR-KEY --server-comms-port=10943 ``` Linux: ``` -/opt/octopus/tentacle/Tentacle poll-server --server=httpa://your.octopus.server --apikey=API-MyApiKey --server-comms-port=10943 +/opt/octopus/tentacle/Tentacle poll-server --server=https://your-octopus-url --apikey=API-YOUR-KEY --server-comms-port=10943 ``` ## Folder paths diff --git a/src/shared-content/scripts/add-a-space-with-environments-scripts.include.md b/src/shared-content/scripts/add-a-space-with-environments-scripts.include.md index bfe111c506..c730199be9 100644 --- a/src/shared-content/scripts/add-a-space-with-environments-scripts.include.md +++ b/src/shared-content/scripts/add-a-space-with-environments-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "New Space" @@ -64,8 +64,8 @@ foreach ($environment in $environments) { ```powershell Add-Type -Path 'path\to\Octopus.Client.dll' -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $endpoint = New-Object Octopus.Client.OctopusServerEndpoint($octopusURL, $octopusAPIKey) $repository = New-Object Octopus.Client.OctopusRepository($endpoint) @@ -122,8 +122,8 @@ foreach ($environmentName in $environments) { using Octopus.Client; using Octopus.Client.Model; -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var endpoint = new OctopusServerEndpoint(octopusURL, octopusAPIKey); var repository = new OctopusRepository(endpoint); @@ -186,8 +186,8 @@ import json import requests # Define Octopus server variables -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} # Define working variables @@ -249,12 +249,12 @@ func main() { spaceId := "" // Update if authentication is in a different space newSpaceName := "MyNewSpace" - apiURL, err := url.Parse("https://youroctourl") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YOURAPIKEY" + APIKey := "API-YOUR-KEY" spaceManagersTeamMembers := []string{} // This or spaceManagerTeams must contain a value spaceManagerTeams := []string{"teams-administrators"} // This or spaceManagersTeamMembers must contain a value, "teams-administrators" is the Octopus Administrators team environments := []string{"Development", "Test", "Production"} diff --git a/src/shared-content/scripts/add-azuread-identity-to-users-scripts.include.md b/src/shared-content/scripts/add-azure-ad-identity-to-users-scripts.include.md similarity index 98% rename from src/shared-content/scripts/add-azuread-identity-to-users-scripts.include.md rename to src/shared-content/scripts/add-azure-ad-identity-to-users-scripts.include.md index b6444bc1ad..0ac300524c 100644 --- a/src/shared-content/scripts/add-azuread-identity-to-users-scripts.include.md +++ b/src/shared-content/scripts/add-azure-ad-identity-to-users-scripts.include.md @@ -1,4 +1,4 @@ -
+
PowerShell (REST API) ```powershell @@ -139,13 +139,13 @@ function AddAzureADLogins( $existingOctopusUser.Identities += $newAzureADIdentity } - # Update user's email address if set AND the value isnt empty. + # Update user's email address if set AND the value isn't empty. if($UpdateOctopusEmailAddress -eq $True -and -not([string]::IsNullOrWhiteSpace($User.AzureEmailAddress) -eq $true)) { Write-Debug "Setting Octopus email address to: $($User.AzureEmailAddress)" $existingOctopusUser.EmailAddress = $User.AzureEmailAddress } - # Update user's display name if set AND the value isnt empty. + # Update user's display name if set AND the value isn't empty. if($UpdateOctopusDisplayName -eq $True -and -not([string]::IsNullOrWhiteSpace($User.AzureDisplayName) -eq $true)) { Write-Debug "Setting Octopus display name to: $($User.AzureDisplayName)" $existingOctopusUser.DisplayName = $User.AzureDisplayName @@ -183,7 +183,7 @@ function AddAzureADLogins( ```
-
+
PowerShell (Octopus.Client) ```powershell @@ -329,14 +329,14 @@ function AddAzureLogins $existingOctopusUser.Identities += $newAzureADIdentity # Identities is an array } - # Update user's email address if set AND the value isnt empty. + # Update user's email address if set AND the value isn't empty. if($UpdateOctopusEmailAddress -eq $True -and -not([string]::IsNullOrWhiteSpace($User.AzureEmailAddress) -eq $true)) { Write-Debug "Setting Octopus email address to: $($User.AzureEmailAddress)" $existingOctopusUser.EmailAddress = $User.AzureEmailAddress } - # Update user's display name if set AND the value isnt empty. + # Update user's display name if set AND the value isn't empty. if($UpdateOctopusDisplayName -eq $True -and -not([string]::IsNullOrWhiteSpace($User.AzureDisplayName) -eq $true)) { Write-Debug "Setting Octopus display name to: $($User.AzureDisplayName)" @@ -372,7 +372,7 @@ function AddAzureLogins ```
-
+
C# ```csharp @@ -565,7 +565,7 @@ public static void AddAzureLogins(string OctopusUrl, string ApiKey, string Path ```
-
+
Python3 ```python @@ -580,8 +580,8 @@ class userToUpdate: AzureDisplayName = '' # Define Octopus server variables -octopus_server_uri = 'https://YourUrl' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' # Create function @@ -609,8 +609,8 @@ WhatIf=False): if Path: # Write something to do extraction - with open(Path) as csvfile: - csv_reader = csv.reader(csvfile, delimiter=',') + with open(Path) as csv_file: + csv_reader = csv.reader(csv_file, delimiter=',') for row in csv_reader: updateUser = userToUpdate() updateUser.AzureDisplayName = row[0] @@ -706,7 +706,7 @@ AddAzureLogins(octopus_server_uri, octopus_api_key, OctopusUsername='some.email@ ```
-
+
Go ```go @@ -733,11 +733,11 @@ type User struct { func main() { - apiURL, err := url.Parse("https://YourUrl") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" Path := "" Users := []User{} diff --git a/src/shared-content/scripts/add-azure-web-app-scripts.include.md b/src/shared-content/scripts/add-azure-web-app-scripts.include.md index 6dd3680dc3..211e240cc9 100644 --- a/src/shared-content/scripts/add-azure-web-app-scripts.include.md +++ b/src/shared-content/scripts/add-azure-web-app-scripts.include.md @@ -5,14 +5,14 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $azureServicePrincipalName = "MyAzureAccount" $azureResourceGroupName = "MyResourceGroup" $environmentNames = @("Development", "Production") -$roles = @("Myrole") +$roles = @("MyRole") $environmentIds = @() $azureWebAppName = "MyAzureWebAppName" @@ -55,8 +55,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/machines" -Hea Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $azureServicePrincipalName = "MyAzureAccount" $azureResourceGroupName = "MyResourceGroup" $azureWebAppName = "MyAzureWebApp" @@ -127,8 +127,8 @@ using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string[] environmentNames = { "Development", "Production" }; string[] roles = { "MyRole" }; @@ -198,8 +198,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -265,12 +265,12 @@ func main() { azureWebAppName := "MyWebApp" azureResourceGroupName := "MyResourceGroup" - apiURL, err := url.Parse("https://youroctourl") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YOURKEY" + APIKey := "API-YOUR-KEY" // Get space to work with space := GetSpace(apiURL, APIKey, spaceName) diff --git a/src/shared-content/scripts/add-domain-teams-scripts.include.md b/src/shared-content/scripts/add-domain-teams-scripts.include.md index ac315e8477..29a702c440 100644 --- a/src/shared-content/scripts/add-domain-teams-scripts.include.md +++ b/src/shared-content/scripts/add-domain-teams-scripts.include.md @@ -4,8 +4,8 @@ ```powershell $ErrorActionPreference = "Stop" -$octopusURL = "https://yoururl.com" # Replace with your instance URL -$octopusAPIKey = "YOUR API KEY" # Replace with a service account API Key +$octopusURL = "https://your-octopus-url.com" # Replace with your instance URL +$octopusAPIKey = "API-YOUR-KEY" # Replace with a service account API Key $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $maxRecordsToUpdate = 2 # The max number of records you want to update in this batch diff --git a/src/shared-content/scripts/add-environment-to-step-scripts.include.md b/src/shared-content/scripts/add-environment-to-step-scripts.include.md index 29a2fcac05..8d0c14f0ee 100644 --- a/src/shared-content/scripts/add-environment-to-step-scripts.include.md +++ b/src/shared-content/scripts/add-environment-to-step-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $projectName = "MyProject" @@ -47,8 +47,8 @@ Invoke-RestMethod -Method Put -Uri "$octopusURL/api/$($space.Id)/deploymentproce ```powershell Add-Type -Path "path\to\Octopus.Client.dll" -$apikey = "API-YOURAPIKEY" -$octopusURL = "https://youroctourl" +$apikey = "API-YOUR-KEY" +$octopusURL = "https://your-octopus-url" $spaceName = "default" $stepName = "Run a script" $environmentNames = @("Development", "Test") @@ -104,8 +104,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string projectName = "MyProject"; string[] environmentNames = { "Development", "Test" }; @@ -165,8 +165,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -222,11 +222,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourUrl") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" environmentNames := []string{"Development", "Production"} environments := []octopusdeploy.Environment{} diff --git a/src/shared-content/scripts/add-environment-to-team-scripts.include.md b/src/shared-content/scripts/add-environment-to-team-scripts.include.md index 68d8992829..99b9a0e69c 100644 --- a/src/shared-content/scripts/add-environment-to-team-scripts.include.md +++ b/src/shared-content/scripts/add-environment-to-team-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $teamName = "MyTeam" @@ -48,8 +48,8 @@ Invoke-RestMethod -Method Put -Uri "$octopusURL/api/scopeduserroles/$($scopedUse Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $environmentNames = @("Test", "Production") $teamName = "MyTeam" @@ -104,8 +104,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string[] environmentNames = { "Development", "Production" }; string teamName = "MyTeam"; @@ -156,8 +156,8 @@ import json import requests # Define Octopus server variables -octopus_server_uri = 'https://YourUrl' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' team_name = 'MyTeam' @@ -183,15 +183,15 @@ team = next((x for x in teams['Items'] if x['Name'] == team_name), None) uri = '{0}/userroles'.format(octopus_server_uri) response = requests.get(uri, headers=headers) response.raise_for_status -userroles = json.loads(response.content.decode('utf-8')) -userrole = next((x for x in userroles['Items'] if x['Name'] == user_role_name), None) +user_roles = json.loads(response.content.decode('utf-8')) +user_role = next((x for x in user_roles['Items'] if x['Name'] == user_role_name), None) # Get scoped user role uri = '{0}/{1}/teams/{2}/scopeduserroles'.format(octopus_server_uri, space['Id'], team['Id']) response = requests.get(uri, headers=headers) response.raise_for_status -scopeduserroles = json.loads(response.content.decode('utf-8')) -scopeduserrole = next((x for x in scopeduserroles['Items'] if x['UserRoleId'] == userrole['Id']), None) +scoped_user_roles = json.loads(response.content.decode('utf-8')) +scoped_user_role = next((x for x in scoped_user_roles['Items'] if x['UserRoleId'] == user_role['Id']), None) # Get environments uri = '{0}/{1}/environments'.format(octopus_server_uri, space['Id']) @@ -202,11 +202,11 @@ environments = json.loads(response.content.decode('utf-8')) # Loop through environment names for environment_name in environment_names: environment = next((x for x in environments['Items'] if x['Name'] == environment_name), None) - scopeduserrole['EnvironmentIds'].append(environment['Id']) + scoped_user_role['EnvironmentIds'].append(environment['Id']) # Update the user role -uri = '{0}/{1}/scopeduserroles/{2}'.format(octopus_server_uri, space['Id'], scopeduserrole['Id']) -response = requests.put(uri, headers=headers, json=scopeduserrole) +uri = '{0}/{1}/scopeduserroles/{2}'.format(octopus_server_uri, space['Id'], scoped_user_role['Id']) +response = requests.put(uri, headers=headers, json=scoped_user_role) response.raise_for_status ``` @@ -228,11 +228,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourUrl") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" environmentNames := []string{"Development", "Production"} teamName := "MyTeam" diff --git a/src/shared-content/scripts/add-environments-scripts.include.md b/src/shared-content/scripts/add-environments-scripts.include.md index 66c3e9f80d..a08019b1b3 100644 --- a/src/shared-content/scripts/add-environments-scripts.include.md +++ b/src/shared-content/scripts/add-environments-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctopus.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" @@ -49,8 +49,8 @@ $ErrorActionPreference = "Stop"; # https://www.nuget.org/packages/Octopus.Client/ Add-Type -Path 'path\to\Octopus.Client.dll' -$octopusURL = "https://youroctopus.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $environments = @("Development", "Test", "Staging", "Production") @@ -93,8 +93,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctopus.octopus.app"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; var environments = new List { "Development", "Staging", "Test", "Production" }; @@ -143,8 +143,8 @@ import json import requests from urllib.parse import quote -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -199,11 +199,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourUrl") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" environmentNames := []string{"Environment1", "Environment2"} diff --git a/src/shared-content/scripts/add-library-set-to-project-scripts.include.md b/src/shared-content/scripts/add-library-set-to-project-scripts.include.md index 58d80f0aed..2d64ef29ed 100644 --- a/src/shared-content/scripts/add-library-set-to-project-scripts.include.md +++ b/src/shared-content/scripts/add-library-set-to-project-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $projectName = "MyProject" $librarySetName = "MyLibrarySet" @@ -36,8 +36,8 @@ Invoke-RestMethod -Method Put -Uri "$octopusURL/api/$($space.Id)/projects/$($pro Add-Type -Path "c:\octopus.client\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $projectName = "MyProject" $librarySetName = "MyLibrarySet" @@ -81,8 +81,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string projectName = "MyProject"; string librarySetName = "MyLibrarySet"; @@ -147,8 +147,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # Define Octopus server variables -octopus_server_uri = 'https://YourUrl/api' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} project_name = "MyProject" library_set_name = "MyLibraryVariableSet" @@ -169,14 +169,14 @@ project = next((x for x in projects if x['Name'] == project_name), None) # Get library set uri = '{0}/{1}/libraryvariablesets'.format(octopus_server_uri, space['Id']) -librarysets = get_octopus_resource(uri, headers) -libraryset = next((x for x in librarysets if x['Name'] == library_set_name), None) +library_sets = get_octopus_resource(uri, headers) +library_set = next((x for x in library_sets if x['Name'] == library_set_name), None) # Check to see if project is none if project != None: - if libraryset != None: + if library_set != None: # Add set to project - project['IncludedLibraryVariableSetIds'].append(libraryset['Id']) + project['IncludedLibraryVariableSetIds'].append(library_set['Id']) # Update project uri = '{0}/{1}/projects/{2}'.format(octopus_server_uri, space['Id'], project['Id']) @@ -206,11 +206,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" librarySetName := "MyLibrarySet" diff --git a/src/shared-content/scripts/add-script-step-to-runbook-scripts.include.md b/src/shared-content/scripts/add-script-step-to-runbook-scripts.include.md index a1b8e51ac2..b7844bc684 100644 --- a/src/shared-content/scripts/add-script-step-to-runbook-scripts.include.md +++ b/src/shared-content/scripts/add-script-step-to-runbook-scripts.include.md @@ -9,8 +9,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "default"; var runbookName = "MyRunbook"; var stepName = "My new step"; diff --git a/src/shared-content/scripts/add-target-role-scripts.include.md b/src/shared-content/scripts/add-target-role-scripts.include.md index 84a1565948..03a914c32a 100644 --- a/src/shared-content/scripts/add-target-role-scripts.include.md +++ b/src/shared-content/scripts/add-target-role-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $machineName = "MyMachine" @@ -33,8 +33,8 @@ Invoke-RestMethod -Method Put -Uri "$octopusURL/api/$($space.Id)/machines/$($mac Add-Type -Path "c:\octopus.client\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $machineName = "MyMachine" $targetRole = "MyRole" @@ -74,11 +74,11 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string machineName = "MyMachine"; -string roleName = "testrole"; +string roleName = "TestRole"; // Create repository object var endpoint = new OctopusServerEndpoint(octopusURL, octopusAPIKey); @@ -113,8 +113,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -162,11 +162,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" targetName := "MyTargetName" roleName := "MyRoleName" diff --git a/src/shared-content/scripts/add-tenants-to-targets-scripts.include.md b/src/shared-content/scripts/add-tenants-to-targets-scripts.include.md index 49820d2651..ac84c981b0 100644 --- a/src/shared-content/scripts/add-tenants-to-targets-scripts.include.md +++ b/src/shared-content/scripts/add-tenants-to-targets-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" diff --git a/src/shared-content/scripts/add-update-project-variable-scripts.include.md b/src/shared-content/scripts/add-update-project-variable-scripts.include.md index fbfb83a7b3..0588933a66 100644 --- a/src/shared-content/scripts/add-update-project-variable-scripts.include.md +++ b/src/shared-content/scripts/add-update-project-variable-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" $projectName = "MyProject" @@ -59,8 +59,8 @@ Invoke-RestMethod -Method Put -Uri "$octopusURL/api/$($space.Id)/variables/$($pr Add-Type -Path "c:\octopus.client\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $projectName = "MyProject" $variable = @{ @@ -126,8 +126,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string projectName = "MyProject"; System.Collections.Hashtable variable = new System.Collections.Hashtable() @@ -219,8 +219,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): return items # Define Octopus server variables -octopus_server_uri = 'https://YourURL/api' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} project_name = "MyProject" space_name = "Default" @@ -273,11 +273,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" variable := octopusdeploy.NewVariable("MyVariable") variable.IsSensitive = false diff --git a/src/shared-content/scripts/bulk-add-tenants-to-projects.include.md b/src/shared-content/scripts/bulk-add-tenants-to-projects.include.md index 24af1c1ff0..285bf7e54c 100644 --- a/src/shared-content/scripts/bulk-add-tenants-to-projects.include.md +++ b/src/shared-content/scripts/bulk-add-tenants-to-projects.include.md @@ -2,8 +2,8 @@ PowerShell (REST API) ```powershell -$octopusUrl = "YOUR URL" -$octopusApiKey = "YOUR API KEY" +$octopusUrl = "https://your-octopus-url" +$octopusApiKey = "API-YOUR-KEY" $spaceName = "YOUR SPACE NAME" $projectName = "PROJECT NAME TO ADD" $environmentNameList = "ENVIRONMENTS TO TIE TO" # "Development,Test" @@ -102,7 +102,7 @@ function Invoke-OctopusApi Write-OctopusVerbose "Ignoring cache." } - Write-OctopusVerbose "No data to post or put, calling bog standard invoke-restmethod for $url" + Write-OctopusVerbose "No data to post or put, calling bog standard Invoke-RestMethod for $url" $result = Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -ContentType 'application/json; charset=utf-8' if ($cachedResults.ContainsKey($url) -eq $true) @@ -229,9 +229,9 @@ $spaceId = $space.Id $project = Get-OctopusItemByName -itemName $projectName -itemType "Project" -endpoint "projects" -spaceId $spaceId -defaultUrl $octopusUrl -octopusApiKey $octopusApiKey $projectId = $project.Id -$splitEnvironmentlist = $environmentNameList -split "," +$splitEnvironmentList = $environmentNameList -split "," $environmentList = @() -foreach ($environmentName in $splitEnvironmentlist) +foreach ($environmentName in $splitEnvironmentList) { $environment = Get-OctopusItemByName -itemName $environmentName -itemType "Environment" -endpoint "environments" -spaceId $spaceId -defaultUrl $octopusUrl -octopusApiKey $octopusApiKey $environmentList += $environment.Id @@ -307,8 +307,8 @@ foreach ($item in $changeReport) Add-Type -Path 'C:\Octopus.Client\Octopus.Client.dll' # Declare variables -$octopusUrl = "YOUR URL" -$octopusApiKey = "YOUR API KEY" +$octopusUrl = "https://your-octopus-url" +$octopusApiKey = "API-YOUR-KEY" $spaceName = "YOUR SPACE NAME" $projectName = "PROJECT NAME TO ADD" $environmentNameList = "ENVIRONMENTS TO TIE TO" # "Development,Test" @@ -412,8 +412,8 @@ using System.Linq; // If using .net Core, be sure to add the NuGet package of System.Security.Permissions -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; var projectName = "MyProject"; var environmentNameList = new string[] { "Environment", "List"}; @@ -545,10 +545,10 @@ def get_octopus_resource(uri, headers, skip_count = 0): return items # Define Octopus server variables -octopus_server_uri = 'https://YourURL/api' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} -project_name = "MyProject" +project_name = 'MyProject' environment_name_list = ['Environment', 'List'] tenant_tag = 'TENANT TAG TO FILTER ON' #Format = [Tenant Tag Set Name]/[Tenant Tag] "Tenant Type/Customer" max_number_tenants = 1 @@ -635,11 +635,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" environmentNameList := []string{"Environment", "List"} diff --git a/src/shared-content/scripts/cancel-queued-deployments-scripts.include.md b/src/shared-content/scripts/cancel-queued-deployments-scripts.include.md index e4efa044e3..b8c4acbaf2 100644 --- a/src/shared-content/scripts/cancel-queued-deployments-scripts.include.md +++ b/src/shared-content/scripts/cancel-queued-deployments-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" @@ -44,8 +44,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "http://octotemp"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; // Create repository object @@ -91,8 +91,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -148,11 +148,11 @@ import ( func main() { - apiURL, err := url.Parse("http://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YOURAPIKEY" + APIKey := "API-YOUR-KEY" spaceName := "Default" // Get reference to space diff --git a/src/shared-content/scripts/change-feed-scripts.include.md b/src/shared-content/scripts/change-feed-scripts.include.md index 4c1deb20a1..74b1d1abf1 100644 --- a/src/shared-content/scripts/change-feed-scripts.include.md +++ b/src/shared-content/scripts/change-feed-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $feedName = "nuget.org" @@ -35,8 +35,8 @@ Invoke-RestMethod -Uri "$octopusURL/api/$($space.Id)/feeds/$($feed.Id)" -Body ($ Add-Type -Path "C:\Octo\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $feedName = "nuget.org" @@ -81,8 +81,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "Default"; string feedName = "nuget.org"; @@ -123,8 +123,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" diff --git a/src/shared-content/scripts/change-machine-machinepolicy-scripts.include.md b/src/shared-content/scripts/change-machine-machinepolicy-scripts.include.md index 09ca11b9a6..b24c892987 100644 --- a/src/shared-content/scripts/change-machine-machinepolicy-scripts.include.md +++ b/src/shared-content/scripts/change-machine-machinepolicy-scripts.include.md @@ -1,12 +1,12 @@ -
+
PowerShell (REST API) ```powershell $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $machineName = "MyMachine" @@ -27,7 +27,7 @@ Invoke-RestMethod -Method Put -Uri "$octopusURL/api/$($space.Id)/machines/$($mac ```
-
+
PowerShell (Octopus.Client) ```powershell @@ -35,8 +35,8 @@ Invoke-RestMethod -Method Put -Uri "$octopusURL/api/$($space.Id)/machines/$($mac Add-Type -Path "c:\octopus.client\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $machineName = "MyMachine" $machinePolicyName = "MyPolicy" @@ -68,7 +68,7 @@ catch ```
-
+
C# ```csharp @@ -79,8 +79,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string machineName = "MyMachine"; string machinePolicyName = "TestPolicy"; @@ -114,15 +114,15 @@ catch (Exception ex) ```
-
+
Python3 ```python import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -153,7 +153,7 @@ response.raise_for_status() ```
-
+
Go ```go @@ -170,11 +170,11 @@ import ( func main() { - apiURL, err := url.Parse("https://youroctourl") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" newMachinePolicyName := "MyMachinePolicy" machineName := "MyMachine" diff --git a/src/shared-content/scripts/change-user-domain-scripts.include.md b/src/shared-content/scripts/change-user-domain-scripts.include.md index 01e02d218c..55a7dc8302 100644 --- a/src/shared-content/scripts/change-user-domain-scripts.include.md +++ b/src/shared-content/scripts/change-user-domain-scripts.include.md @@ -4,8 +4,8 @@ ```powershell $ErrorActionPreference = "Stop" -$octopusURL = "https://yoururl.com" # Replace with your instance URL -$octopusAPIKey = "YOUR API KEY" # Replace with a service account API Key +$octopusURL = "https://your-octopus-url.com" # Replace with your instance URL +$octopusAPIKey = "API-YOUR-KEY" # Replace with a service account API Key $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $maxRecordsToUpdate = 2 # The max number of records you want to update in this batch @@ -105,7 +105,7 @@ while (1 -eq 1) #Continue until we reach the end of the user list or until we go $claimName = $claimName.Name $claim = $identity.Claims.$ClaimName - if ($claim.Value.ToLower() -eq $expectedMatch.Tolower() -and $claim.IsIdentifyingClaim -eq $true) + if ($claim.Value.ToLower() -eq $expectedMatch.ToLower() -and $claim.IsIdentifyingClaim -eq $true) { Write-Host "Found the user's new domain record, add that to Octopus Deploy" $userRecordToUpdate.Identities += $identity diff --git a/src/shared-content/scripts/check-for-tentacle-upgrades-scripts.include.md b/src/shared-content/scripts/check-for-tentacle-upgrades-scripts.include.md index 24051a3a9f..3e48e04cd0 100644 --- a/src/shared-content/scripts/check-for-tentacle-upgrades-scripts.include.md +++ b/src/shared-content/scripts/check-for-tentacle-upgrades-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app/api" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url/api" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" @@ -43,8 +43,8 @@ $workers = Invoke-RestMethod -Method Get -Uri "$octopusSpaceUrl/workers/all" -He # Load octopus.client assembly Add-Type -Path 'C:\path\to\Octopus.Client.dll' -$octopusURL = "https://your.octopus.app/api" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url/api" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $endpoint = New-Object Octopus.Client.OctopusServerEndpoint $octopusURL, $octopusAPIKey @@ -90,8 +90,8 @@ using Octopus.Client; using Octopus.Client.Model; using Octopus.Client.Model.Endpoints; -var octopusURL = "https://your.octopus.app"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var endpoint = new OctopusServerEndpoint(octopusURL, octopusAPIKey); var repository = new OctopusRepository(endpoint); @@ -147,8 +147,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -202,11 +202,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" // Get reference to space diff --git a/src/shared-content/scripts/clear-sensitive-variables-scripts.include.md b/src/shared-content/scripts/clear-sensitive-variables-scripts.include.md index adfcd82a49..baaf52264e 100644 --- a/src/shared-content/scripts/clear-sensitive-variables-scripts.include.md +++ b/src/shared-content/scripts/clear-sensitive-variables-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } Function Clear-SensitiveVariables @@ -79,8 +79,8 @@ foreach ($variableSet in $variableSets) Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $endpoint = New-Object Octopus.Client.OctopusServerEndpoint $octopusURL, $octopusAPIKey @@ -145,8 +145,8 @@ catch #r "path\to\Octopus.Client.dll" // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "default"; // Create repository object @@ -240,8 +240,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): return items # Define Octopus server variables -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "MySpace" @@ -309,12 +309,12 @@ import ( func main() { - apiURL, err := url.Parse("http://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" - spaceName := "MySace" + APIKey := "API-YOUR-KEY" + spaceName := "MySpace" // Get reference to space space := GetSpace(apiURL, APIKey, spaceName) @@ -345,18 +345,18 @@ func main() { // Loop through sets for i := 0; i < len(librarySets); i++ { - librarysetVariables := GetVariables(apiURL, APIKey, space, librarySets[i].ID) + librarySetVariables := GetVariables(apiURL, APIKey, space, librarySets[i].ID) variablesUpdated := false - for j := 0; j < len(librarysetVariables.Variables); j++ { - if librarysetVariables.Variables[j].IsSensitive { - librarysetVariables.Variables[j].Value = "" + for j := 0; j < len(librarySetVariables.Variables); j++ { + if librarySetVariables.Variables[j].IsSensitive { + librarySetVariables.Variables[j].Value = "" variablesUpdated = true } } if variablesUpdated { println("Variables for " + librarySets[i].Name + " have been updated") - UpdateVariables(apiURL, APIKey, space, librarysetVariables.OwnerID, librarysetVariables) + UpdateVariables(apiURL, APIKey, space, librarySetVariables.OwnerID, librarySetVariables) } } } diff --git a/src/shared-content/scripts/create-a-lifecycle-scripts.include.md b/src/shared-content/scripts/create-a-lifecycle-scripts.include.md index a365692a3a..82e968fe0e 100644 --- a/src/shared-content/scripts/create-a-lifecycle-scripts.include.md +++ b/src/shared-content/scripts/create-a-lifecycle-scripts.include.md @@ -57,8 +57,8 @@ function Get-OctopusItems return $items } -$apikey = 'API-YourAPIKey' # Get this from your profile -$OctopusUrl = 'https://YourURL' # Your Octopus Server address +$OctopusUrl = 'https://your-octopus-url' # Your Octopus Server address +$apikey = 'API-YOUR-KEY' # Get this from your profile $spaceName = "Default" # Create headers for API calls @@ -110,8 +110,8 @@ else ```powershell # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $lifecycleName = "MyLifecycle" @@ -149,8 +149,8 @@ using System; using System.Linq; // If using .net Core, be sure to add the NuGet package of System.Security.Permissions -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; var lifecycleName = "MyLifecycle"; @@ -217,7 +217,7 @@ def get_octopus_resource(uri, headers, skip_count = 0): return items # Define Octopus server variables -octopus_server_uri = 'https://your.octopus.app' +octopus_server_uri = 'https://your-octopus-url' octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" @@ -278,11 +278,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "MySpace" lifecycleName := "MyLifecycle" diff --git a/src/shared-content/scripts/create-a-tenant-scripts.include.md b/src/shared-content/scripts/create-a-tenant-scripts.include.md index 8454b9974a..a5a3618aaa 100644 --- a/src/shared-content/scripts/create-a-tenant-scripts.include.md +++ b/src/shared-content/scripts/create-a-tenant-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } # Provide the space name $spaceName = "Default" @@ -16,7 +16,7 @@ $tenantName = "MyTenant" $projectNames = @("MyProject") # provide the environments to connect to the projects. $environmentNames = @("Development", "Test") -# Optionally, provide existing tenant tagsets you wish to apply. +# Optionally, provide existing tenant tag sets you wish to apply. $tenantTags = @("MyTagSet/Beta", "MyTagSet/Stable") # Format: TagSet/Tag # Get space @@ -65,8 +65,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/tenants" -Body Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctopusurl" -$octopusAPIKey = "API-KEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $tenantName = "MyTenant" $projectNames = @("MyProject") @@ -89,7 +89,7 @@ try # Get projects $projects = $repositoryForSpace.Projects.GetAll() | Where-Object {$projectNames -contains $_.Name} - # Create projectenvironments + # Create project environments $projectEnvironments = New-Object Octopus.Client.Model.ReferenceCollection foreach ($environment in $environments) { @@ -133,8 +133,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string tenantName = "MyTenant"; string[] projectNames = { "MyProject" }; @@ -158,7 +158,7 @@ try // Get environments var environments = repositoryForSpace.Environments.FindByNames(environmentNames); - // Create projectenvironments + // Create project environments Octopus.Client.Model.ReferenceCollection projectEnvironments = new ReferenceCollection(); foreach (var environment in environments) { @@ -230,8 +230,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): return items # Define Octopus server variables -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' tenant_name = 'MyTenant' @@ -300,11 +300,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" tenantName := "MyTenant" environmentNames := []string{"Development", "Test"} diff --git a/src/shared-content/scripts/create-and-deploy-release-scripts.include.md b/src/shared-content/scripts/create-and-deploy-release-scripts.include.md index 45cd5ad25b..733a3bb4eb 100644 --- a/src/shared-content/scripts/create-and-deploy-release-scripts.include.md +++ b/src/shared-content/scripts/create-and-deploy-release-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusBaseURL = "https://youroctourl/api" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusBaseURL = "https://your-octopus-url/api" +$octopusAPIKey = "API-YOUR-KEY" $headers = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" @@ -60,8 +60,8 @@ $deploymentResponse = Invoke-WebRequest -Uri $octopusSpaceUrl/deployments/create ```powershell Add-Type -Path 'path\to\Octopus.Client.dll' -$octopusBaseURL = "https://youroctourl/" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusBaseURL = "https://your-octopus-url/" +$octopusAPIKey = "API-YOUR-KEY" $endpoint = New-Object Octopus.Client.OctopusServerEndpoint($octopusBaseURL, $octopusAPIKey) $repository = New-Object Octopus.Client.OctopusRepository($endpoint) @@ -150,8 +150,8 @@ catch { using Octopus.Client; using Octopus.Client.Model; -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var endpoint = new OctopusServerEndpoint(octopusURL, octopusAPIKey); var repository = new OctopusRepository(endpoint); @@ -274,8 +274,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): return items # Define Octopus server variables -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' project_name = 'MyProject' @@ -387,11 +387,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" channelName := "Default" environmentName := "Development" @@ -417,7 +417,7 @@ func main() { releaseVersion := "" - // Check to see if the nexversionincrement property is nil + // Check to see if the next version increment property is nil if nil == template["NextVersionIncrement"] { // Project uses a package instead of a template, get the latest version of the package deploymentProcess, err := client.DeploymentProcesses.GetByID(project.DeploymentProcessID) @@ -675,8 +675,8 @@ import { Client, CreateDeploymentUntenantedCommandV1, CreateReleaseCommandV1, De const configuration: ClientConfiguration = { userAgentApp: 'CustomTypeScript', - instanceURL: 'https://your.octopus.app/', - apiKey: 'api-key' + instanceURL: 'https://your-octopus-url/', + apiKey: 'API-YOUR-KEY' }; const client = await Client.create(configuration); diff --git a/src/shared-content/scripts/create-and-deploy-release-with-tenants-scripts.include.md b/src/shared-content/scripts/create-and-deploy-release-with-tenants-scripts.include.md index 1ac2cd2036..990265b368 100644 --- a/src/shared-content/scripts/create-and-deploy-release-with-tenants-scripts.include.md +++ b/src/shared-content/scripts/create-and-deploy-release-with-tenants-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusBaseURL = "https://youroctourl/api" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusBaseURL = "https://your-octopus-url/api" +$octopusAPIKey = "API-YOUR-KEY" $headers = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" @@ -96,8 +96,8 @@ $tenantNames | ForEach-Object { ```powershell Add-Type -Path 'path\to\Octopus.Client.dll' -$octopusBaseURL = "https://youroctourl/" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusBaseURL = "https://your-octopus-url/" +$octopusAPIKey = "API-YOUR-KEY" $endpoint = New-Object Octopus.Client.OctopusServerEndpoint($octopusBaseURL, $octopusAPIKey) $repository = New-Object Octopus.Client.OctopusRepository($endpoint) @@ -194,8 +194,8 @@ catch { using Octopus.Client; using Octopus.Client.Model; -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var endpoint = new OctopusServerEndpoint(octopusURL, octopusAPIKey); var repository = new OctopusRepository(endpoint); @@ -326,8 +326,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): return items # Define Octopus server variables -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' project_name = 'MyProject' @@ -450,11 +450,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" channelName := "Default" environmentName := "Development" @@ -481,7 +481,7 @@ func main() { releaseVersion := "" - // Check to see if the nexversionincrement property is nil + // Check to see if the next version increment property is nil if nil == template["NextVersionIncrement"] { // Project uses a package instead of a template, get the latest version of the package deploymentProcess, err := client.DeploymentProcesses.GetByID(project.DeploymentProcessID) diff --git a/src/shared-content/scripts/create-and-publish-runbook-scripts.include.md b/src/shared-content/scripts/create-and-publish-runbook-scripts.include.md index db96f85899..7f5f28e444 100644 --- a/src/shared-content/scripts/create-and-publish-runbook-scripts.include.md +++ b/src/shared-content/scripts/create-and-publish-runbook-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" $projectName = "MyProject" @@ -71,8 +71,8 @@ Write-Host "Published runbook snapshot: $($runbookPublishedSnapshot.Id) ($($runb ```powershell # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $projectName = "MyProject" $runbook = "MyRunbook" @@ -138,8 +138,8 @@ using System.Linq; // If using .net Core, be sure to add the NuGet package of System.Security.Permissions -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; var projectName = "MyProject"; var runbookName = "MyRunbook"; @@ -229,8 +229,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): return items # Define Octopus server variables -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' project_name = 'MyProject' @@ -322,7 +322,7 @@ type runbooksnapshot struct { func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } diff --git a/src/shared-content/scripts/create-api-key-scripts.include.md b/src/shared-content/scripts/create-api-key-scripts.include.md index 7674d39def..a7c5b133f6 100644 --- a/src/shared-content/scripts/create-api-key-scripts.include.md +++ b/src/shared-content/scripts/create-api-key-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } # UserName of the user for which the API key will be created. You can check this value from the web portal under Configuration/Users @@ -42,8 +42,8 @@ Write-Output "API Key created: $($CreateAPIKeyResponse.apikey)" Add-Type -Path "C:\octo\Octopus.Client.dll" # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" # Purpose of the API Key. This field is mandatory. $APIKeyPurpose = "" @@ -82,8 +82,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string apiKeyPurpose = "Key used with C# application"; // Create repository object @@ -149,8 +149,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): return items # Define Octopus server variables -octopus_server_uri = 'https://YourUrl' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' user_name = 'MyUser' @@ -193,11 +193,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourUrl") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" userName := "MyUser" purpose := "Descriptive purpose" diff --git a/src/shared-content/scripts/create-aws-account-scripts.include.md b/src/shared-content/scripts/create-aws-account-scripts.include.md index 5baa6cb6c4..969e7f872c 100644 --- a/src/shared-content/scripts/create-aws-account-scripts.include.md +++ b/src/shared-content/scripts/create-aws-account-scripts.include.md @@ -35,8 +35,8 @@ function Get-OctopusItems return $items } -$apikey = 'API-YOURAPIKEY' # Get this from your profile -$OctopusUrl = 'https://youroctourl' # Your Octopus Server address +$OctopusUrl = 'https://your-octopus-url' # Your Octopus Server address +$apikey = 'API-YOUR-KEY' # Get this from your profile $spaceName = "default" $spaceId = "" @@ -65,7 +65,7 @@ $jsonPayload = @{ } Name = $accountName Description = $accountDescription - TenantedDeploymentparticipation = $accountTenantParticipation + TenantedDeploymentParticipation = $accountTenantParticipation TenantTags = $accountTenantTags TenantIds = $accountTenantIds EnvironmentIds = $accountEnvironmentIds @@ -93,8 +93,8 @@ Invoke-RestMethod -Method Post -Uri "$OctopusUrl/api/$spaceId/accounts" -Body ($ ```powershell # Load assembly Add-Type -Path 'C:\Octopus.Client\Octopus.Client.dll' -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" # AWS Credentials $awsAccessKey = "AWSAccessKey" @@ -151,8 +151,8 @@ catch using Octopus.Client; using Octopus.Client.Model; -var OctopusURL = "https://youroctourl"; -var OctopusAPIKey = "API-YOURAPIKEY"; +var OctopusURL = "https://your-octopus-url"; +var OctopusAPIKey = "API-YOUR-KEY"; // Azure specific details string awsAccessKey = "AWS Access Key"; @@ -207,8 +207,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' @@ -261,11 +261,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" awsAccountName := "MyAWSAccount" awsAccessKey := "MyAccessKey" awsSecretKey := "MySecretKey" diff --git a/src/shared-content/scripts/create-azure-service-principal-scripts.include.md b/src/shared-content/scripts/create-azure-service-principal-scripts.include.md index d180fe6ef2..0a4b9cbc50 100644 --- a/src/shared-content/scripts/create-azure-service-principal-scripts.include.md +++ b/src/shared-content/scripts/create-azure-service-principal-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" @@ -60,8 +60,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/accounts" -Bod ```powershell # Load assembly Add-Type -Path 'path\to\Octopus.Client.dll' -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" # Azure service principle details $azureSubscriptionNumber = "Subscription-Guid" @@ -122,8 +122,8 @@ catch using Octopus.Client; using Octopus.Client.Model; -var OctopusURL = "https://youroctourl"; -var OctopusAPIKey = "API-YOURAPIKEY"; +var OctopusURL = "https://your-octopus-url"; +var OctopusAPIKey = "API-YOUR-KEY"; // Azure specific details string azureSubscriptionNumber = "Subscription-Guid"; @@ -181,8 +181,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' @@ -238,11 +238,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" accountName := "MyAzureAccount" subscriptionID := "MySubscriptionId" tenantID := "MyTenantId" diff --git a/src/shared-content/scripts/create-certificate-scripts.include.md b/src/shared-content/scripts/create-certificate-scripts.include.md index 84aa33a414..7388f2a513 100644 --- a/src/shared-content/scripts/create-certificate-scripts.include.md +++ b/src/shared-content/scripts/create-certificate-scripts.include.md @@ -5,15 +5,15 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" # Certificate details $certificateName = "MyCertificate" $certificateNotes = "" -$certificateFilePath = "path\to\pfxfile.pfx" +$certificateFilePath = "path\to\pfx_file.pfx" $certificatePfxPassword = "PFX-file-password" $certificateEnvironmentIds = @() $certificateTenantIds = @() @@ -58,8 +58,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/certificates" Add-Type -Path 'path\to\Octopus.Client.dll' # Declare working variables -$apikey = 'API-YOURAPIKEY' # Get this from your profile -$octopusURI = 'https://youroctourl' # Your server address +$octopusURI = 'https://your-octopus-url' # Your server address +$apikey = 'API-YOUR-KEY' # Get this from your profile $spaceName = 'default' $endpoint = New-Object Octopus.Client.OctopusServerEndpoint $octopusURI,$apikey @@ -73,7 +73,7 @@ try $repositoryForSpace = $client.ForSpace($space) # Fill in certificate details - $pfxFilePath = "path\to\pfxfile.pfx" # note: other file formats are supported https://octopus.com/docs/deploying-applications/certificates/file-formats + $pfxFilePath = "path\to\pfx_file.pfx" # note: other file formats are supported https://octopus.com/docs/deploying-applications/certificates/file-formats $pfxBase64 = [Convert]::ToBase64String((Get-Content -Path $pfxFilePath -Encoding Byte)) $pfxPassword = "PFX-file-password" $certificateName = "MyCertificate" # The display name in Octopus @@ -100,9 +100,9 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; -string pfxFilePath = "path\\to\\pfxfile.pfx"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; +string pfxFilePath = "path\\to\\pfx_file.pfx"; string pfxFilePassword = "PFX-file-password"; string certificateName = "MyCertificate"; string spaceName = "default"; @@ -141,8 +141,8 @@ import json import requests import base64 -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -222,11 +222,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" certificateName := "MyCertificate" pathToCertificate := "path:\\To\\PFXFile.pfx" diff --git a/src/shared-content/scripts/create-channel-scripts.include.md b/src/shared-content/scripts/create-channel-scripts.include.md index aa82eebc21..caff59c0f4 100644 --- a/src/shared-content/scripts/create-channel-scripts.include.md +++ b/src/shared-content/scripts/create-channel-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" $projectId = "Projects-101" @@ -35,8 +35,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/channels" -Bod ```powershell # Load assembly Add-Type -Path 'C:\Octopus.Client\Octopus.Client.dll' -$octopusURL = "https://YourUrl" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $projectName = "MyProject" $channelName = "NewChannel" @@ -52,7 +52,7 @@ $repositoryForSpace = $client.ForSpace($space) # Get project $project = $repositoryForSpace.Projects.FindByName($projectName) -# Createw new channel object +# Create new channel object $channel = New-Object Octopus.Client.Model.ChannelResource $channel.Name = $channelName $channel.ProjectId = $project.Id @@ -73,8 +73,8 @@ $repositoryForSpace.Channels.Create($channel) using Octopus.Client; using Octopus.Client.Model; -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; var projectName = "MyProject"; var channelName = "NewChannel"; @@ -141,8 +141,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): return items # Define Octopus server variables -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" project_name = "MyProject" @@ -188,11 +188,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" channelName := "NewChannel" diff --git a/src/shared-content/scripts/create-google-cloud-account-scripts.include.md b/src/shared-content/scripts/create-google-cloud-account-scripts.include.md index f1119b3e0b..9961eaf4fc 100644 --- a/src/shared-content/scripts/create-google-cloud-account-scripts.include.md +++ b/src/shared-content/scripts/create-google-cloud-account-scripts.include.md @@ -6,8 +6,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" @@ -21,7 +21,7 @@ $accountDescription = "A Google Cloud account for my project" $accountTenantParticipation = "Untenanted" # Google Cloud JSON key file -$jsonKeyPath = "/path/to/jsonkeyfile.json" +$jsonKeyPath = "/path/to/json_key_file.json" # (Optional) Tenant tags e.g.: "AWS Region/California" $accountTenantTags = @() @@ -74,8 +74,8 @@ $accountResponse # You can get this dll from your Octopus Server/Tentacle installation directory or from # https://www.nuget.org/packages/Octopus.Client/ Add-Type -Path 'path\to\Octopus.Client.dll' -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" # Octopus Account name @@ -88,7 +88,7 @@ $accountDescription = "A Google Cloud account for my project" $accountTenantParticipation = "Untenanted" # Google Cloud JSON key file -$jsonKeyPath = "/path/to/jsonkeyfile.json" +$jsonKeyPath = "/path/to/json_key_file.json" # (Optional) Tenant tags e.g.: "AWS Region/California" $accountTenantTags = @() @@ -154,8 +154,8 @@ catch using Octopus.Client; using Octopus.Client.Model; -var OctopusURL = "https://your.octopus.app"; -var OctopusAPIKey = "API-YOURAPIKEY"; +var OctopusURL = "https://your-octopus-url"; +var OctopusAPIKey = "API-YOUR-KEY"; string spaceName = "Default"; // Octopus Account name @@ -168,7 +168,7 @@ string accountDescription = "A Google Cloud account for my project"; Octopus.Client.Model.TenantedDeploymentMode octopusAccountTenantParticipation = Octopus.Client.Model.TenantedDeploymentMode.TenantedOrUntenanted; // Google Cloud JSON key file -string jsonKeyPath = @"/path/to/jsonkeyfile.json"; +string jsonKeyPath = @"/path/to/json_key_file.json"; string jsonKeyBase64 = ""; // (Optional) Tenant tags e.g.: "AWS Region/California" @@ -233,8 +233,8 @@ import json import requests import base64 -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' @@ -246,8 +246,8 @@ tenant_tags = [] tenant_ids = [] environment_ids = [] -json_keyfile_path = '/path/to/jsonkeyfile.json' -json_data = open(json_keyfile_path, 'rb').read() +json_key_file_path = '/path/to/json_key_file.json' +json_data = open(json_key_file_path, 'rb').read() json_key_base64 = base64.b64encode(json_data) account = { @@ -293,7 +293,7 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } diff --git a/src/shared-content/scripts/create-nuget-feed-scripts.include.md b/src/shared-content/scripts/create-nuget-feed-scripts.include.md index 4f59eca4a0..a8e22829b8 100644 --- a/src/shared-content/scripts/create-nuget-feed-scripts.include.md +++ b/src/shared-content/scripts/create-nuget-feed-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $feedName = "nuget.org" @@ -55,8 +55,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/feeds" -Body ( Add-Type -Path "C:\Octo\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $feedName = "nuget.org" @@ -120,8 +120,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "Default"; string feedName = "nuget.org 3"; @@ -178,8 +178,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' @@ -225,7 +225,7 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } diff --git a/src/shared-content/scripts/create-project-scripts.include.md b/src/shared-content/scripts/create-project-scripts.include.md index 49b44b833c..c4ab025ae2 100644 --- a/src/shared-content/scripts/create-project-scripts.include.md +++ b/src/shared-content/scripts/create-project-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $projectName = "MyProject" @@ -44,8 +44,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/projects" -Bod Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $projectName = "MyProject" $projectGroupName = "Default project group" @@ -89,8 +89,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string projectName = "MyProject"; string projectGroupName = "Default project group"; @@ -132,8 +132,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -185,11 +185,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" projectGroupName := "MyProjectGroup" diff --git a/src/shared-content/scripts/create-projectgroup-scripts.include.md b/src/shared-content/scripts/create-projectgroup-scripts.include.md index 1f94b2d6d3..9c56c54b57 100644 --- a/src/shared-content/scripts/create-projectgroup-scripts.include.md +++ b/src/shared-content/scripts/create-projectgroup-scripts.include.md @@ -1,4 +1,4 @@ -
+
PowerShell (REST API) ```powershell @@ -39,7 +39,7 @@ function Get-OctopusItems # Store call results $items += $resultSet.Items - # Check to see if resultset is bigger than page amount + # Check to see if result set is bigger than page amount if (($resultSet.Items.Count -gt 0) -and ($resultSet.Items.Count -eq $resultSet.ItemsPerPage)) { # Increment skip count @@ -61,8 +61,8 @@ function Get-OctopusItems # Define working variables -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" $projectGroupName = "MyProjectGroup" @@ -87,14 +87,14 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/projectgroups" ```
-
+
PowerShell (Octopus.Client) ```powershell # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $projectGroupName = "MyProjectGroup" $projectGroupDescription = "MyDescription" @@ -118,7 +118,7 @@ $repositoryForSpace.ProjectGroups.Create($projectGroup) ```
-
+
C# ```csharp @@ -128,7 +128,7 @@ $repositoryForSpace.ProjectGroups.Create($projectGroup) using Octopus.Client; using Octopus.Client.Model; -var octopusURL = "https://your.octopus.app"; +var octopusURL = "https://your-octopus-url"; var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; var projectGroupName = "MyProjectGroup"; @@ -155,7 +155,7 @@ spaceRepository.ProjectGroups.Create(projectGroup); ```
-
+
Python3 ```python @@ -195,7 +195,7 @@ def get_octopus_resource(uri, headers, skip_count = 0): return items # Define Octopus server variables -octopus_server_uri = 'https://your.octopus.app' +octopus_server_uri = 'https://your-octopus-url' octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" @@ -224,7 +224,7 @@ response.raise_for_status() ```
-
+
Go ```go @@ -240,11 +240,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectGroupName := "MyProjectGroup" projectGroupDescription := "My description" @@ -299,7 +299,7 @@ func GetSpace(octopusURL *url.URL, APIKey string, spaceName string) *octopusdepl ```
-
+
Java ```java diff --git a/src/shared-content/scripts/create-release-with-version-scripts.include.md b/src/shared-content/scripts/create-release-with-version-scripts.include.md index 048c35ffa1..e336c4d45b 100644 --- a/src/shared-content/scripts/create-release-with-version-scripts.include.md +++ b/src/shared-content/scripts/create-release-with-version-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $projectName = "MyProject" $releaseVersion = "1.0.0.0" @@ -62,8 +62,8 @@ $release Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $projectName = "MyProject" $channelName = "default" @@ -137,8 +137,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-APIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "default"; string projectName = "MyProject"; string channelName = "Default"; @@ -243,8 +243,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): return items # Define Octopus server variables -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' project_name = 'MyProject' @@ -326,11 +326,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" channelName := "Default" environmentName := "Development" @@ -356,7 +356,7 @@ func main() { releaseVersion := "" - // Check to see if the nexversionincrement property is nil + // Check to see if the next version increment property is nil if nil == template["NextVersionIncrement"] { // Project uses a package instead of a template, get the latest version of the package deploymentProcess, err := client.DeploymentProcesses.GetByID(project.DeploymentProcessID) diff --git a/src/shared-content/scripts/create-runbook-scripts.include.md b/src/shared-content/scripts/create-runbook-scripts.include.md index d9dd11dbae..f8948e8902 100644 --- a/src/shared-content/scripts/create-runbook-scripts.include.md +++ b/src/shared-content/scripts/create-runbook-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $projectName = "MyProject" @@ -42,8 +42,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/runbooks" -Bod Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $projectName = "MyProject" $runbookName = "MyRunbook" @@ -94,8 +94,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string projectName = "MyProject"; string runbookName = "MyRunbook"; @@ -144,8 +144,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -199,11 +199,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" runbookName := "MyRunbook" diff --git a/src/shared-content/scripts/create-scheduled-runbook-trigger-scripts.include.md b/src/shared-content/scripts/create-scheduled-runbook-trigger-scripts.include.md index eed660369c..70dea13e6a 100644 --- a/src/shared-content/scripts/create-scheduled-runbook-trigger-scripts.include.md +++ b/src/shared-content/scripts/create-scheduled-runbook-trigger-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" @@ -94,8 +94,8 @@ Write-Host "Created runbook trigger: $($runbookScheduledTrigger.Id) ($runbookTri Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $projectName = "MyProject" @@ -177,8 +177,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://your.octopus.app"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; // Define working variables string spaceName = "default"; @@ -270,8 +270,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): diff --git a/src/shared-content/scripts/create-script-step-scripts.include.md b/src/shared-content/scripts/create-script-step-scripts.include.md index 4b5d96f67c..96660f3a44 100644 --- a/src/shared-content/scripts/create-script-step-scripts.include.md +++ b/src/shared-content/scripts/create-script-step-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $role = "My role" @@ -79,12 +79,12 @@ Invoke-RestMethod -Method Put -Uri "$octopusURL/api/$($space.Id)/deploymentproce PowerShell (Octopus.Client) ```powershell -# Load Octopous Client assembly +# Load Octopus Client assembly Add-Type -Path 'c:\octopus.client\Octopus.Client.dll' # Declare Octopus variables -$apikey = 'API-YOURAPIKEY' -$octopusURI = 'https://youroctourl' +$apikey = 'API-YOUR-KEY' +$octopusURI = 'https://your-octopus-url' $projectName = "MyProject" # Create repository object @@ -143,8 +143,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "http://OctoTemp"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string stepName = "Run a script"; string roleName = "My role"; string scriptBody = "Write-Host \"Hello world\""; @@ -202,8 +202,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -278,11 +278,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" stepName := "MyStep" diff --git a/src/shared-content/scripts/create-tagset-scripts.include.md b/src/shared-content/scripts/create-tagset-scripts.include.md index 315b2bec59..00cd94e8e6 100644 --- a/src/shared-content/scripts/create-tagset-scripts.include.md +++ b/src/shared-content/scripts/create-tagset-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" $tagsetName = "Upgrade Ring" @@ -60,8 +60,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/tagsets" -Body Add-Type -Path "path\to\Octopus.Client.dll" # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $tagsetName = "Upgrade Ring" $tagsetDescription = "Describes which upgrade ring the tenant belongs to" @@ -111,8 +111,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; var tagsetName = "Upgrade Ring"; var tagsetDescription = "Describes which upgrade ring the tenant belongs to"; @@ -190,8 +190,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" tagset_name = "MyTagset" @@ -248,11 +248,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" tagsetName := "MyTagset" diff --git a/src/shared-content/scripts/delete-a-space-scripts.include.md b/src/shared-content/scripts/delete-a-space-scripts.include.md index 89f8540cda..b876805ad9 100644 --- a/src/shared-content/scripts/delete-a-space-scripts.include.md +++ b/src/shared-content/scripts/delete-a-space-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "New Space" @@ -40,8 +40,8 @@ Write-Host "Action Complete" ```powershell Add-Type -Path 'path\to\Octopus.Client.dll' -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $endpoint = New-Object Octopus.Client.OctopusServerEndpoint($octopusURL, $octopusAPIKey) $repository = New-Object Octopus.Client.OctopusRepository($endpoint) @@ -76,8 +76,8 @@ try { using Octopus.Client; using Octopus.Client.Model; -var OctopusURL = "https://youroctourl"; -var OctopusAPIKey = "API-YOURAPIKEY"; +var OctopusURL = "https://your-octopus-url"; +var OctopusAPIKey = "API-YOUR-KEY"; var endpoint = new OctopusServerEndpoint(OctopusURL, OctopusAPIKey); var repository = new OctopusRepository(endpoint); @@ -118,8 +118,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Your Space name" @@ -165,11 +165,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "MySpace" // Get reference to space diff --git a/src/shared-content/scripts/delete-feed-scripts.include.md b/src/shared-content/scripts/delete-feed-scripts.include.md index 2bb940eb73..6b880eef14 100644 --- a/src/shared-content/scripts/delete-feed-scripts.include.md +++ b/src/shared-content/scripts/delete-feed-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $feedName = "nuget.org" @@ -30,8 +30,8 @@ Invoke-RestMethod -Uri "$octopusURL/api/$($space.Id)/feeds/$feedID" -Headers $he Add-Type -Path "C:\Octo\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $feedName = "nuget.org" @@ -71,8 +71,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "Default"; string feedName = "nuget to delete"; @@ -109,8 +109,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" @@ -153,11 +153,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" feedName := "MyFeed" diff --git a/src/shared-content/scripts/delete-project-by-name-scripts.include.md b/src/shared-content/scripts/delete-project-by-name-scripts.include.md index a695da8f5f..f61e2734b8 100644 --- a/src/shared-content/scripts/delete-project-by-name-scripts.include.md +++ b/src/shared-content/scripts/delete-project-by-name-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $projectName = "MyProject" @@ -30,8 +30,8 @@ Invoke-RestMethod -Method Delete -Uri "$octopusURL/api/$($space.Id)/projects/$($ Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $projectName = "MyProject" @@ -69,8 +69,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "default"; string projectName = "MyProject"; @@ -106,8 +106,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -149,11 +149,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourAPI") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" diff --git a/src/shared-content/scripts/delete-project-releases-scripts.include.md b/src/shared-content/scripts/delete-project-releases-scripts.include.md index 4190ee1ef4..822f7497f7 100644 --- a/src/shared-content/scripts/delete-project-releases-scripts.include.md +++ b/src/shared-content/scripts/delete-project-releases-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $projectName = "MyProject" @@ -37,8 +37,8 @@ foreach ($release in $releases.Items) Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $projectName = "MyProject" @@ -83,8 +83,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string projectName = "MyProject"; @@ -159,8 +159,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" project_name = "MyProject" @@ -207,11 +207,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" @@ -295,14 +295,14 @@ func GetProject(octopusURL *url.URL, APIKey string, space *octopusdeploy.Space, func GetProjectReleases(octopusURL *url.URL, APIKey string, space *octopusdeploy.Space, project *octopusdeploy.Project) []interface{} { // Define api endpoint - projectReleasesEndoint := octopusURL.String() + "/api/" + space.ID + "/projects/" + project.ID + "/releases" + projectReleasesEndpoint := octopusURL.String() + "/api/" + space.ID + "/projects/" + project.ID + "/releases" // Create http client httpClient := &http.Client{} skipAmount := 0 // Make request - request, _ := http.NewRequest("GET", projectReleasesEndoint, nil) + request, _ := http.NewRequest("GET", projectReleasesEndpoint, nil) request.Header.Set("X-Octopus-ApiKey", APIKey) response, err := httpClient.Do(request) diff --git a/src/shared-content/scripts/delete-projects-without-processes-scripts.include.md b/src/shared-content/scripts/delete-projects-without-processes-scripts.include.md index e9b1a1235d..f252afda92 100644 --- a/src/shared-content/scripts/delete-projects-without-processes-scripts.include.md +++ b/src/shared-content/scripts/delete-projects-without-processes-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctopusurl" -$octopusAPIKey = "API-KEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } # Get space @@ -39,8 +39,8 @@ foreach ($project in $projects) Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctopusurl" -$octopusAPIKey = "API-KEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $endpoint = New-Object Octopus.Client.OctopusServerEndpoint $octopusURL, $octopusAPIKey @@ -88,8 +88,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "default"; // Create repository object @@ -135,8 +135,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -181,11 +181,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" // Get reference to space diff --git a/src/shared-content/scripts/delete-targets-by-name-scripts.include.md b/src/shared-content/scripts/delete-targets-by-name-scripts.include.md index 26533f9143..1abfdcadc7 100644 --- a/src/shared-content/scripts/delete-targets-by-name-scripts.include.md +++ b/src/shared-content/scripts/delete-targets-by-name-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl/api" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url/api" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $machineName = "MachineName" @@ -42,8 +42,8 @@ foreach ($target in $targetList.Items) Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl/api" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url/api" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $machineName = "MachineName" @@ -81,8 +81,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string machineName = "MachineName"; @@ -118,8 +118,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -164,11 +164,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" machineName := "MyMachine" diff --git a/src/shared-content/scripts/delete-targets-by-role-scripts.include.md b/src/shared-content/scripts/delete-targets-by-role-scripts.include.md index 677a018693..02d9217856 100644 --- a/src/shared-content/scripts/delete-targets-by-role-scripts.include.md +++ b/src/shared-content/scripts/delete-targets-by-role-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $role = "MyRole" @@ -34,8 +34,8 @@ foreach ($machine in $machines) Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $role = "MyRole" @@ -77,8 +77,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://your.octopus.app"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string role = "MyRole"; @@ -118,8 +118,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -166,11 +166,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" roleName := "MyRole" diff --git a/src/shared-content/scripts/deploy-release-scripts.include.md b/src/shared-content/scripts/deploy-release-scripts.include.md index ee4239bf55..ca3737a794 100644 --- a/src/shared-content/scripts/deploy-release-scripts.include.md +++ b/src/shared-content/scripts/deploy-release-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $headers = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" @@ -51,8 +51,8 @@ $deployment = Invoke-RestMethod -Uri $octopusURL/api/$($space.Id)/deployments -M ```powershell Add-Type -Path 'path\to\Octopus.Client.dll' -$octopusURL = "https://youroctourl/" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url/" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $projectName = "Your Project Name" @@ -107,8 +107,8 @@ catch { using Octopus.Client; using Octopus.Client.Model; -string octopusURL = "https://YourURL"; -string octopusAPIKey = "API-YourKey"; +string octopusURL = "https://your-octopus-url"; +string octopusAPIKey = "API-YOUR-KEY"; string spaceName = "Default"; string projectName = "ProjectName"; string releaseVersion = "0.0.1"; @@ -158,8 +158,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -217,7 +217,7 @@ import ( func main() { - apiURL, err := url.Parse("https://your.octopus.app") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } @@ -291,14 +291,14 @@ func GetSpace(octopusURL *url.URL, APIKey string, spaceName string) *octopusdepl func GetProjectReleases(octopusURL *url.URL, APIKey string, space *octopusdeploy.Space, project *octopusdeploy.Project) []interface{} { // Define api endpoint - projectReleasesEndoint := octopusURL.String() + "/api/" + space.ID + "/projects/" + project.ID + "/releases" + projectReleasesEndpoint := octopusURL.String() + "/api/" + space.ID + "/projects/" + project.ID + "/releases" // Create http client httpClient := &http.Client{} skipAmount := 0 // Make request - request, _ := http.NewRequest("GET", projectReleasesEndoint, nil) + request, _ := http.NewRequest("GET", projectReleasesEndpoint, nil) request.Header.Set("X-Octopus-ApiKey", APIKey) response, err := httpClient.Do(request) diff --git a/src/shared-content/scripts/deploy-release-with-prompted-variables-scripts.include.md b/src/shared-content/scripts/deploy-release-with-prompted-variables-scripts.include.md index 3d2b4e4a2b..eea392f262 100644 --- a/src/shared-content/scripts/deploy-release-with-prompted-variables-scripts.include.md +++ b/src/shared-content/scripts/deploy-release-with-prompted-variables-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$apiKey = "Your API Key" -$OctopusURL = "https://yoururl.octopus.app/" +$OctopusURL = "https://your-octopus-url" +$apiKey = "API-YOUR-KEY" $ProjectName = "Your Project Name" $EnvironmentName = "Your Environment Name" @@ -44,7 +44,7 @@ foreach($element in $deploymentPreview.Form.Elements) $uniqueName = $element.Name $isRequired = $element.Control.Required - $promptedVariablefound = $false + $promptedVariableFound = $false Write-Host "Looking for the prompted variable value for $nameToSearchFor" foreach ($promptedValue in $promptedValueList) @@ -92,8 +92,8 @@ Invoke-RestMethod -Uri "$OctopusURL/api/$spaceId/deployments" -Method Post -Head ```powershell # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $projectName = "MyProject" $releaseVersion = "0.0.1" @@ -163,8 +163,8 @@ using Octopus.Client; using Octopus.Client.Model; using System.Linq; -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; var projectName = "MyProject"; var releaseVersion = "0.0.1"; @@ -261,8 +261,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" project_name = "MyProject" @@ -340,11 +340,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-MyAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" releaseVersion := "0.0.1" @@ -453,14 +453,14 @@ func GetSpace(octopusURL *url.URL, APIKey string, spaceName string) *octopusdepl func GetProjectReleases(octopusURL *url.URL, APIKey string, space *octopusdeploy.Space, project *octopusdeploy.Project) []interface{} { // Define api endpoint - projectReleasesEndoint := octopusURL.String() + "/api/" + space.ID + "/projects/" + project.ID + "/releases" + projectReleasesEndpoint := octopusURL.String() + "/api/" + space.ID + "/projects/" + project.ID + "/releases" // Create http client httpClient := &http.Client{} skipAmount := 0 // Make request - request, _ := http.NewRequest("GET", projectReleasesEndoint, nil) + request, _ := http.NewRequest("GET", projectReleasesEndpoint, nil) request.Header.Set("X-Octopus-ApiKey", APIKey) response, err := httpClient.Do(request) diff --git a/src/shared-content/scripts/deployments-per-target-role-report.include.md b/src/shared-content/scripts/deployments-per-target-role-report.include.md index a700a3f220..bc58935563 100644 --- a/src/shared-content/scripts/deployments-per-target-role-report.include.md +++ b/src/shared-content/scripts/deployments-per-target-role-report.include.md @@ -2,8 +2,8 @@ PowerShell (REST API) ```powershell -$octopusUrl = "https://YOURURL" -$octopusApiKey = "YOUR API KEY" +$octopusUrl = "https://your-octopus-url" +$octopusApiKey = "API-YOUR-KEY" $reportPath = "./Report.csv" $spaceName = "Default" $targetRole = "hello-world" @@ -99,7 +99,7 @@ function Invoke-OctopusApi Write-OctopusVerbose "Ignoring cache." } - Write-OctopusVerbose "No data to post or put, calling bog standard invoke-restmethod for $url" + Write-OctopusVerbose "No data to post or put, calling bog standard Invoke-RestMethod for $url" $result = Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -ContentType 'application/json; charset=utf-8' if ($cachedResults.ContainsKey($url) -eq $true) diff --git a/src/shared-content/scripts/disable-project-triggers-scripts.include.md b/src/shared-content/scripts/disable-project-triggers-scripts.include.md index 01b01c8d64..f71b3fa6b4 100644 --- a/src/shared-content/scripts/disable-project-triggers-scripts.include.md +++ b/src/shared-content/scripts/disable-project-triggers-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" $projectName = "MyProject" @@ -38,8 +38,8 @@ foreach ($projectTrigger in $projectTriggers.Items) Add-Type -Path "c:\octopus.client\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $projectName = "MyProject" @@ -85,8 +85,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "default"; string projectName = "MyProject"; @@ -129,8 +129,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -175,11 +175,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" diff --git a/src/shared-content/scripts/download-artifact-from-deployment-scripts.include.md b/src/shared-content/scripts/download-artifact-from-deployment-scripts.include.md index a848ddba58..ca43156256 100644 --- a/src/shared-content/scripts/download-artifact-from-deployment-scripts.include.md +++ b/src/shared-content/scripts/download-artifact-from-deployment-scripts.include.md @@ -5,9 +5,9 @@ $ErrorActionPreference = "Stop"; # Define working variables -$OctopusURL = "YOUR INSTANCE URL" +$OctopusURL = "https://your-octopus-url" +$APIKey = "API-YOUR-KEY" $SpaceName = "YOUR SPACE NAME" -$APIKey = "API-YOURAPIKEY" $projectName = "YOUR PROJECT NAME" $releaseVersion = "YOUR RELEASE VERSION" $environmentName = "YOUR ENVIRONMENT NAME" @@ -66,8 +66,8 @@ Write-Host "File content written to $fileDownloadPath" ```powershell # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $projectName = "MyProject" $releaseVersion = "1.0.0" @@ -133,8 +133,8 @@ foreach ($artifact in $artifacts.Items) using Octopus.Client; using Octopus.Client.Model; -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; var projectName = "MyProject"; var releaseVersion = "1.0.0"; @@ -228,8 +228,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" project_name = "MyProject" @@ -295,11 +295,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" releaseVersion := "1.0.0" diff --git a/src/shared-content/scripts/download-artifact-from-runbook-scripts.include.md b/src/shared-content/scripts/download-artifact-from-runbook-scripts.include.md index 9e6c5c1a16..65e2d29bce 100644 --- a/src/shared-content/scripts/download-artifact-from-runbook-scripts.include.md +++ b/src/shared-content/scripts/download-artifact-from-runbook-scripts.include.md @@ -4,8 +4,8 @@ ```powershell $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" $projectName = "My Project" @@ -51,8 +51,8 @@ Write-Host "File content written to $fileDownloadPath" ```powershell # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $projectName = "MyProject" $runbookName = "MyRunbook" @@ -111,8 +111,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://your.octopus.app"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "Default"; string projectName = "My Project"; string runbookName = "My Runbook"; @@ -213,8 +213,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" project_name = "MyProject" @@ -282,11 +282,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" runbookName := "MyRunbook" diff --git a/src/shared-content/scripts/download-package-scripts.include.md b/src/shared-content/scripts/download-package-scripts.include.md index 48945cc4db..97c3a3ebb3 100644 --- a/src/shared-content/scripts/download-package-scripts.include.md +++ b/src/shared-content/scripts/download-package-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" $packageName = "packageName" @@ -34,8 +34,8 @@ Write-Host "Downloaded file to $filePath" Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $packageName = "packageName" $packageVersion = "1.0.0.0" @@ -77,11 +77,11 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "Default"; -string packageName = "packagename"; +string packageName = "PackageName"; string packageVersion = "1.0.0.0"; string outputFolder = @"C:\Temp\"; @@ -125,8 +125,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -141,7 +141,7 @@ def get_by_name(uri, name): space_name = "Default" package_output_folder = '/path/to/output/package/to' -package_name = 'packagename' +package_name = 'PackageName' package_version = '1.0.0.0' space = get_by_name('{0}/spaces/all'.format(octopus_server_uri), space_name) @@ -177,11 +177,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" downloadPath := "c:\\temp" packageName := "MyPackage" diff --git a/src/shared-content/scripts/enable-disable-machine-scripts.include.md b/src/shared-content/scripts/enable-disable-machine-scripts.include.md index 54eb2b69ef..8bbcb7eb7b 100644 --- a/src/shared-content/scripts/enable-disable-machine-scripts.include.md +++ b/src/shared-content/scripts/enable-disable-machine-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $machineName = "MyMachine" $machineEnabled = $true @@ -33,8 +33,8 @@ Invoke-RestMethod -Method Put -Uri "$octopusURL/api/$($space.Id)/machines/$($mac Add-Type -Path "c:\octopus.client\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $machineName = "MyMachine" $machineEnabled = $true @@ -76,8 +76,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "default"; var machineName = "MyMachine"; bool enabled = false; @@ -117,8 +117,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -165,11 +165,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" machineName := "MyMachine" enabled := true diff --git a/src/shared-content/scripts/enable-disable-project-scripts.include.md b/src/shared-content/scripts/enable-disable-project-scripts.include.md index 50c8ca2f06..3100809490 100644 --- a/src/shared-content/scripts/enable-disable-project-scripts.include.md +++ b/src/shared-content/scripts/enable-disable-project-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" $projectName = "MyProject" @@ -37,12 +37,12 @@ import requests import sys # instantiate working variables -octopus_server_uri = 'http://your.octopus.app/' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' params = {'API-Key': octopus_api_key} space_name = 'Default' project_name = 'ProjectName' -#Set disable_proect to 'True' to disable | 'False' to enable. +#Set disable_project to 'True' to disable | 'False' to enable. disable_project = True # Get Space @@ -92,11 +92,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" enabled := true diff --git a/src/shared-content/scripts/environment-permissions-report.include.md b/src/shared-content/scripts/environment-permissions-report.include.md index 615c609b19..7bb29f80ff 100644 --- a/src/shared-content/scripts/environment-permissions-report.include.md +++ b/src/shared-content/scripts/environment-permissions-report.include.md @@ -2,8 +2,8 @@ PowerShell (REST API) ```powershell -$octopusUrl = "https://YOURURL" -$octopusApiKey = "YOUR API KEY" +$octopusUrl = "https://your-octopus-url" +$octopusApiKey = "API-YOUR-KEY" $reportPath = "./Report.csv" $spaceFilter = "Permissions" # Supports "all" for everything, wild cards "hello*" will pull back everything that starts with hello, or specific names. Comma separated "Hello*,Testing" will pull back everything that starts with Hello and matches Testing exactly $environmentFilter = "Production" # Supports "all" for everything, wild cards "hello*" will pull back everything that starts with hello, or specific names. Comma separated "Hello*,Testing" will pull back everything that starts with Hello and matches Testing exactly @@ -100,7 +100,7 @@ function Invoke-OctopusApi Write-OctopusVerbose "Ignoring cache." } - Write-OctopusVerbose "No data to post or put, calling bog standard invoke-restmethod for $url" + Write-OctopusVerbose "No data to post or put, calling bog standard Invoke-RestMethod for $url" $result = Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -ContentType 'application/json; charset=utf-8' if ($cachedResults.ContainsKey($url) -eq $true) @@ -584,8 +584,8 @@ foreach ($permission in $permissionsReport) # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $reportPath = "./Report.csv" $spaceFilter = "Permissions" # Supports "all" for everything, wild cards "hello*" will pull back everything that starts with hello, or specific names. Comma separated "Hello*,Testing" will pull back everything that starts with Hello and matches Testing exactly $environmentFilter = "Production" # Supports "all" for everything, wild cards "hello*" will pull back everything that starts with hello, or specific names. Comma separated "Hello*,Testing" will pull back everything that starts with Hello and matches Testing exactly @@ -1136,7 +1136,7 @@ class Permission } } - public bool IncludScope + public bool IncludeScope { get; set; @@ -1280,7 +1280,7 @@ static System.Collections.Generic.List GetEnvironmentsScopedToProject (P { if (!scopedEnvironments.Contains(environmentId)) { - Console.WriteLine(string.Format("Adding {0} to {1} environemnt list", environmentId, Project.Name)); + Console.WriteLine(string.Format("Adding {0} to {1} environment list", environmentId, Project.Name)); scopedEnvironments.Add(environmentId); } } @@ -1451,10 +1451,10 @@ static void WritePermissionList (string PermissionName, System.Collections.Gener } } -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceFilter = "all"; -string environmentfilter = "Development"; +string environmentFilter = "Development"; string permissionToCheck = "DeploymentCreate"; string reportPath = "path:\\to\\csv.file"; string userFilter = "all"; @@ -1481,7 +1481,7 @@ foreach (var spaceName in spaceList) var projectList = repositoryForSpace.Projects.GetAll(); var environmentList = repositoryForSpace.Environments.GetAll(); - environmentList = FilterEnvironmentList(environmentList, environmentfilter); + environmentList = FilterEnvironmentList(environmentList, environmentFilter); var tenantList = repositoryForSpace.Tenants.GetAll(); @@ -1772,8 +1772,8 @@ def write_permission_list (permission_name, permission_list, permission, report_ report.write('\n'.join(["{0},{1},{2},{3},{4},{5}".format(row['Space'], row['Project'], row['PermissionName'], row['User'], row['EnvironmentScope'], row['TenantScope'])]) + '\n') report.close() -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_filter = "all" environment_filter = "Development" @@ -1910,11 +1910,11 @@ type PermissionTenant struct { func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceFilter := "all" environmentFilter := "Development" permissionToCheck := "DeploymentCreate" diff --git a/src/shared-content/scripts/export-projects-scripts.include.md b/src/shared-content/scripts/export-projects-scripts.include.md index 47dd0b21b4..35afcd91ad 100644 --- a/src/shared-content/scripts/export-projects-scripts.include.md +++ b/src/shared-content/scripts/export-projects-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app/" -$octopusAPIKey = "API-KEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } # Provide the space name for the projects to export. @@ -159,8 +159,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https:/YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" project_names = ["MyProject"] @@ -290,11 +290,11 @@ type ExportProject struct { func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectNames := []string{"MyProject"} exportPassword := "" diff --git a/src/shared-content/scripts/export-step-templates-scripts.include.md b/src/shared-content/scripts/export-step-templates-scripts.include.md index b2a17e0c49..023a15666f 100644 --- a/src/shared-content/scripts/export-step-templates-scripts.include.md +++ b/src/shared-content/scripts/export-step-templates-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" @@ -33,8 +33,8 @@ $templates.Items | ForEach-Object { ```powershell # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $exportPath = "path:\to\export-to" @@ -108,8 +108,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" export_path = "path:\\to\\templates" @@ -157,11 +157,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" exportPath := "path:\\to\\templates" diff --git a/src/shared-content/scripts/find-events-by-date-scripts.include.md b/src/shared-content/scripts/find-events-by-date-scripts.include.md index 802e10b1bd..2e89c4379e 100644 --- a/src/shared-content/scripts/find-events-by-date-scripts.include.md +++ b/src/shared-content/scripts/find-events-by-date-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $eventDate = "8/1/2021" function Get-OctopusItems { @@ -86,8 +86,8 @@ foreach ($event in $events) Add-Type -Path "path:\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $eventDate = "8/1/2021" @@ -138,8 +138,8 @@ using System.Text.RegularExpressions; // If using .net Core, be sure to add the NuGet package of System.Security.Permissions -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "Default"; DateTime eventDate = new DateTime(2021, 8, 1); @@ -215,8 +215,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourUrl' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" event_date = "8/1/2021" @@ -256,11 +256,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" eventDate := "8/1/2021" diff --git a/src/shared-content/scripts/find-projects-using-variable-set-scripts.include.md b/src/shared-content/scripts/find-projects-using-variable-set-scripts.include.md index 48f6c5990d..e7c5fe372c 100644 --- a/src/shared-content/scripts/find-projects-using-variable-set-scripts.include.md +++ b/src/shared-content/scripts/find-projects-using-variable-set-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $librarySetName = "MyLibrarySet" @@ -41,8 +41,8 @@ foreach ($project in $projects) Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $librarySetName = "MyLibrarySet" @@ -90,8 +90,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string librarySetName = "MyLibrarySet"; @@ -137,8 +137,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -152,10 +152,10 @@ def get_by_name(uri, name): return next((x for x in resources if x['Name'] == name), None) space_name = 'Default' -libraryset_name = 'Your variable set name' +library_set_name = 'Your variable set name' space = get_by_name('{0}/spaces/all'.format(octopus_server_uri), space_name) -library_variable_set = get_by_name('{0}/{1}/libraryvariablesets/all'.format(octopus_server_uri, space['Id']), libraryset_name) +library_variable_set = get_by_name('{0}/{1}/libraryvariablesets/all'.format(octopus_server_uri, space['Id']), library_set_name) library_variable_set_id = library_variable_set['Id'] projects = get_octopus_resource('{0}/{1}/projects/all'.format(octopus_server_uri, space['Id'])) @@ -163,7 +163,7 @@ projects = get_octopus_resource('{0}/{1}/projects/all'.format(octopus_server_uri for project in projects: project_variable_sets = project['IncludedLibraryVariableSetIds'] if library_variable_set_id in project_variable_sets: - print('Project \'{0}\' is using library variable set \'{1}\''.format(project['Name'], libraryset_name)) + print('Project \'{0}\' is using library variable set \'{1}\''.format(project['Name'], library_set_name)) ```
@@ -183,11 +183,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" librarySetName := "LibrarySetName" diff --git a/src/shared-content/scripts/find-target-usage-no-tenants.include.md b/src/shared-content/scripts/find-target-usage-no-tenants.include.md index 7c7e135cc7..aaeea05a31 100644 --- a/src/shared-content/scripts/find-target-usage-no-tenants.include.md +++ b/src/shared-content/scripts/find-target-usage-no-tenants.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop" [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 -$octopusApiKey = "YOUR API KEY" -$octopusUrl = "https://local.octopusdemos.app" +$octopusUrl = "https://your-octopus-url" +$octopusApiKey = "API-YOUR-KEY" $spaceName = "YOUR SPACE NAME" $targetName = "YOUR TARGET NAME" @@ -61,7 +61,7 @@ function Invoke-OctopusApi return Invoke-RestMethod -Method $methodToUse -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -Body $body -ContentType 'application/json; charset=utf-8' } - Write-Verbose "No data to post or put, calling bog standard invoke-restmethod for $url" + Write-Verbose "No data to post or put, calling bog standard Invoke-RestMethod for $url" $result = Invoke-RestMethod -Method $methodToUse -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -ContentType 'application/json; charset=utf-8' return $result @@ -132,7 +132,7 @@ function Get-ProjectEnvironmentIds $environmentIds = @() foreach ($lifecycleId in $lifeCycleIds) { - $lifecycle = Invoke-OctopusApi -octopusUrl $octopusUrl -spaceId $spaceid -apiKey $octopusApiKey -endPoint "lifecycles/$lifecycleId" + $lifecycle = Invoke-OctopusApi -octopusUrl $octopusUrl -spaceId $spaceId -apiKey $octopusApiKey -endPoint "lifecycles/$lifecycleId" $phases = $lifecycle.Phases @@ -293,7 +293,7 @@ if ($null -eq $target) Write-Host "The id for $targetName is $($target.Id)" -$environmentList = Invoke-OctopusApi -octopusUrl $octopusurl -endPoint "environments?skip=0&take=10000" -spaceId $spaceId -apiKey $octopusApiKey +$environmentList = Invoke-OctopusApi -octopusUrl $octopusUrl -endPoint "environments?skip=0&take=10000" -spaceId $spaceId -apiKey $octopusApiKey $allEnvironmentIds = @($environmentList.Items |Select-Object -ExpandProperty Id) $targetResults = @() @@ -436,7 +436,7 @@ function Get-EnvironmentsScopedToProject { if ($scopedEnvironmentList -notcontains $environmentId) { - Write-Host "Adding $environmentId to $($project.Name) enviornment list" + Write-Host "Adding $environmentId to $($project.Name) environment list" $scopedEnvironmentList += $environmentId } } @@ -445,7 +445,7 @@ function Get-EnvironmentsScopedToProject { if ($scopedEnvironmentList -notcontains $environmentId) { - Write-Host "Adding $environmentId to $($project.Name) enviornment list" + Write-Host "Adding $environmentId to $($project.Name) environment list" $scopedEnvironmentList += $environmentId } } @@ -512,7 +512,7 @@ function Get-TargetIsScopedToProcess if (($null -ne $action.ExcludedEnvironments)) { $hasExcludedEnvironmentScoping = $action.ExcludedEnvironments.Count -gt 0 - if ($hasExcludedEnvironmentScopint -eq $true) + if ($hasExcludedEnvironmentScoping -eq $true) { $environmentsTargetCanStillDeployTo = @() foreach ($environmentId in $target.EnvironmentIds) @@ -545,8 +545,8 @@ function Get-TargetIsScopedToProcess } # Octopus variables -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $targetName = "YourMachine" @@ -583,9 +583,9 @@ foreach ($project in $projects) $targetHasMatchingEnvironment = $false # Loop through environments - foreach ($envronmentId in $projectEnvironments) + foreach ($environmentId in $projectEnvironments) { - if ($target.EnvironmentIds -contains $envronmentId) + if ($target.EnvironmentIds -contains $environmentId) { $targetHasMatchingEnvironment = $true break @@ -693,8 +693,8 @@ using Octopus.Client.Model; using System; using System.Linq; -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "Default"; string targetName = "YourTarget"; @@ -876,7 +876,7 @@ static System.Collections.Generic.List GetEnvironmentsScopedToProject(Pr { if (!scopedEnvironments.Contains(environmentId)) { - Console.WriteLine(string.Format("Adding {0} to {1} environemnt list", environmentId, Project.Name)); + Console.WriteLine(string.Format("Adding {0} to {1} environment list", environmentId, Project.Name)); scopedEnvironments.Add(environmentId); } } @@ -946,11 +946,11 @@ static bool GetTargetIsScopedToProcess(Octopus.Client.Model.IProcessResource pro if(hasExcludedEnvironmentScoping) { System.Collections.Generic.List environmentsTargetCanStillDeployTo = new System.Collections.Generic.List(); - foreach (var environmetnId in target.EnvironmentIds) + foreach (var environmentId in target.EnvironmentIds) { - if ((!action.ExcludedEnvironments.Contains(environmetnId)) && (projectEnvironmentList.Contains(environmetnId))) + if ((!action.ExcludedEnvironments.Contains(environmentId)) && (projectEnvironmentList.Contains(environmentId))) { - environmentsTargetCanStillDeployTo.Add(environmetnId); + environmentsTargetCanStillDeployTo.Add(environmentId); } } @@ -1101,8 +1101,8 @@ def get_target_is_scoped_to_process (process, target, project_environment_list): return False -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" target_name = "YourTarget" @@ -1216,11 +1216,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" targetName := "MyTarget" diff --git a/src/shared-content/scripts/find-teams-with-role-scripts.include.md b/src/shared-content/scripts/find-teams-with-role-scripts.include.md index 2f46588153..ae07432598 100644 --- a/src/shared-content/scripts/find-teams-with-role-scripts.include.md +++ b/src/shared-content/scripts/find-teams-with-role-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $userRoleName = "Deployment creator" @@ -52,8 +52,8 @@ foreach ($teamName in $teamNames) Add-Type -Path "c:\octopus.client\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $userRoleName = "Deployment creator" @@ -77,7 +77,7 @@ try $teamNames = @() foreach ($team in $teams) { - # Get scopeduserrole + # Get scoped user role $scopedUserRole = $repositoryForSpace.Teams.GetScopedUserRoles($team) | Where-Object {$_.UserRoleId -eq $userRole.Id} # Check for null @@ -114,8 +114,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string userRoleName = "Deployment creator"; @@ -205,8 +205,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" role_name = "Project deployer" @@ -216,7 +216,7 @@ uri = '{0}/api/spaces'.format(octopus_server_uri) spaces = get_octopus_resource(uri, headers) space = next((x for x in spaces if x['Name'] == space_name), None) -# Get userrole +# Get user role uri = '{0}/api/userroles'.format(octopus_server_uri) user_roles = get_octopus_resource(uri, headers) user_role = next((x for x in user_roles if x['Name'] == role_name), None) @@ -259,11 +259,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" userRoleName := "Project deployer" diff --git a/src/shared-content/scripts/find-unused-projects.include.md b/src/shared-content/scripts/find-unused-projects.include.md index b23da67434..25896b7ad3 100644 --- a/src/shared-content/scripts/find-unused-projects.include.md +++ b/src/shared-content/scripts/find-unused-projects.include.md @@ -4,8 +4,8 @@ ```powershell [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 -$octopusUrl = "https://local.octopusdemos.app" ## Octopus URL to look at -$octopusApiKey = "YOUR API KEY" ## API key of user who has permissions to view all spaces, cancel tasks, and resubmit runbooks runs and deployments +$octopusUrl = "https://your-octopus-url" ## Octopus URL to look at +$octopusApiKey = "API-YOUR-KEY" ## API key of user who has permissions to view all spaces, cancel tasks, and resubmit runbooks runs and deployments $disableOldProjects = $false ## Tells the script to disable the projects that are older than the days since last release $daysSinceLastRelease = 90 ## The number of days since the last release to be considered unused. Any project without a release created in [90] days is considered inactive. @@ -64,7 +64,7 @@ function Invoke-OctopusApi Write-Verbose "Ignoring cache." } - Write-Verbose "No data to post or put, calling bog standard invoke-restmethod for $url" + Write-Verbose "No data to post or put, calling bog standard Invoke-RestMethod for $url" $result = Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -ContentType 'application/json; charset=utf-8' if ($cachedResults.ContainsKey($url) -eq $true) @@ -162,8 +162,8 @@ foreach ($project in $oldProjectList) ```powershell # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $daysSinceLastRelease = 90 $endpoint = New-Object Octopus.Client.OctopusServerEndpoint($octopusURL, $octopusAPIKey) @@ -235,8 +235,8 @@ foreach ($project in $oldProjects) using Octopus.Client; using Octopus.Client.Model; -var octopusURL = "https://your.octopus.app"; -var octopusAPIKey = "API-YOURKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; DateTime currentUtcTime = DateTime.Now.ToUniversalTime(); System.Collections.Generic.List oldProjects = new System.Collections.Generic.List(); int daysSinceLastRelease = 90; @@ -335,8 +335,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} old_projects = [] current_date = datetime.datetime.utcnow() @@ -403,11 +403,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" // Get client client := octopusAuth(apiURL, APIKey, "") diff --git a/src/shared-content/scripts/find-unused-targets.include.md b/src/shared-content/scripts/find-unused-targets.include.md index c54778a2d0..37ad4c00f7 100644 --- a/src/shared-content/scripts/find-unused-targets.include.md +++ b/src/shared-content/scripts/find-unused-targets.include.md @@ -4,8 +4,8 @@ ```powershell [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 -$octopusUrl = "https://local.octopusdemos.app" ## Octopus URL to look at -$octopusApiKey = "YOUR API KEY" ## API key of user who has permissions to view all spaces, cancel tasks, and resubmit runbooks runs and deployments +$octopusUrl = "https://your-octopus-url" ## Octopus URL to look at +$octopusApiKey = "API-YOUR-KEY" ## API key of user who has permissions to view all spaces, cancel tasks, and resubmit runbooks runs and deployments $daysSinceLastDeployment = 90 ## The number of days since the last deployment to be considered unused. Any target without a deployment in the last [90] days is considered inactive. $includeMachineLists = $false; ## If true, all machines in each category will get listed out to the console. If false, just a summary of information will be included. @@ -50,7 +50,7 @@ function Invoke-OctopusApi return Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -Body $body -ContentType 'application/json; charset=utf-8' } - Write-Verbose "No data to post or put, calling bog standard invoke-restmethod for $url" + Write-Verbose "No data to post or put, calling bog standard Invoke-RestMethod for $url" $result = Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -ContentType 'application/json; charset=utf-8' return $result @@ -216,8 +216,8 @@ if ($includeMachineLists -eq $true){ ```powershell # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $daysSinceLastDeployment = 90 $includeMachineLists = $false; ## If true, all machines in each category will get listed out to the console. If false, just a summary of information will be included. @@ -553,8 +553,8 @@ using Octopus.Client; using Octopus.Client.Model; using System.Linq; -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; DateTime currentUtcTime = DateTime.Now.ToUniversalTime(); CategorizedMachines categorizedMachines = new CategorizedMachines(); int daysSinceLastDeployment = 90; @@ -717,8 +717,8 @@ def update_categorized_machines(categorized_machines, space, octopus_server_uri, -octopus_server_uri = 'https://your.octopus.app' -octopus_api_key = 'API-YOURKEY' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} categorized_machines = { 'NotCountedMachines': [], @@ -803,11 +803,11 @@ type CategorizedMachines struct { func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" daysSinceLastDeployment := 90 includeMachineLists := true categorizedMachines := CategorizedMachines{} diff --git a/src/shared-content/scripts/find-variable-usage-scripts.include.md b/src/shared-content/scripts/find-variable-usage-scripts.include.md index b68535e70e..d5f6946db6 100644 --- a/src/shared-content/scripts/find-variable-usage-scripts.include.md +++ b/src/shared-content/scripts/find-variable-usage-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } # Specify the Space to search in @@ -191,8 +191,8 @@ if ($variableTracking.Count -gt 0) { ```powershell # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $variableToFind = "MyProject.Variable" $searchDeploymentProcesses = $true @@ -230,7 +230,7 @@ foreach ($project in $projects) { foreach ($match in $matchingNamedVariable) { - # Create new hashtable + # Create new hash table $result = [pscustomobject]@{ Project = $project.Name MatchType = "Named Project Variable" @@ -404,8 +404,8 @@ class VariableResult } } -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; string variableToFind = "MyProject.Variable"; bool searchDeploymentProcess = true; @@ -612,8 +612,8 @@ import json import requests import csv -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -644,7 +644,7 @@ csv_export_path = '' variable_tracker = [] octopus_server_uri = octopus_server_uri.rstrip('/') -octopus_server_baselink_uri = octopus_server_uri.rstrip('api') +octopus_server_base_uri = octopus_server_uri.rstrip('api') space = get_by_name('{0}/spaces/all'.format(octopus_server_uri), space_name) print('Looking for usages of variable named \'{0}\' in space \'{1}\''.format(variable_name, space_name)) @@ -667,7 +667,7 @@ for project in projects: 'Context': variable['Name'], 'AdditionalContext': None, 'Property': None, - 'Link': '{0}{1}/variables'.format(octopus_server_baselink_uri, project_web_uri) + 'Link': '{0}{1}/variables'.format(octopus_server_base_uri, project_web_uri) } if tracked_variable not in variable_tracker: variable_tracker.append(tracked_variable) @@ -682,7 +682,7 @@ for project in projects: 'Context': variable['Name'], 'AdditionalContext': variable['Value'], 'Property': None, - 'Link': '{0}{1}/variables'.format(octopus_server_baselink_uri, project_web_uri) + 'Link': '{0}{1}/variables'.format(octopus_server_base_uri, project_web_uri) } if tracked_variable not in variable_tracker: variable_tracker.append(tracked_variable) @@ -700,7 +700,7 @@ for project in projects: 'Context': step['Name'], 'Property': step_key, 'AdditionalContext': None, - 'Link': '{0}{1}/deployments/process/steps?actionId={2}'.format(octopus_server_baselink_uri, project_web_uri, step['Actions'][0]['Id']) + 'Link': '{0}{1}/deployments/process/steps?actionId={2}'.format(octopus_server_base_uri, project_web_uri, step['Actions'][0]['Id']) } if tracked_variable not in variable_tracker: variable_tracker.append(tracked_variable) @@ -711,7 +711,7 @@ for project in projects: runbooks = runbooks_resource['Items'] for runbook in runbooks: runbook_processes_link = runbook['Links']['RunbookProcesses'] - runbook_process = get_octopus_resource('{0}/{1}'.format(octopus_server_baselink_uri, runbook_processes_link)) + runbook_process = get_octopus_resource('{0}/{1}'.format(octopus_server_base_uri, runbook_processes_link)) for step in runbook_process['Steps']: for step_key in step.keys(): step_property_value = str(step[step_key]) @@ -722,7 +722,7 @@ for project in projects: 'Context': runbook['Name'], 'Property': step_key, 'AdditionalContext': step['Name'], - 'Link': '{0}{1}/operations/runbooks/{2}/process/{3}/steps?actionId={4}'.format(octopus_server_baselink_uri, project_web_uri, runbook['Id'], runbook['RunbookProcessId'], step['Actions'][0]['Id']) + 'Link': '{0}{1}/operations/runbooks/{2}/process/{3}/steps?actionId={4}'.format(octopus_server_base_uri, project_web_uri, runbook['Id'], runbook['RunbookProcessId'], step['Actions'][0]['Id']) } if tracked_variable not in variable_tracker: variable_tracker.append(tracked_variable) @@ -779,11 +779,11 @@ type VariableResult struct { func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" variableToFind := "MyProject.Variable" searchDeploymentProcess := true diff --git a/src/shared-content/scripts/find-variable-value-usage-scripts.include.md b/src/shared-content/scripts/find-variable-value-usage-scripts.include.md index 65ae28e77d..da7d34fc62 100644 --- a/src/shared-content/scripts/find-variable-value-usage-scripts.include.md +++ b/src/shared-content/scripts/find-variable-value-usage-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } @@ -15,7 +15,7 @@ $spaceName = "Default" # Specify the Variable Value to find, without OctoStache syntax -$variableValueToFind = "mytestvalue" +$variableValueToFind = "MyTestValue" # Optional: set a path to export to csv $csvExportPath = "" @@ -102,8 +102,8 @@ if($variableTracking.Count -gt 0) { ```powershell # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $variableValueToFind = "MyValue" $csvExportPath = "c:\temp\variable.csv" @@ -237,8 +237,8 @@ class VariableResult } } -var octopusURL = "https://your.octopus.app"; -var octopusAPIKey = "API-YOURKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; string variableValueToFind = "MyValue"; string csvExportPath = "path:\\to\\variable.csv"; @@ -372,8 +372,8 @@ import json import requests import csv -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri, headers, skip_count = 0): @@ -524,11 +524,11 @@ type VariableResult struct { func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" variableValueToFind := "MyValue" csvExportPath := "path:\\to\\variable.csv" diff --git a/src/shared-content/scripts/find-variableset-variables-usage-scripts.include.md b/src/shared-content/scripts/find-variableset-variables-usage-scripts.include.md index 68bc44dbc1..d02f1c29a6 100644 --- a/src/shared-content/scripts/find-variableset-variables-usage-scripts.include.md +++ b/src/shared-content/scripts/find-variableset-variables-usage-scripts.include.md @@ -1,12 +1,12 @@ -
+
PowerShell (REST API) ```powershell $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } # Specify the Space to search in @@ -30,7 +30,7 @@ $octopusURL = $octopusURL.TrimEnd('/') # Get space $space = (Invoke-RestMethod -Method Get -Uri "$octopusURL/api/spaces/all" -Headers $header) | Where-Object {$_.Name -eq $spaceName} -# Get first matching variableset record +# Get first matching variable set record $libraryVariableSet = (Invoke-RestMethod -Method Get -Uri "$octopusURL/api/$($space.Id)/libraryvariablesets/all" -Headers $header) | Where-Object {$_.Name -eq $variableSetVariableUsagesToFind} | Select-Object -First 1 # Get variables for library variable set @@ -87,7 +87,7 @@ foreach ($project in $projects) $propName = $prop.Name $json = $step.$propName | ConvertTo-Json -Compress - # Check to see if any of the variableset variables are referenced in this step's properties + # Check to see if any of the variable set variables are referenced in this step's properties foreach($variable in $variables) { if($null -ne $json -and ($json -like "*$($variable.Name)*")) { @@ -129,7 +129,7 @@ foreach ($project in $projects) $propName = $prop.Name $json = $step.$propName | ConvertTo-Json -Compress - # Check to see if any of the variableset variables are referenced in this runbook step's properties + # Check to see if any of the variable set variables are referenced in this runbook step's properties foreach($variable in $variables) { if($null -ne $json -and ($json -like "*$($variable.Name)*")) { @@ -166,7 +166,7 @@ if($variableTracking.Count -gt 0) { ```
-
+
PowerShell (Octopus.Client) ```powershell @@ -177,8 +177,8 @@ Add-Type -Path 'path:\to\Octopus.Client.dll' # Define working variables -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $searchDeploymentProcesses = $true $searchRunbookProcesses = $true @@ -206,7 +206,7 @@ $client = New-Object Octopus.Client.OctopusClient($endpoint) $space = $repository.Spaces.FindByName($spaceName) $repositoryForSpace = $client.ForSpace($space) -# Get first matching variableset record +# Get first matching variable set record $libraryVariableSet = $repositoryForSpace.LibraryVariableSets.FindByName($variableSetVariableUsagesToFind) # Get variables for library variable set @@ -343,7 +343,7 @@ if($variableTracking.Count -gt 0) { ```
-
+
C# ```csharp @@ -396,8 +396,8 @@ class VariableResult } } -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; string variableSetVariableUsagesToFind = "My-Variable-Set"; bool searchDeploymentProcess = true; @@ -594,7 +594,7 @@ if (variableTracking.Count > 0) ```
-
+
Python3 ```python @@ -602,8 +602,8 @@ import json import requests import csv -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -620,7 +620,7 @@ def get_by_name(uri, name): space_name = 'Default' # Specify the name of the Library VariableSet to use to find variables usage of -library_variableset_name = 'My-Variable-Set' +library_variable_set_name = 'My-Variable-Set' # Search through Project's Deployment Processes? search_deployment_processes = True @@ -633,13 +633,13 @@ csv_export_path = '' variable_tracker = [] octopus_server_uri = octopus_server_uri.rstrip('/') -octopus_server_baselink_uri = octopus_server_uri.rstrip('api') +octopus_server_base_uri = octopus_server_uri.rstrip('api') space = get_by_name('{0}/spaces/all'.format(octopus_server_uri), space_name) -library_variableset_resource = get_by_name('{0}/{1}/libraryvariablesets/all'.format(octopus_server_uri, space['Id']), library_variableset_name) -library_variableset = get_octopus_resource('{0}/{1}/variables/{2}'.format(octopus_server_uri, space['Id'], library_variableset_resource['VariableSetId'])) -library_variableset_variables = library_variableset['Variables'] -print('Looking for usages of variables from variable set \'{0}\' in space \'{1}\''.format(library_variableset_name, space_name)) +library_variable_set_resource = get_by_name('{0}/{1}/libraryvariablesets/all'.format(octopus_server_uri, space['Id']), library_variable_set_name) +library_variable_set = get_octopus_resource('{0}/{1}/variables/{2}'.format(octopus_server_uri, space['Id'], library_variable_set_resource['VariableSetId'])) +library_variable_set_variables = library_variable_set['Variables'] +print('Looking for usages of variables from variable set \'{0}\' in space \'{1}\''.format(library_variable_set_name, space_name)) projects = get_octopus_resource('{0}/{1}/projects/all'.format(octopus_server_uri, space['Id'])) @@ -650,19 +650,19 @@ for project in projects: project_variable_set = get_octopus_resource('{0}/{1}/variables/{2}'.format(octopus_server_uri, space['Id'], project['VariableSetId'])) # Check to see if there are any project variable values that reference any of the library set variables. - for library_variableset_variable in library_variableset_variables: + for library_variable_set_variable in library_variable_set_variables: - matching_value_variables = [project_variable for project_variable in project_variable_set['Variables'] if project_variable['Value'] is not None and library_variableset_variable['Name'] in project_variable['Value']] + matching_value_variables = [project_variable for project_variable in project_variable_set['Variables'] if project_variable['Value'] is not None and library_variable_set_variable['Name'] in project_variable['Value']] if matching_value_variables is not None: for matching_variable in matching_value_variables: tracked_variable = { 'Project': project_name, 'MatchType': 'Referenced Project Variable', - 'VariableSetVariable': library_variableset_variable['Name'], + 'VariableSetVariable': library_variable_set_variable['Name'], 'Context': matching_variable['Name'], 'AdditionalContext': matching_variable['Value'], 'Property': None, - 'Link': '{0}{1}/variables'.format(octopus_server_baselink_uri, project_web_uri) + 'Link': '{0}{1}/variables'.format(octopus_server_base_uri, project_web_uri) } if tracked_variable not in variable_tracker: variable_tracker.append(tracked_variable) @@ -673,17 +673,17 @@ for project in projects: for step in deployment_process['Steps']: for step_key in step.keys(): step_property_value = str(step[step_key]) - # Check to see if any of the variableset variables are referenced in this step's properties - for library_variableset_variable in library_variableset_variables: - if step_property_value is not None and library_variableset_variable['Name'] in step_property_value: + # Check to see if any of the variable set variables are referenced in this step's properties + for library_variable_set_variable in library_variable_set_variables: + if step_property_value is not None and library_variable_set_variable['Name'] in step_property_value: tracked_variable = { 'Project': project_name, 'MatchType': 'Step', - 'VariableSetVariable': library_variableset_variable['Name'], + 'VariableSetVariable': library_variable_set_variable['Name'], 'Context': step['Name'], 'Property': step_key, 'AdditionalContext': None, - 'Link': '{0}{1}/deployments/process/steps?actionId={2}'.format(octopus_server_baselink_uri, project_web_uri, step['Actions'][0]['Id']) + 'Link': '{0}{1}/deployments/process/steps?actionId={2}'.format(octopus_server_base_uri, project_web_uri, step['Actions'][0]['Id']) } if tracked_variable not in variable_tracker: variable_tracker.append(tracked_variable) @@ -694,21 +694,21 @@ for project in projects: runbooks = runbooks_resource['Items'] for runbook in runbooks: runbook_processes_link = runbook['Links']['RunbookProcesses'] - runbook_process = get_octopus_resource('{0}/{1}'.format(octopus_server_baselink_uri, runbook_processes_link)) + runbook_process = get_octopus_resource('{0}/{1}'.format(octopus_server_base_uri, runbook_processes_link)) for step in runbook_process['Steps']: for step_key in step.keys(): step_property_value = str(step[step_key]) - # Check to see if any of the variableset variables are referenced in this step's properties - for library_variableset_variable in library_variableset_variables: - if step_property_value is not None and library_variableset_variable['Name'] in step_property_value: + # Check to see if any of the variable set variables are referenced in this step's properties + for library_variable_set_variable in library_variable_set_variables: + if step_property_value is not None and library_variable_set_variable['Name'] in step_property_value: tracked_variable = { 'Project': project_name, 'MatchType': 'Runbook Step', - 'VariableSetVariable': library_variableset_variable['Name'], + 'VariableSetVariable': library_variable_set_variable['Name'], 'Context': runbook['Name'], 'Property': step_key, 'AdditionalContext': step['Name'], - 'Link': '{0}{1}/operations/runbooks/{2}/process/{3}/steps?actionId={4}'.format(octopus_server_baselink_uri, project_web_uri, runbook['Id'], runbook['RunbookProcessId'], step['Actions'][0]['Id']) + 'Link': '{0}{1}/operations/runbooks/{2}/process/{3}/steps?actionId={4}'.format(octopus_server_base_uri, project_web_uri, runbook['Id'], runbook['RunbookProcessId'], step['Actions'][0]['Id']) } if tracked_variable not in variable_tracker: variable_tracker.append(tracked_variable) @@ -736,7 +736,7 @@ if results_count > 0: ```
-
+
Go ```go @@ -767,11 +767,11 @@ type VariableResult struct { func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" variableSetVariableUsagesToFind := "My-Variable-Set" searchDeploymentProcess := true @@ -788,7 +788,7 @@ func main() { variableTracking := []VariableResult{} - // Get variableset + // Get variable set librarySet := GetLibrarySet(apiURL, APIKey, space, variableSetVariableUsagesToFind, 0) // Get the variables diff --git a/src/shared-content/scripts/get-feeds-scripts.include.md b/src/shared-content/scripts/get-feeds-scripts.include.md index 2bb3548725..bee54158ee 100644 --- a/src/shared-content/scripts/get-feeds-scripts.include.md +++ b/src/shared-content/scripts/get-feeds-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" @@ -31,8 +31,8 @@ foreach($feed in $feeds) Add-Type -Path "C:\Octo\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $endpoint = New-Object Octopus.Client.OctopusServerEndpoint $octopusURL, $octopusAPIKey @@ -74,8 +74,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "Default"; @@ -116,8 +116,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' @@ -157,11 +157,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" // Create client object diff --git a/src/shared-content/scripts/get-steps-using-package-scripts.include.md b/src/shared-content/scripts/get-steps-using-package-scripts.include.md index 6c882e8dac..088415888c 100644 --- a/src/shared-content/scripts/get-steps-using-package-scripts.include.md +++ b/src/shared-content/scripts/get-steps-using-package-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctopusurl" -$octopusAPIKey = "API-KEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" $packageId = "PackageId" @@ -52,8 +52,8 @@ foreach ($project in $projectList) { Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $packageId = "PackageId" @@ -98,8 +98,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string packageId = "PackageId"; @@ -149,7 +149,7 @@ catch (Exception ex) ```python import json import requests -octopus_server_uri = 'https://your.octopus.app/' +octopus_server_uri = 'https://your-octopus-url/' octopus_api_key = 'API-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -166,11 +166,11 @@ projects = get_octopus_resource( '{0}/api/{1}/projects/all'.format(octopus_server_uri, space['Id'])) for project in projects: - deploymentprocess_link = project['Links']['DeploymentProcess'] + deployment_process_link = project['Links']['DeploymentProcess'] if project['IsVersionControlled'] == True: default_branch = project['PersistenceSettings']['DefaultBranch'] - deploymentprocess_link = deploymentprocess_link.replace('{gitRef}', default_branch) - uri = '{0}{1}'.format(octopus_server_uri, deploymentprocess_link) + deployment_process_link = deployment_process_link.replace('{gitRef}', default_branch) + uri = '{0}{1}'.format(octopus_server_uri, deployment_process_link) process = get_octopus_resource(uri) for step in process['Steps']: packages = [package for action in step['Actions'] for package in action['Packages']] @@ -198,11 +198,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" packageId := "MyPackageId" diff --git a/src/shared-content/scripts/get-steps-using-role-scripts.include.md b/src/shared-content/scripts/get-steps-using-role-scripts.include.md index c411b4038f..53b89c010e 100644 --- a/src/shared-content/scripts/get-steps-using-role-scripts.include.md +++ b/src/shared-content/scripts/get-steps-using-role-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $roleName = "My role" @@ -50,8 +50,8 @@ foreach ($project in $projectList) Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $roleName = "My role" @@ -95,8 +95,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string roleName = "My role"; @@ -149,8 +149,8 @@ catch (Exception ex) ```python import json import requests -octopus_server_uri = 'https://your.octopus.app/' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): response = requests.get(uri, headers=headers) @@ -162,11 +162,11 @@ spaces = get_octopus_resource('{0}/api/spaces/all'.format(octopus_server_uri)) space = next((x for x in spaces if x['Name'] == space_name), None) projects = get_octopus_resource('{0}/api/{1}/projects/all'.format(octopus_server_uri, space['Id'])) for project in projects: - deploymentprocess_link = project['Links']['DeploymentProcess'] + deployment_process_link = project['Links']['DeploymentProcess'] if project['IsVersionControlled'] == True: default_branch = project['PersistenceSettings']['DefaultBranch'] - deploymentprocess_link = deploymentprocess_link.replace('{gitRef}', default_branch) - uri = '{0}{1}'.format(octopus_server_uri, deploymentprocess_link) + deployment_process_link = deployment_process_link.replace('{gitRef}', default_branch) + uri = '{0}{1}'.format(octopus_server_uri, deployment_process_link) process = get_octopus_resource(uri) for step in process['Steps']: properties = step['Properties'] @@ -196,11 +196,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" roleName := "MyRole" diff --git a/src/shared-content/scripts/import-projects-scripts.include.md b/src/shared-content/scripts/import-projects-scripts.include.md index 525eada4c2..ccd64b83a9 100644 --- a/src/shared-content/scripts/import-projects-scripts.include.md +++ b/src/shared-content/scripts/import-projects-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app/" -$octopusAPIKey = "API-KEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } # Provide the space name where the export task ran. @@ -148,8 +148,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} sourceSpaceName = "Default" destinationSpaceName = "DestinationSpace" @@ -269,13 +269,13 @@ type ImportSource struct { func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" destinationSpaceName := "Destination Space" - exportPassword := "MyFanatasticPassword" + exportPassword := "MyFantasticPassword" exportTaskId := "ServerTasks-XXXXX" // Get reference to space diff --git a/src/shared-content/scripts/list-deployments-to-environment-scripts.include.md b/src/shared-content/scripts/list-deployments-to-environment-scripts.include.md index c24aff516a..0269b51684 100644 --- a/src/shared-content/scripts/list-deployments-to-environment-scripts.include.md +++ b/src/shared-content/scripts/list-deployments-to-environment-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-KEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } # Space name @@ -42,8 +42,8 @@ Write-Output "Retrieved $($deployments.Count) deployments to environment $($envi ```powershell Add-Type -Path "path\to\Octopus.Client.dll" -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-KEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $environmentName = "Development" @@ -88,8 +88,8 @@ Write-Host "Retrieved $($deployments.Count) deployments to environment $($enviro using Octopus.Client; using Octopus.Client.Model; -var octopusURL = "https://your.octopus.app"; -var octopusAPIKey = "API-KEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var endpoint = new OctopusServerEndpoint(octopusURL, octopusAPIKey); var repository = new OctopusRepository(endpoint); diff --git a/src/shared-content/scripts/list-users-scripts.include.md b/src/shared-content/scripts/list-users-scripts.include.md index 7960c73257..97491c48d7 100644 --- a/src/shared-content/scripts/list-users-scripts.include.md +++ b/src/shared-content/scripts/list-users-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } # Optional: include user role details? @@ -35,7 +35,7 @@ do { # Filter non-active users if($includeNonActiveUsers -eq $False) { - Write-Host "Filtering users who arent active from results" + Write-Host "Filtering users who aren't active from results" $usersList = $usersList | Where-Object {$_.IsActive -eq $True} } @@ -151,8 +151,8 @@ $ErrorActionPreference = "Stop"; # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' # Define working variables -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" # Optional: include user role details? $includeUserRoles = $true @@ -181,7 +181,7 @@ $usersList = @() if ($includeNonActiveUsers -eq $true) { # Filter out inactive users - Write-Host "Filtering users who arent active from results" + Write-Host "Filtering users who aren't active from results" $users = $users | Where-Object {$_.IsActive -eq $True} } @@ -344,8 +344,8 @@ class UserDetails // If using .net Core, be sure to add the NuGet package of System.Security.Permissions -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string csvExportPath = "path:\\to\\users.csv"; bool includeUserRoles = true; bool includeActiveDirectoryDetails = false; @@ -497,8 +497,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} include_user_roles = True include_non_active_users = False @@ -613,11 +613,11 @@ type UserDetails struct { func main() { - apiURL, err := url.Parse("https://YourUrl") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" csvExportPath := "path:\\to\\users.csv" includeUserRoles := true includeActiveDirectoryDetails := false diff --git a/src/shared-content/scripts/list-users-with-editing-roles-scripts.include.md b/src/shared-content/scripts/list-users-with-editing-roles-scripts.include.md index e0b593c6ac..2e31c62aa9 100644 --- a/src/shared-content/scripts/list-users-with-editing-roles-scripts.include.md +++ b/src/shared-content/scripts/list-users-with-editing-roles-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = 'Stop'; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-KEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $csvExportPath = "" @@ -69,9 +69,9 @@ $ErrorActionPreference = "Stop"; # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' # Define working variables -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" -$csvExportPath = "path:\to\editpermissions.csv" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" +$csvExportPath = "path:\to\edit_permissions.csv" $endpoint = New-Object Octopus.Client.OctopusServerEndpoint($octopusURL, $octopusAPIKey) $repository = New-Object Octopus.Client.OctopusRepository($endpoint) @@ -177,9 +177,9 @@ class UserDetails } } -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; -string csvExportPath = "path:\\to\\editpermissions.csv"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; +string csvExportPath = "path:\\to\\edit_permissions.csv"; System.Collections.Generic.List usersList = new System.Collections.Generic.List(); @@ -303,10 +303,10 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} -csv_export_path = "path:\\to\\editpermissions.csv" +csv_export_path = "path:\\to\\edit_permissions.csv" # Get users uri = '{0}/api/users'.format(octopus_server_uri) @@ -377,12 +377,12 @@ type UserDetails struct { func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" - csvExportPath := "path:\\to\\editpermissions.csv" + APIKey := "API-YOUR-KEY" + csvExportPath := "path:\\to\\edit_permissions.csv" usersList := []UserDetails{} diff --git a/src/shared-content/scripts/list-users-with-role-scripts.include.md b/src/shared-content/scripts/list-users-with-role-scripts.include.md index 70265c6fe4..fbaa4adb1e 100644 --- a/src/shared-content/scripts/list-users-with-role-scripts.include.md +++ b/src/shared-content/scripts/list-users-with-role-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusBaseURL = "https://youroctourl/api" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusBaseURL = "https://your-octopus-url/api" +$octopusAPIKey = "API-YOUR-KEY" $headers = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $roleName = "Project Deployer" @@ -97,8 +97,8 @@ foreach ($team in $teams) ```powershell # Define working variables -$octopusBaseURL = "https://youroctourl/api" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusBaseURL = "https://your-octopus-url/api" +$octopusAPIKey = "API-YOUR-KEY" # Load the Octopus.Client assembly from where you have it located. Add-type -Path "C:\Octopus.Client\Octopus.Client.dll" @@ -184,8 +184,8 @@ catch ```csharp // If using .net Core, be sure to add the NuGet package of System.Security.Permissions -var octopusBaseURL = "https://youroctourl/api"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusBaseURL = "https://your-octopus-url/api"; +var octopusAPIKey = "API-YOUR-KEY"; var endpoint = new OctopusServerEndpoint(octopusBaseURL, octopusAPIKey); var repository = new OctopusRepository(endpoint); @@ -304,8 +304,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' role_name = 'Project deployer' space_name = 'Default' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -371,11 +371,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" //spaceName := "Default" userRoleName := "Project deployer" diff --git a/src/shared-content/scripts/project-deployment-targets-report.include.md b/src/shared-content/scripts/project-deployment-targets-report.include.md index c6c6245450..d71ec6d937 100644 --- a/src/shared-content/scripts/project-deployment-targets-report.include.md +++ b/src/shared-content/scripts/project-deployment-targets-report.include.md @@ -2,8 +2,8 @@ PowerShell (REST API) ```powershell -$octopusUrl = "https://YOURURL" -$octopusApiKey = "YOUR API KEY" +$octopusUrl = "https://your-octopus-url" +$octopusApiKey = "API-YOUR-KEY" $reportPath = "./Report.csv" $spaceName = "Default" $projectName = "Hello World" @@ -99,7 +99,7 @@ function Invoke-OctopusApi Write-OctopusVerbose "Ignoring cache." } - Write-OctopusVerbose "No data to post or put, calling bog standard invoke-restmethod for $url" + Write-OctopusVerbose "No data to post or put, calling bog standard Invoke-RestMethod for $url" $result = Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -ContentType 'application/json; charset=utf-8' if ($cachedResults.ContainsKey($url) -eq $true) diff --git a/src/shared-content/scripts/project-permissions-report.include.md b/src/shared-content/scripts/project-permissions-report.include.md index 2360ef16c2..426624503f 100644 --- a/src/shared-content/scripts/project-permissions-report.include.md +++ b/src/shared-content/scripts/project-permissions-report.include.md @@ -2,8 +2,8 @@ PowerShell (REST API) ```powershell -$octopusUrl = "YOUR OCTOPUS URL" -$octopusApiKey = "YOUR API KEY" # User associated with API key must be system manager or higher to view all users +$octopusUrl = "https://your-octopus-url" +$octopusApiKey = "API-YOUR-KEY" # User associated with API key must be system manager or higher to view all users $reportPath = "./Report.csv" $spaceFilter = "All" # Supports "all" for everything, wild cards "hello*" will pull back everything that starts with hello, or specific names. Comma separated "Hello*,Testing" will pull back everything that starts with Hello and matches Testing exactly $projectFilter = "Hello World" # Supports "all" for everything, wild cards "hello*" will pull back everything that starts with hello, or specific names. Comma separated "Hello*,Testing" will pull back everything that starts with Hello and matches Testing exactly @@ -99,7 +99,7 @@ function Invoke-OctopusApi Write-OctopusVerbose "Ignoring cache." } - Write-OctopusVerbose "No data to post or put, calling bog standard invoke-restmethod for $url" + Write-OctopusVerbose "No data to post or put, calling bog standard Invoke-RestMethod for $url" $result = Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -ContentType 'application/json; charset=utf-8' if ($cachedResults.ContainsKey($url) -eq $true) @@ -406,7 +406,7 @@ function Get-EnvironmentsScopedToProject { if ($scopedEnvironmentList -notcontains $environmentId) { - Write-OctopusVerbose "Adding $environmentId to $($project.Name) enviornment list" + Write-OctopusVerbose "Adding $environmentId to $($project.Name) environment list" $scopedEnvironmentList += $environmentId } } @@ -415,7 +415,7 @@ function Get-EnvironmentsScopedToProject { if ($scopedEnvironmentList -notcontains $environmentId) { - Write-OctopusVerbose "Adding $environmentId to $($project.Name) enviornment list" + Write-OctopusVerbose "Adding $environmentId to $($project.Name) environment list" $scopedEnvironmentList += $environmentId } } diff --git a/src/shared-content/scripts/promote-releases-not-in-destination.include.md b/src/shared-content/scripts/promote-releases-not-in-destination.include.md index ffd067fe33..d9c2c3653e 100644 --- a/src/shared-content/scripts/promote-releases-not-in-destination.include.md +++ b/src/shared-content/scripts/promote-releases-not-in-destination.include.md @@ -2,8 +2,8 @@ PowerShell (REST API) ```powershell -$octopusUrl = "https://local.octopusdemos.app" -$apiKey = "YOUR API KEY" +$octopusUrl = "https://your-octopus-url" +$apiKey = "API-YOUR-KEY" $projectNameList = "WebAPI,Web UI" $sourceEnvironmentName = "Production" $destinationEnvironmentName = "Staging" @@ -41,7 +41,7 @@ function Invoke-OctopusApi return Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -Body $body -ContentType 'application/json; charset=utf-8' } - Write-Host "No data to post or put, calling bog standard invoke-restmethod for $url" + Write-Host "No data to post or put, calling bog standard Invoke-RestMethod for $url" $result = Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -ContentType 'application/json; charset=utf-8' return $result @@ -160,7 +160,7 @@ foreach ($projectName in $splitProjectList) TenantId = $null UseGuidedFailure = $false } - $newDeployment = Invoke-OctopusApi -octopusUrl $octopusurl -apiKey $apiKey -method "POST" -spaceId $spaceId -item $newDeployment -endPoint "deployments" + $newDeployment = Invoke-OctopusApi -octopusUrl $octopusUrl -apiKey $apiKey -method "POST" -spaceId $spaceId -item $newDeployment -endPoint "deployments" } ``` @@ -174,8 +174,8 @@ $ErrorActionPreference = "Stop"; # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' # Define working variables -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $sourceEnvironmentName = "Production" $destinationEnvironmentName = "Test" @@ -280,8 +280,8 @@ using Octopus.Client; using Octopus.Client.Model; using System.Linq; -var octopusURL = "https://YourURL"; -var octopusAPIKey = "API-YourAPIKey"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; // Create repository object var endpoint = new OctopusServerEndpoint(octopusURL, octopusAPIKey); @@ -411,8 +411,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' source_environment_name = 'Production' @@ -525,11 +525,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectNames := []string{"MyProject"} diff --git a/src/shared-content/scripts/publish-runbook-scripts.include.md b/src/shared-content/scripts/publish-runbook-scripts.include.md index 5456ab8716..2b57e7585e 100644 --- a/src/shared-content/scripts/publish-runbook-scripts.include.md +++ b/src/shared-content/scripts/publish-runbook-scripts.include.md @@ -6,13 +6,13 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $projectName = "MyProject" $runbookName = "MyRunbook" -$snapshotName = "Snapshot 9PNENH6" +$snapshotName = "Snapshot XXXXX" # Get space $space = (Invoke-RestMethod -Method Get -Uri "$octopusURL/api/spaces/all" -Headers $header) | Where-Object {$_.Name -eq $spaceName} @@ -40,12 +40,12 @@ Invoke-RestMethod -Method Put -Uri "$octopusURL/api/$($space.Id)/runbooks/$($run Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $projectName = "MyProject" $runbookName = "MyRunbook" -$snapshotName = "Snapshot 9PNENH7" +$snapshotName = "Snapshot XXXXX" $endpoint = New-Object Octopus.Client.OctopusServerEndpoint $octopusURL, $octopusAPIKey $repository = New-Object Octopus.Client.OctopusRepository $endpoint @@ -88,12 +88,12 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-APIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string projectName = "MyProject"; string runbookName = "MyRunbook"; -string snapshotName = "Snapshot 7PNENH8"; +string snapshotName = "Snapshot XXXXX"; // Create repository object var endpoint = new OctopusServerEndpoint(octopusURL, octopusAPIKey); @@ -134,8 +134,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -154,7 +154,7 @@ def get_item_by_name(uri, name): space_name = 'Default' project_name = 'Your project' runbook_name = 'Your runbook' -snapshot_name = 'Snapshot YVVCRLF' +snapshot_name = 'Snapshot XXXXX' space = get_by_name('{0}/spaces/all'.format(octopus_server_uri), space_name) project = get_by_name('{0}/{1}/projects/all'.format(octopus_server_uri, space['Id']), project_name) @@ -189,11 +189,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" diff --git a/src/shared-content/scripts/push-package-scripts.include.md b/src/shared-content/scripts/push-package-scripts.include.md index db124ee951..00a650aa35 100644 --- a/src/shared-content/scripts/push-package-scripts.include.md +++ b/src/shared-content/scripts/push-package-scripts.include.md @@ -6,8 +6,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $packageFile = "path\to\package" @@ -60,8 +60,8 @@ if ($null -ne $fileStream) Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $packageFile = "path\to\package" @@ -79,7 +79,7 @@ try # Create new package resource $package = New-Object Octopus.Client.Model.PackageResource - # Create filestream object + # Create file stream object $fileStream = New-Object System.IO.FileStream($packageFile, [System.IO.FileMode]::Open) # Push package @@ -110,8 +110,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-APIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "default"; string packageFile = "path\\to\\file"; System.IO.FileStream fileStream = null; @@ -156,8 +156,8 @@ finally import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" @@ -205,11 +205,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" filePath := "path:\\to\\package.X.X.X.X.zip" diff --git a/src/shared-content/scripts/register-listening-tentacle-scripts.include.md b/src/shared-content/scripts/register-listening-tentacle-scripts.include.md index 5b0e6e1455..bb77c7f72b 100644 --- a/src/shared-content/scripts/register-listening-tentacle-scripts.include.md +++ b/src/shared-content/scripts/register-listening-tentacle-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $hostName = "MyHost" @@ -55,8 +55,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/machines" -Hea Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $hostName = "MyHost" $tentaclePort = "10933" @@ -114,8 +114,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string hostName = "MyHost"; int tentaclePort = 10933; @@ -173,8 +173,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -262,11 +262,11 @@ type EndPoint struct { func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" hostName := "MyMachine" @@ -277,7 +277,7 @@ func main() { // Get the space object space := GetSpace(apiURL, APIKey, spaceName) - // Creat client for space + // Create client for space client := octopusAuth(apiURL, APIKey, space.ID) // Get the environment ids diff --git a/src/shared-content/scripts/register-polling-tentacle-scripts.include.md b/src/shared-content/scripts/register-polling-tentacle-scripts.include.md index 9e4ea6f19f..7467052592 100644 --- a/src/shared-content/scripts/register-polling-tentacle-scripts.include.md +++ b/src/shared-content/scripts/register-polling-tentacle-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $communicationsStyle = "TentacleActive" # Listening mode @@ -59,8 +59,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/machines" -Hea Add-Type -Path "c:\octopus.client\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $hostName = "MyHost" $tentacleThumbprint = "TentacleThumbprint" @@ -127,8 +127,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string hostName = "OctoTempTentacle"; string[] environmentNames = { "Development", "Production" }; @@ -194,8 +194,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -215,7 +215,7 @@ environment_names = ['Development', 'Test'] target_name = 'your-target-name' target_tentacle_thumbprint = 'your-tentacle-thumbprint' -# The subscription id is a random 20 character id (for example: 3hw9vtskv2cbfw7zvpje) that is used to queue messages from the server to the Polling Tentacle. +# The subscription id is a random 20 character id that is used to queue messages from the server to the Polling Tentacle. # This should match the value in the Tentacle config file. target_polling_subscription_identifier = 'your-target-subscription' @@ -258,11 +258,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" hostName := "MyPollingTentacle" @@ -274,7 +274,7 @@ func main() { // Get the space object space := GetSpace(apiURL, APIKey, spaceName) - // Creat client for space + // Create client for space client := octopusAuth(apiURL, APIKey, space.ID) // Get the environment ids diff --git a/src/shared-content/scripts/register-ssh-target-scripts.include.md b/src/shared-content/scripts/register-ssh-target-scripts.include.md index 4599473c10..f48f61e0d6 100644 --- a/src/shared-content/scripts/register-ssh-target-scripts.include.md +++ b/src/shared-content/scripts/register-ssh-target-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://your.octopus.app" -$octopusAPIKey = "API-KEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" diff --git a/src/shared-content/scripts/remove-project-from-team-scripts.include.md b/src/shared-content/scripts/remove-project-from-team-scripts.include.md index 90f0cb6b7c..bc89282918 100644 --- a/src/shared-content/scripts/remove-project-from-team-scripts.include.md +++ b/src/shared-content/scripts/remove-project-from-team-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $projectName = "MyProject" $spaceName = "default" @@ -44,8 +44,8 @@ foreach ($scopedUserRole in $scopedUserRoles) Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $projectName = "MyProject" $teamName = "MyTeam" @@ -93,8 +93,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "default"; string projectName = "MyProject"; string teamName = "MyTeam"; @@ -174,8 +174,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' project_name = "MyProject" @@ -228,11 +228,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" projectName := "MyProject" @@ -241,7 +241,7 @@ func main() { // Get the space object space := GetSpace(apiURL, APIKey, spaceName) - // Creat client for space + // Create client for space client := octopusAuth(apiURL, APIKey, space.ID) // Get team diff --git a/src/shared-content/scripts/replace-certificate-scripts.include.md b/src/shared-content/scripts/replace-certificate-scripts.include.md index 834abe282e..bcaa266a0a 100644 --- a/src/shared-content/scripts/replace-certificate-scripts.include.md +++ b/src/shared-content/scripts/replace-certificate-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" @@ -50,9 +50,9 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/certificates/$ Add-Type -Path 'path\to\Octopus.Client.dll' # Provide credentials for Octopus -$apikey = 'API-YOURAPIKEY' -$octopusURI = 'https://youroctourl' -$spaceName = "default" +$apikey = 'API-YOUR-KEY' +$octopusURI = 'https://your-octopus-url' +$spaceName = 'default' # Create repository object $endpoint = New-Object Octopus.Client.OctopusServerEndpoint $octopusURI,$apikey @@ -102,9 +102,9 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-APIKEY"; -string pfxFilePath = "C:\\path\\to\\thecert.pfx"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; +string pfxFilePath = "C:\\path\\to\\the_cert.pfx"; string pfxFilePassword = "PFX-file-password"; string certificateName = "MyCertificate"; string spaceName = "default"; @@ -185,8 +185,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = 'Default' certificate_name = 'MyCertificate' @@ -240,12 +240,12 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIEKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" certificateName := "MyCertificate" @@ -255,7 +255,7 @@ func main() { // Get the space object space := GetSpace(apiURL, APIKey, spaceName) - // Creat client for space + // Create client for space client := octopusAuth(apiURL, APIKey, space.ID) rawData, err := ioutil.ReadFile(certificateFilePath) diff --git a/src/shared-content/scripts/reprioritize-tasks.include.md b/src/shared-content/scripts/reprioritize-tasks.include.md index 63bbc23566..e786ea4664 100644 --- a/src/shared-content/scripts/reprioritize-tasks.include.md +++ b/src/shared-content/scripts/reprioritize-tasks.include.md @@ -4,8 +4,8 @@ ```powershell [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 -$octopusUrl = "https://local.octopusdemos.app" ## Octopus URL to look at -$octopusApiKey = "YOUR API KEY" ## API key of user who has permissions to view all spaces, cancel tasks, and resubmit runbooks runs and deployments +$octopusUrl = "https://your-octopus-url" ## Octopus URL to look at +$octopusApiKey = "API-YOUR-KEY" ## API key of user who has permissions to view all spaces, cancel tasks, and resubmit runbooks runs and deployments $spaceList = "Default" ## Comma separated list of spaces to monitor $environmentList = "Production" ## Comma separated list of environments to look for (can be blank) $projectList = "" ## Comma separated list of projects to look for (can be blank) @@ -104,7 +104,7 @@ function Invoke-OctopusApi Write-OctopusVerbose "Ignoring cache." } - Write-OctopusVerbose "No data to post or put, calling bog standard invoke-restmethod for $url" + Write-OctopusVerbose "No data to post or put, calling bog standard Invoke-RestMethod for $url" $result = Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -ContentType 'application/json; charset=utf-8' if ($cachedResults.ContainsKey($url) -eq $true) @@ -558,7 +558,7 @@ foreach ($task in $queuedTasks) $updatedTask = Invoke-OctopusApi -endPoint "tasks/$($task.Id)" -octopusUrl $octopusUrl -spaceId $null -apiKey $octopusApiKey -method "GET" -ignoreCache $true - if ($updatedTask.HasBeenPickedUpByProcssor -eq $true) + if ($updatedTask.HasBeenPickedUpByProcessor -eq $true) { Write-OctopusInformation "The task $($task.Id) has already been picked up and started processing, moving on." continue diff --git a/src/shared-content/scripts/rerun-deployments-and-runbooks-after-node-failure.include.md b/src/shared-content/scripts/rerun-deployments-and-runbooks-after-node-failure.include.md index f646ef29f4..1713685b4a 100644 --- a/src/shared-content/scripts/rerun-deployments-and-runbooks-after-node-failure.include.md +++ b/src/shared-content/scripts/rerun-deployments-and-runbooks-after-node-failure.include.md @@ -2,8 +2,8 @@ PowerShell (REST API) ```powershell -$octopusUrl = "YOUR URL" -$octopusApiKey = "API KEY" +$octopusUrl = "https://your-octopus-url" +$octopusApiKey = "API-YOUR-KEY" $maxAgeInMinutes = 240 $serverNodes = "HANode03,HANode04" $whatIf = $true @@ -99,7 +99,7 @@ function Invoke-OctopusApi Write-OctopusVerbose "Ignoring cache." } - Write-OctopusVerbose "No data to post or put, calling bog standard invoke-restmethod for $url" + Write-OctopusVerbose "No data to post or put, calling bog standard Invoke-RestMethod for $url" $result = Invoke-RestMethod -Method $method -Uri $url -Headers @{"X-Octopus-ApiKey" = "$ApiKey" } -ContentType 'application/json; charset=utf-8' if ($cachedResults.ContainsKey($url) -eq $true) diff --git a/src/shared-content/scripts/run-a-runbook-with-prompted-variables.include.md b/src/shared-content/scripts/run-a-runbook-with-prompted-variables.include.md index e7fd3c9525..6c0da901de 100644 --- a/src/shared-content/scripts/run-a-runbook-with-prompted-variables.include.md +++ b/src/shared-content/scripts/run-a-runbook-with-prompted-variables.include.md @@ -122,7 +122,7 @@ if ([string]::IsNullOrWhiteSpace($runbookPromptedVariables) -eq $false) $uniqueName = $element.Name $isRequired = $element.Control.Required - $promptedVariablefound = $false + $promptedVariableFound = $false Write-Host "Looking for the prompted variable value for $nameToSearchFor" foreach ($promptedValue in $promptedValueList) @@ -241,8 +241,8 @@ if ($runbookWaitForFinish -eq $true) using Octopus.Client; using Octopus.Client.Model; -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "Default"; string environmentName = "Development"; string runbookName = "Runbook name"; diff --git a/src/shared-content/scripts/run-healthcheck-scripts.include.md b/src/shared-content/scripts/run-healthcheck-scripts.include.md index 68e64d660b..0c51ea8813 100644 --- a/src/shared-content/scripts/run-healthcheck-scripts.include.md +++ b/src/shared-content/scripts/run-healthcheck-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "http://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" $Description = "Health check started from Powershell script" @@ -60,8 +60,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/tasks" -Body ( Add-Type -Path "path\to\Octopus.Client.dll" # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $Description = "Health check started from Powershell script" $TimeOutAfterMinutes = 5 @@ -116,8 +116,8 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; var description = "Health check started from C# script"; var timeoutAfterMinutes = 5; @@ -208,8 +208,8 @@ def convert(seconds): return "%d:%02d:%02d" % (hour, minutes, seconds) -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" description = 'Health check started from Python script' diff --git a/src/shared-content/scripts/run-runbook-scripts.include.md b/src/shared-content/scripts/run-runbook-scripts.include.md index 4eccfa3d10..a412447685 100644 --- a/src/shared-content/scripts/run-runbook-scripts.include.md +++ b/src/shared-content/scripts/run-runbook-scripts.include.md @@ -5,7 +5,7 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl/api" +$octopusURL = "https://your-octopus-url/api" $octopusAPIKey = "API-YOUR-KEY" $headers = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" @@ -44,7 +44,7 @@ Invoke-RestMethod -Method POST -Uri "$octopusSpaceUrl/runbook-runs/create/v1" -B Add-Type -Path "c:\octopus.client\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" +$octopusURL = "https://your-octopus-url" $octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $projectName = "MyProject" @@ -113,7 +113,7 @@ using Octopus.Client; using Octopus.Client.Model; // Declare working variables -var octopusURL = "https://youroctourl"; +var octopusURL = "https://your-octopus-url"; var octopusAPIKey = "API-YOUR-KEY"; string spaceName = "default"; string projectName = "MyProject"; @@ -180,7 +180,7 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' +octopus_server_uri = 'https://your-octopus-url/api' octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} @@ -242,8 +242,8 @@ import { Client, CreateRunbookRunCommandV1, ReleaseRepository } from '@octopusde const configuration: ClientConfiguration = { userAgentApp: 'CustomTypeScript', - instanceURL: 'https://your.octopus.app/', - apiKey: 'api-key' + instanceURL: 'https://your-octopus-url/', + apiKey: 'API-YOUR-KEY' }; const client = await Client.create(configuration); diff --git a/src/shared-content/scripts/switch-ad-domain-group-to-ldap-group-scripts.include.md b/src/shared-content/scripts/switch-ad-domain-group-to-ldap-group-scripts.include.md index 5148721061..1bbe40211d 100644 --- a/src/shared-content/scripts/switch-ad-domain-group-to-ldap-group-scripts.include.md +++ b/src/shared-content/scripts/switch-ad-domain-group-to-ldap-group-scripts.include.md @@ -4,14 +4,14 @@ ```powershell $ErrorActionPreference = "Stop" -$octopusURL = "https://your.octopus.app" # Replace with your instance URL -$octopusAPIKey = "API-YOURKEY" # Replace with a service account API Key +$octopusURL = "https://your-octopus-url" # Replace with your instance URL +$octopusAPIKey = "API-YOUR-KEY" # Replace with a service account API Key $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } # Script options # Provide the domain. This is needed to look up the group to ensure it's a valid AD Group we're working on. -$AD_Domain = "YOURDOMAIN" +$AD_Domain = "YOUR_DOMAIN" # Set this to $False if you want the Script to perform the update on Octopus Teams. $WhatIf = $True # Set this to $True if you want the Script to remove old Active Directory teams once the LDAP group has been found and added. @@ -38,7 +38,7 @@ foreach ($team in $teams) { $teamExternalGroups = $team.ExternalSecurityGroups if ($teamExternalGroups.Count -eq 0) { - Write-Verbose "Team: '$($team.Name)' doesnt have any external groups, skipping" + Write-Verbose "Team: '$($team.Name)' doesn't have any external groups, skipping" continue } else { diff --git a/src/shared-content/scripts/switch-users-ad-domain-to-ldap-scripts.include.md b/src/shared-content/scripts/switch-users-ad-domain-to-ldap-scripts.include.md index 73c3339d1b..7336089174 100644 --- a/src/shared-content/scripts/switch-users-ad-domain-to-ldap-scripts.include.md +++ b/src/shared-content/scripts/switch-users-ad-domain-to-ldap-scripts.include.md @@ -4,8 +4,8 @@ ```powershell $ErrorActionPreference = "Stop" -$octopusURL = "https://your.octopus.app" # Replace with your instance URL -$octopusAPIKey = "API-YOURKEY" # Replace with a service account API Key +$octopusURL = "https://your-octopus-url" # Replace with your instance URL +$octopusAPIKey = "API-YOUR-KEY" # Replace with a service account API Key $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } # The max number of records you want to update in this batch @@ -126,7 +126,7 @@ while ($True) { $claimName = $claimName.Name $claim = $identity.Claims.$ClaimName - if ($null -ne $claim.Value -and $claim.Value.ToLower() -eq $expectedMatch.Tolower() -and $claim.IsIdentifyingClaim -eq $true) { + if ($null -ne $claim.Value -and $claim.Value.ToLower() -eq $expectedMatch.ToLower() -and $claim.IsIdentifyingClaim -eq $true) { Write-Host "Found the user's LDAP record, add that to Octopus Deploy" $LdapIdentity = $identity $ldapMatchFound = $true diff --git a/src/shared-content/scripts/update-release-variable-snapshot-scripts.include.md b/src/shared-content/scripts/update-release-variable-snapshot-scripts.include.md index f187808b2e..c691ea022f 100644 --- a/src/shared-content/scripts/update-release-variable-snapshot-scripts.include.md +++ b/src/shared-content/scripts/update-release-variable-snapshot-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $projectName = "MyProject" $releaseVersion = "1.0.0.0" @@ -38,8 +38,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/releases/$($re Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $projectName = "MyProject" $channelName = "default" @@ -84,8 +84,8 @@ catch using Octopus.Client; using Octopus.Client.Model; -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "default"; string projectName = "MyProject"; string channelName = "Default"; diff --git a/src/shared-content/scripts/update-tenant-variable-scripts.include.md b/src/shared-content/scripts/update-tenant-variable-scripts.include.md index a8d11f3597..68a82f1ddb 100644 --- a/src/shared-content/scripts/update-tenant-variable-scripts.include.md +++ b/src/shared-content/scripts/update-tenant-variable-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "Default" # Name of the Space @@ -95,8 +95,8 @@ Invoke-RestMethod -Method Put -Uri "$octopusURL/api/$($space.Id)/tenants/$($tena Add-Type -Path 'Octopus.Client.dll' # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" # Name of the Space $tenantName = "TenantName" # The tenant name @@ -190,8 +190,8 @@ catch using Octopus.Client; using Octopus.Client.Model; -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "Default"; var tenantName = "TenantName"; var projectVariableTemplateName = "TemplateName"; @@ -315,8 +315,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://your.octopus.app' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" tenant_name = "MyTenant" diff --git a/src/shared-content/scripts/update-variable-set-variable-value-scripts.include.md b/src/shared-content/scripts/update-variable-set-variable-value-scripts.include.md index 42c9a2ab27..ee7c7cd1a9 100644 --- a/src/shared-content/scripts/update-variable-set-variable-value-scripts.include.md +++ b/src/shared-content/scripts/update-variable-set-variable-value-scripts.include.md @@ -4,8 +4,8 @@ ```powershell $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "http://your.octopus.app/" -$octopusAPIKey = "YOUR-APIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } # Specify the Space to search in @@ -23,7 +23,7 @@ $VariableValue = "" $space = (Invoke-RestMethod -Method Get -Uri "$octopusURL/api/spaces/all" -Headers $header) | Where-Object {$_.Name -eq $spaceName} Write-Host "Looking for library variable set '$libraryVariableSet'" -$LibraryvariableSets = (Invoke-RestMethod -Method Get -Uri "$octopusURL/api/$($space.Id)/libraryvariablesets?contentType=Variables" -Headers $header) +$LibraryVariableSets = (Invoke-RestMethod -Method Get -Uri "$octopusURL/api/$($space.Id)/libraryvariablesets?contentType=Variables" -Headers $header) $LibraryVariableSet = $LibraryVariableSets.Items | Where-Object { $_.Name -eq $libraryVariableSetName } if ($null -eq $libraryVariableSet) { @@ -56,8 +56,8 @@ $ErrorActionPreference = "Stop"; # Load assembly Add-Type -Path 'path:\to\Octopus.Client.dll' # Define working variables -$octopusURL = "https://YourURL" -$octopusAPIKey = "API-YourAPIKey" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "Default" $libraryVariableSetName = "MyLibraryVariableSet" $variableName = "MyVariable" @@ -78,11 +78,11 @@ $librarySet = $repositoryForSpace.LibraryVariableSets.FindByName($libraryVariabl # Check to see if something was returned if ($null -eq $librarySet) { - Write-Warning "Library variable not found with name '$libraryVariabelSetName'" + Write-Warning "Library variable not found with name '$libraryVariableSetName'" exit } -# Get the variableset +# Get the variable set $variableSet = $repositoryForSpace.VariableSets.Get($librarySet.VariableSetId) # Get the variable @@ -103,8 +103,8 @@ using Octopus.Client; using Octopus.Client.Model; using System.Linq; -var octopusURL = "https://your.octopus.app"; -var octopusAPIKey = "API-YOURKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; // Create repository object var endpoint = new OctopusServerEndpoint(octopusURL, octopusAPIKey); @@ -175,8 +175,8 @@ def get_octopus_resource(uri, headers, skip_count = 0): # return results return items -octopus_server_uri = 'https://YourURL' -octopus_api_key = 'API-YourAPIKey' +octopus_server_uri = 'https://your-octopus-url' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} space_name = "Default" library_variable_set_name = "MyLibraryVariableSet" @@ -231,11 +231,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" libraryVariableSetName := "MyLibraryVariableSet" diff --git a/src/shared-content/scripts/upgrade-machines-scripts.include.md b/src/shared-content/scripts/upgrade-machines-scripts.include.md index e61927d8b9..c21dcddbd0 100644 --- a/src/shared-content/scripts/upgrade-machines-scripts.include.md +++ b/src/shared-content/scripts/upgrade-machines-scripts.include.md @@ -5,8 +5,8 @@ $ErrorActionPreference = "Stop"; # Define working variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $header = @{ "X-Octopus-ApiKey" = $octopusAPIKey } $spaceName = "default" $machineNames = @("MyMachine") @@ -48,8 +48,8 @@ Invoke-RestMethod -Method Post -Uri "$octopusURL/api/$($space.Id)/tasks" -Header Add-Type -Path "path\to\Octopus.Client.dll" # Octopus variables -$octopusURL = "https://youroctourl" -$octopusAPIKey = "API-YOURAPIKEY" +$octopusURL = "https://your-octopus-url" +$octopusAPIKey = "API-YOUR-KEY" $spaceName = "default" $machineNames = @("MyMachine") @@ -98,8 +98,8 @@ catch using Octopus.Client; using Octopus.Client.Model; -var octopusURL = "https://youroctourl"; -var octopusAPIKey = "API-YOURAPIKEY"; +var octopusURL = "https://your-octopus-url"; +var octopusAPIKey = "API-YOUR-KEY"; var spaceName = "default"; string[] machineNames = new string[] { "OctoTempTentacle" }; @@ -149,8 +149,8 @@ catch (Exception ex) import json import requests -octopus_server_uri = 'https://your.octopus.app/api' -octopus_api_key = 'API-YOURAPIKEY' +octopus_server_uri = 'https://your-octopus-url/api' +octopus_api_key = 'API-YOUR-KEY' headers = {'X-Octopus-ApiKey': octopus_api_key} def get_octopus_resource(uri): @@ -203,11 +203,11 @@ import ( func main() { - apiURL, err := url.Parse("https://YourURL") + apiURL, err := url.Parse("https://your-octopus-url") if err != nil { log.Println(err) } - APIKey := "API-YourAPIKey" + APIKey := "API-YOUR-KEY" spaceName := "Default" machineNames := []string{"MyMachine"} diff --git a/src/shared-content/scripts/upload-artifact-to-deployment-scripts.include.md b/src/shared-content/scripts/upload-artifact-to-deployment-scripts.include.md index be6f13558b..499898751c 100644 --- a/src/shared-content/scripts/upload-artifact-to-deployment-scripts.include.md +++ b/src/shared-content/scripts/upload-artifact-to-deployment-scripts.include.md @@ -6,9 +6,9 @@ $ErrorActionPreference = "Stop"; Add-Type -AssemblyName System.Net.Http -$OctopusURL = "https://youroctourl" +$OctopusURL = "https://your-octopus-url" +$APIKey = "API-YOUR-KEY" $SpaceName = "YOUR SPACE NAME" -$APIKey = "API-YOURAPIKEY" $projectName = "YOUR PROJECT NAME" $releaseVersion = "YOUR RELEASE VERSION" $environmentName = "YOUR ENVIRONMENT NAME" @@ -43,8 +43,8 @@ Write-Host "The id of $releaseVersion is $releaseId" Write-Host "Getting the deployment information" $deploymentList = Invoke-RestMethod -Method Get -Uri "$OctopusUrl/api/$spaceId/releases/$releaseId/deployments?skip=0&take=1000" -Headers $header -$deploymentsToEnivronment = @($deploymentList.Items | Where-Object {$_.EnvironmentId -eq $environmentId}) -$deploymentToUse = $deploymentsToEnivronment | Sort-Object {[DateTime]$_."Created"} | Select-Object -First 1 +$deploymentsToEnvironment = @($deploymentList.Items | Where-Object {$_.EnvironmentId -eq $environmentId}) +$deploymentToUse = $deploymentsToEnvironment | Sort-Object {[DateTime]$_."Created"} | Select-Object -First 1 $serverTaskId = $deploymentToUse.TaskId Write-Host "The server task id of the most recent deployment to $environmentName for release $releaseVersion is $serverTaskId"