Skip to content

Commit

Permalink
fix: remove interpolation in last sh and powershell calls
Browse files Browse the repository at this point in the history
  • Loading branch information
lemeurherve committed Jun 23, 2024
1 parent af17f85 commit f48ef34
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,17 @@ pipeline {
script {
def tagItems = env.TAG_NAME.split('-')
if(tagItems.length == 2) {
def remotingVersion = tagItems[0]
def buildNumber = tagItems[1]
// This function is defined in the jenkins-infra/pipeline-library
infra.withDockerCredentials {
if (isUnix()) {
sh "./build.sh -r ${remotingVersion} -b ${buildNumber} -d publish"
} else {
powershell "& ./build.ps1 -RemotingVersion $remotingVersion -BuildNumber $buildNumber -DisableEnvProps publish"
withEnv(
["REMOTING_VERSION=${tagItems[0]}"],
["BUILD_NUMBER=${tagItems[1]}"]
) {
// This function is defined in the jenkins-infra/pipeline-library
infra.withDockerCredentials {
if (isUnix()) {
sh './build.sh -r $REMOTING_VERSION -b $BUILD_NUMBER -d publish'
} else {
powershell '& ./build.ps1 -DisableEnvProps publish'
}
}
}
} else {
Expand Down
4 changes: 4 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ if (![String]::IsNullOrWhiteSpace($env:REMOTING_VERSION)) {
$RemotingVersion = $env:REMOTING_VERSION
}

if (![String]::IsNullOrWhiteSpace($env:BUILD_NUMBER)) {
$BuildNumber = $env:BUILD_NUMBER
}

if (![String]::IsNullOrWhiteSpace($env:IMAGE_TYPE)) {
$ImageType = $env:IMAGE_TYPE
}
Expand Down

0 comments on commit f48ef34

Please sign in to comment.