Pass args to F#/C# Scripts

Octopus, beside PowerShell and Bash scripts, can also run F# and C# scripts.For F# scripting is something natural, functional paradigm nicely fits into scripting approach as it does not include Circular Dependency. F# scripts can be saved as .fsx files and run from console.C#, hovewer, is Object Oriented…

F# scripts with NuGet packages

F# 5.1 finally brings joy of using NuGet packages without much hassle.This is how you can use Npgsql library to create a new  PostgreSQL database.#r "nuget: Npgsql" open Npgsql let connString = "User ID=postgres;Password=Password1!;Host=localhost;Port=5432;Database=postgres;Pooling=true;" let conn = new…

Run Azure Pipeline with REST call

You can invoke Azure Pipeline via REST API.Here's such invocation implemented with PowerShell.$creds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("user:$PAT")) $basicAuth = "Basic $creds" $Headers = @{ Authorization = $basicAuth } $Payload = [PSCustomObject]@{ resources = [PSCustomObject]@{ repositories =[PSCustomObject]@{ self = [PSCustomObject] @{ refName = "refs/heads/$Branch" } } } variables…

Talk to your Windows machine with SSH!

Accessing VMs with RDP is tedious, slow and hacky DevOps way.Here's how you can set up your Windows based environment with OpenSSH.WSLUsing Windows Subsystem for Linux on client machine can be quite helpful as most of SSH related tools don't come out to Windows. I like to use…

Counting builds with Azure Pipelines

$(Rev:r) can only be used for name definitionBy default, builds are versioned with date and revision: $(Date:yyyyMMdd).$(Rev:r), eg. 20200507.42. The date changes every day (obviously), and for each day revision will start counting from 1: 20200101.1, 20200101.2, 20200102.1, and so on.$(Rev:…