diff --git a/Jenkinsfile b/Jenkinsfile index 943cca61a..f2c2e40bd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,7 @@ pipeline { timeout(time: 60, unit: 'MINUTES') } environment { - DOCKERHUB_ORGANISATION = "${infra.isTrusted() ? 'jenkins' : 'jenkins4eval'}" + REGISTRY_ORG = "${infra.isTrusted() ? 'jenkins' : 'jenkins4eval'}" } stages { stage('Prepare Docker') { @@ -87,9 +87,9 @@ pipeline { // 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' + sh 'make publish' } else { - powershell '& ./build.ps1 -DisableEnvProps publish' + powershell '& ./build.ps1 publish' } } } diff --git a/Makefile b/Makefile index d7b6f7bc8..f2b32cd88 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,9 @@ prepare-test: bats check-reqs git submodule update --init --recursive mkdir -p target +publish: + @set -x; $(bake_base_cli) linux --push + ## Define bats options based on environment # common flags for all tests bats_flags := "" diff --git a/build.ps1 b/build.ps1 index 18909db60..bc9968820 100644 --- a/build.ps1 +++ b/build.ps1 @@ -36,17 +36,6 @@ if ($AgentType -ne '' -and $AgentType -in $AgentTypes) { $AgentTypes = @($AgentType) } -if (!$DisableEnvProps) { - Get-Content env.props | ForEach-Object { - $items = $_.Split('=') - if ($items.Length -eq 2) { - $name = $items[0].Trim() - $value = $items[1].Trim() - Set-Item -Path "env:$($name)" -Value $value - } - } -} - if (![String]::IsNullOrWhiteSpace($env:REMOTING_VERSION)) { $RemotingVersion = $env:REMOTING_VERSION } @@ -59,13 +48,7 @@ if (![String]::IsNullOrWhiteSpace($env:IMAGE_TYPE)) { $ImageType = $env:IMAGE_TYPE } -$Organisation = 'jenkins4eval' -if (![String]::IsNullOrWhiteSpace($env:DOCKERHUB_ORGANISATION)) { - $Organisation = $env:DOCKERHUB_ORGANISATION -} - # Ensure constant env vars used in docker-bake.hcl are defined -$env:REGISTRY_ORG = "$Organisation" $env:REMOTING_VERSION = "$RemotingVersion" $env:BUILD_NUMBER = $BuildNumber diff --git a/env.props b/env.props deleted file mode 100644 index f3ac3447d..000000000 --- a/env.props +++ /dev/null @@ -1 +0,0 @@ -REMOTING_VERSION=3256.v88a_f6e922152 diff --git a/updatecli/updatecli.d/remoting.yaml b/updatecli/updatecli.d/remoting.yaml index 2277534fb..50cb6de23 100644 --- a/updatecli/updatecli.d/remoting.yaml +++ b/updatecli/updatecli.d/remoting.yaml @@ -106,16 +106,6 @@ targets: replacepattern: >- $$RemotingVersion${1}= '{{ source "lastVersion" }}', scmid: default - setEnvProps: - name: Bump the Jenkins remoting version on the env.props file - kind: file - spec: - file: env.props - matchpattern: >- - REMOTING_VERSION=(.*) - replacepattern: >- - REMOTING_VERSION={{ source "lastVersion" }} - scmid: default actions: default: