Skip to content

Commit

Permalink
[PATCH] [Windows] Allow JENKINS_URL to not be set when JENKINS_DIRECT…
Browse files Browse the repository at this point in the history
…_CONNECTION is set (jenkinsci#361)
  • Loading branch information
krische authored and lemeurherve committed Jun 28, 2023
1 parent 8cbb3d8 commit 46fa2ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jenkins-agent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
[CmdletBinding()]
Param(
$Cmd = '', # this must be specified explicitly
$Url = $( if([System.String]::IsNullOrWhiteSpace($Cmd) -and [System.String]::IsNullOrWhiteSpace($env:JENKINS_URL)) { throw ("Url is required") } else { '' } ),
$Url = $( if([System.String]::IsNullOrWhiteSpace($Cmd) -and [System.String]::IsNullOrWhiteSpace($env:JENKINS_URL) -and [System.String]::IsNullOrWhiteSpace($env:JENKINS_DIRECT_CONNECTION)) { throw ("Url 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 = '',
Expand Down

0 comments on commit 46fa2ed

Please sign in to comment.