last shouldve worked tbh
Some checks failed
gitea.arg.rip/jenkins-playground/pipeline/head There was a failure building this commit
Some checks failed
gitea.arg.rip/jenkins-playground/pipeline/head There was a failure building this commit
This commit is contained in:
parent
2f058d8584
commit
ad2fc13928
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@ -2,20 +2,28 @@ pipeline {
|
|||||||
agent any
|
agent any
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('nuget'){
|
stage('nuget pack'){
|
||||||
steps{
|
steps{
|
||||||
dotnetPack(outputDirectory: "./", project: "nugettest/")
|
dotnetPack(outputDirectory: "./", project: "nugettest/")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('build numberify'){
|
||||||
|
steps{
|
||||||
sh """
|
sh """
|
||||||
filename=\$(ls ./*.nupkg | head -1)
|
filename=\$(ls ./*.nupkg | head -1)
|
||||||
fullfilename=\$(basename -- \$filename)
|
fullfilename=\$(basename -- \$filename)
|
||||||
noext=\${fullfilename%.*}
|
noext=\${fullfilename%.*}
|
||||||
|
|
||||||
mv \$fullfilename \$noext-\$BUILD_NUMBER.nupkg
|
mv "\$filename" \$noext-\$BUILD_NUMBER.nupkg
|
||||||
|
|
||||||
files=null
|
filename=null
|
||||||
fullfilename=null
|
fullfilename=null
|
||||||
noext=null
|
noext=null
|
||||||
"""
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('publish package'){
|
||||||
|
steps{
|
||||||
dotnetNuGetPush(root: "./*.nupkg")
|
dotnetNuGetPush(root: "./*.nupkg")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user