updated jenkins builds
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
@@ -11,62 +11,82 @@ pipeline {
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
retry(2)
|
||||
skipDefaultCheckout()
|
||||
timestamps()
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('linux_x86_64') {
|
||||
stage('Build • Test • Deliver') {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
retry(2) {
|
||||
sleep time: 5, unit: 'SECONDS'
|
||||
sh 'scripts/make_unix.sh'
|
||||
script {
|
||||
int maxAttempts = 6
|
||||
int baseDelay = 10
|
||||
for (int attempt = 1; attempt <= maxAttempts; attempt++) {
|
||||
try {
|
||||
checkout scm
|
||||
break
|
||||
} catch (err) {
|
||||
if (attempt == maxAttempts) { throw err }
|
||||
int waitSec = baseDelay * (1 << (attempt - 1))
|
||||
echo "Checkout failed (attempt ${attempt}/${maxAttempts}). Waiting ${waitSec}s before retry..."
|
||||
sleep time: waitSec, unit: 'SECONDS'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('linux_x86_64') {
|
||||
steps {
|
||||
script { retryWithBackoff(2, 5) { sh 'scripts/make_unix.sh' } }
|
||||
}
|
||||
}
|
||||
|
||||
stage('mingw64') {
|
||||
agent any
|
||||
|
||||
steps {
|
||||
retry(2) {
|
||||
sleep time: 5, unit: 'SECONDS'
|
||||
sh 'scripts/make_win32.sh'
|
||||
}
|
||||
script { retryWithBackoff(2, 5) { sh 'scripts/make_win32.sh' } }
|
||||
}
|
||||
}
|
||||
|
||||
stage('linux_aarch64') {
|
||||
agent any
|
||||
|
||||
steps {
|
||||
retry(2) {
|
||||
sleep time: 5, unit: 'SECONDS'
|
||||
sh 'scripts/make_unix.sh aarch64'
|
||||
}
|
||||
script { retryWithBackoff(2, 5) { sh 'scripts/make_unix.sh aarch64' } }
|
||||
}
|
||||
}
|
||||
|
||||
stage('linux_x86_64_test') {
|
||||
agent any
|
||||
|
||||
steps {
|
||||
retry(2) {
|
||||
sleep time: 5, unit: 'SECONDS'
|
||||
sh 'scripts/run_tests.sh'
|
||||
}
|
||||
script { retryWithBackoff(2, 5) { sh 'scripts/run_tests.sh' } }
|
||||
}
|
||||
}
|
||||
|
||||
stage('deliver') {
|
||||
agent any
|
||||
|
||||
steps {
|
||||
sh 'scripts/deliver.sh /mnt/repertory "" "" "" "" 1 1'
|
||||
sh 'scripts/deliver.sh /mnt/repertory "" aarch64'
|
||||
sh 'scripts/deliver.sh /mnt/repertory'
|
||||
script {
|
||||
retryWithBackoff(3, 10) { sh 'scripts/deliver.sh /mnt/repertory "" "" "" "" 1 1' }
|
||||
retryWithBackoff(3, 10) { sh 'scripts/deliver.sh /mnt/repertory "" aarch64' }
|
||||
retryWithBackoff(3, 10) { sh 'scripts/deliver.sh /mnt/repertory' }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def retryWithBackoff(int maxAttempts, int baseDelaySeconds, Closure body) {
|
||||
for (int attempt = 1; attempt <= maxAttempts; attempt++) {
|
||||
try {
|
||||
body()
|
||||
return
|
||||
} catch (err) {
|
||||
if (attempt == maxAttempts) { throw err }
|
||||
int waitSec = baseDelaySeconds * (1 << (attempt - 1))
|
||||
echo "Step failed (attempt ${attempt}/${maxAttempts}). Waiting ${waitSec}s before retry..."
|
||||
sleep time: waitSec, unit: 'SECONDS'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -11,50 +11,69 @@ pipeline {
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
retry(2)
|
||||
skipDefaultCheckout()
|
||||
timestamps()
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('darwin_aarch64') {
|
||||
stage('Build • Test • Deliver') {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
retry(2) {
|
||||
sleep time: 5, unit: 'SECONDS'
|
||||
sh 'scripts/make_unix.sh aarch64'
|
||||
script {
|
||||
int maxAttempts = 6
|
||||
int baseDelay = 10
|
||||
for (int attempt = 1; attempt <= maxAttempts; attempt++) {
|
||||
try {
|
||||
checkout scm
|
||||
break
|
||||
} catch (err) {
|
||||
if (attempt == maxAttempts) { throw err }
|
||||
int waitSec = baseDelay * (1 << (attempt - 1))
|
||||
echo "Checkout failed (attempt ${attempt}/${maxAttempts}). Waiting ${waitSec}s before retry..."
|
||||
sleep time: waitSec, unit: 'SECONDS'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('darwin_aarch64') {
|
||||
steps { script { retryWithBackoff(2, 5) { sh 'scripts/make_unix.sh aarch64' } } }
|
||||
}
|
||||
|
||||
stage('darwin_x86_64') {
|
||||
agent any
|
||||
|
||||
steps {
|
||||
retry(2) {
|
||||
sleep time: 5, unit: 'SECONDS'
|
||||
sh 'scripts/make_unix.sh x86_64'
|
||||
}
|
||||
}
|
||||
steps { script { retryWithBackoff(2, 5) { sh 'scripts/make_unix.sh x86_64' } } }
|
||||
}
|
||||
|
||||
stage('darwin_aarch64_test') {
|
||||
agent any
|
||||
|
||||
steps {
|
||||
retry(2) {
|
||||
sleep time: 5, unit: 'SECONDS'
|
||||
sh 'scripts/run_tests.sh aarch64'
|
||||
}
|
||||
}
|
||||
steps { script { retryWithBackoff(2, 5) { sh 'scripts/run_tests.sh aarch64' } } }
|
||||
}
|
||||
|
||||
stage('deliver') {
|
||||
agent any
|
||||
|
||||
steps {
|
||||
sh "scripts/deliver.sh ${env.HOME}/mnt/repertory '' aarch64"
|
||||
sh "scripts/deliver.sh ${env.HOME}/mnt/repertory '' x86_64"
|
||||
script {
|
||||
retryWithBackoff(3, 10) { sh "scripts/deliver.sh ${env.HOME}/mnt/repertory '' aarch64" }
|
||||
retryWithBackoff(3, 10) { sh "scripts/deliver.sh ${env.HOME}/mnt/repertory '' x86_64" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def retryWithBackoff(int maxAttempts, int baseDelaySeconds, Closure body) {
|
||||
for (int attempt = 1; attempt <= maxAttempts; attempt++) {
|
||||
try {
|
||||
body()
|
||||
return
|
||||
} catch (err) {
|
||||
if (attempt == maxAttempts) { throw err }
|
||||
int waitSec = baseDelaySeconds * (1 << (attempt - 1))
|
||||
echo "Step failed (attempt ${attempt}/${maxAttempts}). Waiting ${waitSec}s before retry..."
|
||||
sleep time: waitSec, unit: 'SECONDS'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user