-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathpsmdb-tarball-functional.groovy
78 lines (76 loc) · 2.58 KB
/
psmdb-tarball-functional.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
library changelog: false, identifier: "lib@master", retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/Percona-Lab/jenkins-pipelines.git'
])
def moleculeDir = "psmdb-tarball/psmdb-tarball"
pipeline {
agent {
label 'min-bookworm-x64'
}
environment {
PATH = '/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin'
ANSIBLE_DISPLAY_SKIPPED_HOSTS = false
}
parameters {
string(
defaultValue: 'https://downloads.percona.com/downloads/percona-server-mongodb-4.2/percona-server-mongodb-4.2.15-16/binary/tarball/percona-server-mongodb-4.2.15-16-x86_64.glibc2.17-minimal.tar.gz',
description: 'URL/S3 link for tarball to upgrade/downgrade from',
name: 'TARBALL'
)
string(
defaultValue: 'main',
description: 'Branch for testing repository',
name: 'TESTING_BRANCH'
)
}
options {
withCredentials(moleculePbmJenkinsCreds())
}
stages {
stage('Set build name'){
steps {
script {
currentBuild.displayName = "${env.BUILD_NUMBER}"
currentBuild.description = "${env.TARBALL}"
}
}
}
stage('Checkout') {
steps {
deleteDir()
git poll: false, branch: TESTING_BRANCH, url: 'https://github.com/Percona-QA/psmdb-testing.git'
}
}
stage ('Prepare') {
steps {
script {
installMoleculeBookworm()
}
}
}
stage('Test') {
steps {
sh """
echo ${params.TARBALL} | sed -E 's/(.+mongodb-)([0-9].[0-9])(.+)/\\2/' > VERSION
"""
script {
def PSMDB_VER = sh(returnStdout: true, script: "cat VERSION").trim()
def os = pdmdbOperatingSystems("${PSMDB_VER}")
os.removeAll { it.contains('-arm') }
moleculeParallelTest(os, moleculeDir)
}
}
}
}
post {
always {
junit testResults: "**/*-report.xml", keepLongStdio: true
script {
def PSMDB_VER = sh(returnStdout: true, script: "cat VERSION").trim()
def os = pdmdbOperatingSystems("${PSMDB_VER}")
os.removeAll { it.contains('-arm') }
moleculeParallelPostDestroy(os, moleculeDir)
}
}
}
}