Closed lemeurherve closed 2 months ago
N/A
Appropriate scope to avoid repetition and mistakes.
DOCKERHUB_ORGANISATION is redefined in every matrix branch in the "Main" stage while it could be defined once at the "docker-ssh-agent" global stage level: https://github.com/jenkinsci/docker-ssh-agent/blob/bad064233ecebab858236cd141e39b06b5fdbf98/Jenkinsfile#L22-L41
DOCKERHUB_ORGANISATION
VERSION and ON_TAG are defined in the Linux script while they could be defined at the "Deploy to DockerHub" stage level so they could be reused by the Windows script and so all environment variables are defined in a similar manner: https://github.com/jenkinsci/docker-ssh-agent/blob/bad064233ecebab858236cd141e39b06b5fdbf98/Jenkinsfile#L76-L96
VERSION
ON_TAG
To retrieve VERSION as environment variable from the Windows build.ps1 script, a retrieval like the following one should be added: https://github.com/jenkinsci/docker-ssh-agent/blob/bad064233ecebab858236cd141e39b06b5fdbf98/build.ps1#L35-L37
Having this and the new scoping would allow simplify the call for publishing Windows to powershell '& ./build.ps1 publish'
powershell '& ./build.ps1 publish'
No response
Yes:
Confirmed working with https://github.com/jenkinsci/docker-ssh-agent/releases/tag/5.41.0 built completed on trusted.ci.jenkins.io
Jenkins and plugins versions report
N/A
What Operating System are you using (both controller, and any agents involved in the problem)?
N/A
Reproduction steps
Expected Results
Appropriate scope to avoid repetition and mistakes.
Actual Results
DOCKERHUB_ORGANISATION
is redefined in every matrix branch in the "Main" stage while it could be defined once at the "docker-ssh-agent" global stage level: https://github.com/jenkinsci/docker-ssh-agent/blob/bad064233ecebab858236cd141e39b06b5fdbf98/Jenkinsfile#L22-L41VERSION
andON_TAG
are defined in the Linux script while they could be defined at the "Deploy to DockerHub" stage level so they could be reused by the Windows script and so all environment variables are defined in a similar manner: https://github.com/jenkinsci/docker-ssh-agent/blob/bad064233ecebab858236cd141e39b06b5fdbf98/Jenkinsfile#L76-L96To retrieve
VERSION
as environment variable from the Windows build.ps1 script, a retrieval like the following one should be added: https://github.com/jenkinsci/docker-ssh-agent/blob/bad064233ecebab858236cd141e39b06b5fdbf98/build.ps1#L35-L37Having this and the new scoping would allow simplify the call for publishing Windows to
powershell '& ./build.ps1 publish'
Anything else?
No response
Are you interested in contributing a fix?
Yes:
424