Skip to content

Commit

Permalink
upgrade farmer
Browse files Browse the repository at this point in the history
  • Loading branch information
Szer committed Aug 15, 2023
1 parent a6213d3 commit 16c4402
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/Grinder.Farmer/Grinder.Farmer.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FSharp.Core" Version="5.0.0" />
<PackageReference Include="Farmer" Version="1.2.0" />
<PackageReference Include="Farmer" Version="1.7.26" />
<PackageReference Include="MedallionShell" Version="1.6.2" />
</ItemGroup>

Expand Down
2 changes: 2 additions & 0 deletions src/Grinder.Farmer/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ let getEnv name =
let appId = getEnv "DOTNETRU_DEPLOY_APPID"
let pwd = getEnv "DOTNETRU_DEPLOY_PWD"
let tenant = getEnv "DOTNETRU_DEPLOY_TENANT"
let subscriptionId = getEnv "DOTNETRU_DEPLOY_SUBID"

type Result.ResultBuilder with
member _.Bind(cmd: Command, next: unit -> Result<'a, string>): Result<'a, string> =
Expand Down Expand Up @@ -127,6 +128,7 @@ let getAcrCreds() = result {
|> ignore
)
do! azShell.Run("az", "login", "--service-principal", "-u", appId, "-p", pwd, "--tenant", tenant)
do! azShell.Run("az", "account", "set", "--subscription", subscriptionId)
let pwd = azShell.Run("az", "acr", "credential", "show", "--name", acrName, "--query", "passwords[0].value")
let pwdStringRaw = pwd.Result.StandardOutput
let pwdString = pwdStringRaw.Substring(1, pwdStringRaw.Length - 3) // truncating first and last chars
Expand Down

0 comments on commit 16c4402

Please sign in to comment.