fix: missing part in ci
This commit is contained in:
45
Jenkinsfile
vendored
45
Jenkinsfile
vendored
@@ -90,4 +90,47 @@ pipeline {
|
||||
steps {
|
||||
// Optional: Run security audit
|
||||
script {
|
||||
t
|
||||
try {
|
||||
sh '/root/.cargo/bin/cargo install cargo-audit || true'
|
||||
sh '/root/.cargo/bin/cargo audit'
|
||||
} catch (Exception e) {
|
||||
echo "Security audit failed or not available: ${e.getMessage()}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Archive Artifacts') {
|
||||
steps {
|
||||
// Archive build artifacts
|
||||
script {
|
||||
// Find and archive binary files
|
||||
sh 'find target/release -maxdepth 1 -type f -executable -not -name "*.so" -not -name "*.d" | head -10'
|
||||
|
||||
// Archive the main binary (adjust name as needed)
|
||||
archiveArtifacts artifacts: 'target/release/*', allowEmptyArchive: true, fingerprint: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
// Clean workspace after build
|
||||
cleanWs()
|
||||
}
|
||||
|
||||
success {
|
||||
echo 'Rust build completed successfully!'
|
||||
}
|
||||
|
||||
failure {
|
||||
echo 'Rust build failed!'
|
||||
// Optional: Send notifications
|
||||
}
|
||||
|
||||
unstable {
|
||||
echo 'Rust build completed with warnings!'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user