fix syntax error
This commit is contained in:
39
Jenkinsfile
vendored
39
Jenkinsfile
vendored
@@ -80,32 +80,33 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stage('Archive Build Artifacts') {
|
stage('Archive Build Artifacts') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
// Determine platform
|
// Determine platform
|
||||||
def os = sh(returnStdout: true, script: 'uname -s').trim().toLowerCase()
|
def os = sh(returnStdout: true, script: 'uname -s').trim().toLowerCase()
|
||||||
def arch = sh(returnStdout: true, script: 'uname -m').trim().toLowerCase()
|
def arch = sh(returnStdout: true, script: 'uname -m').trim().toLowerCase()
|
||||||
|
|
||||||
// Determine version (tag or "dev")
|
// Determine version (tag or "dev")
|
||||||
def version = env.TAG_NAME ?: "dev"
|
def version = env.TAG_NAME ?: "dev"
|
||||||
|
|
||||||
// Construct file name
|
// Construct file name
|
||||||
env.OUTPUT_FILE = "chloride-${version}-${os}-${arch}.tar.gz"
|
env.OUTPUT_FILE = "chloride-${version}-${os}-${arch}.tar.gz"
|
||||||
|
|
||||||
echo "Packaging as: ${env.OUTPUT_FILE}"
|
echo "Packaging as: ${env.OUTPUT_FILE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
sh '''
|
sh '''
|
||||||
# Ensure LICENSE.txt is in the output directory
|
# Ensure LICENSE.txt is in the output directory
|
||||||
cp LICENSE.txt build/bin/
|
cp LICENSE.txt build/bin/
|
||||||
|
|
||||||
# Create tarball with auto-generated name
|
# Create tarball with auto-generated name
|
||||||
tar -czf "$OUTPUT_FILE" -C build/bin .
|
tar -czf "$OUTPUT_FILE" -C build/bin .
|
||||||
'''
|
'''
|
||||||
|
|
||||||
archiveArtifacts artifacts: "${env.OUTPUT_FILE}", allowEmptyArchive: false
|
archiveArtifacts artifacts: "${env.OUTPUT_FILE}", allowEmptyArchive: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
|
|||||||
Reference in New Issue
Block a user