From cf85fa3e5f8eb31c249334443998b1f8e3b19132 Mon Sep 17 00:00:00 2001 From: Sergey Karatkevich Date: Thu, 26 Aug 2021 10:03:54 +0200 Subject: [PATCH] [PATCH] Update jenkins-agent.ps1 (#226) adding a position parameters to satisfy github.com/jenkinsci/amazon-ecs-plugin/ requirements --- jenkins-agent.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins-agent.ps1 b/jenkins-agent.ps1 index 4db7e0219..3ea22e36d 100644 --- a/jenkins-agent.ps1 +++ b/jenkins-agent.ps1 @@ -24,8 +24,8 @@ Param( $Cmd = '', # this is only used when docker run has one arg positional arg $Url = $( if([System.String]::IsNullOrWhiteSpace($Cmd) -and [System.String]::IsNullOrWhiteSpace($env:JENKINS_URL)) { throw ("Url is required") } else { '' } ), - $Secret = $( if([System.String]::IsNullOrWhiteSpace($Cmd) -and [System.String]::IsNullOrWhiteSpace($env:JENKINS_SECRET)) { throw ("Secret is required") } else { '' } ), - $Name = $( if([System.String]::IsNullOrWhiteSpace($Cmd) -and [System.String]::IsNullOrWhiteSpace($env:JENKINS_AGENT_NAME)) { throw ("Name is required") } else { '' } ), + [Parameter(Position=0)]$Secret = $( if([System.String]::IsNullOrWhiteSpace($Cmd) -and [System.String]::IsNullOrWhiteSpace($env:JENKINS_SECRET)) { throw ("Secret is required") } else { '' } ), + [Parameter(Position=1)]$Name = $( if([System.String]::IsNullOrWhiteSpace($Cmd) -and [System.String]::IsNullOrWhiteSpace($env:JENKINS_AGENT_NAME)) { throw ("Name is required") } else { '' } ), $Tunnel = '', $WorkDir = '', [switch] $WebSocket = $false,