2024-02-14 15:46:15 +00:00
|
|
|
#!/usr/bin/env groovy
|
|
|
|
library 'status-jenkins-lib@v1.8.6'
|
|
|
|
|
2023-07-06 13:30:43 +00:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
label 'linux'
|
|
|
|
dir 'ci'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
parameters {
|
|
|
|
string(
|
|
|
|
name: 'PROPTEST_CASES',
|
|
|
|
description: 'Test cases to be executed',
|
2023-07-17 18:16:05 +00:00
|
|
|
defaultValue: params.PROPTEST_CASES ?: '1000000'
|
2023-07-06 13:30:43 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
environment {
|
|
|
|
/* Avoid cache poisoning by other jobs. */
|
|
|
|
GOCACHE = "${env.WORKSPACE_TMP}/go-build"
|
|
|
|
GOPATH = "${env.WORKSPACE_TMP}/go"
|
2023-07-17 18:16:05 +00:00
|
|
|
PROPTEST_CASES = "${params.PROPTEST_CASES}"
|
2023-07-06 13:30:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
options {
|
|
|
|
disableConcurrentBuilds()
|
|
|
|
buildDiscarder(logRotator(
|
|
|
|
numToKeepStr: '20',
|
|
|
|
daysToKeepStr: '30',
|
|
|
|
))
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Fuzztest') {
|
|
|
|
steps {
|
|
|
|
sh 'cargo test --test fuzz_test'
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
failure {
|
|
|
|
archiveArtifacts artifacts: '**/*.proptest-regressions'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
2024-02-14 15:46:15 +00:00
|
|
|
always {
|
2023-07-06 13:30:43 +00:00
|
|
|
script {
|
2024-02-14 15:46:15 +00:00
|
|
|
discord.send(
|
|
|
|
header: (
|
|
|
|
currentBuild.currentResult == 'SUCCESS' ?
|
|
|
|
'Nightly Fuzztest Passed' :
|
|
|
|
'Nightly Fuzztest Failed. Regression files archived as job artifacts'
|
|
|
|
),
|
|
|
|
cred: 'nomos-node-discord-commits-webhook',
|
|
|
|
)
|
2023-07-06 13:30:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cleanup { cleanWs() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|