From 8d59c31cd85af81b7bf693b8f28dfc8a1201bbba Mon Sep 17 00:00:00 2001 From: LinlyBoi Date: Sun, 13 Jul 2025 20:21:16 +0300 Subject: [PATCH] fix: missing part in ci --- Jenkinsfile | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1bd0d93..dd377f1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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!' + } + } +}