Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit 2de0b27

Browse files
committed
CORTX-32897: Support default parameters for pre-merge job
Since Motr-Hare-Single-Node-Cluster-Deployment-On-Rocky-Linux will be used as a pre merge job we need to remove the parameters that it accepts and run the job on dedicated machines. Signed-off-by: Rinku Kothiya <[email protected]>
1 parent 65bcdcb commit 2de0b27

File tree

2 files changed

+30
-31
lines changed

2 files changed

+30
-31
lines changed

scripts/install/usr/libexec/cortx-motr/motr-cleanup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ for s in m0d@* m0t1fs@* motr-client motr-kernel motr-mkfs motr-mkfs@* motr-serve
4343
motr_services="$motr_services $s.service"
4444
done
4545

46-
systemctl list-units --all $motr_services
46+
systemctl list-units --all $motr_services | tee
4747

4848
m0_log 'Stopping motr-kernel with all dependencies ...'
4949
systemctl stop motr-kernel || m0_exit 'Failed to stop motr-kernel.'
5050

5151
m0_log 'Stopping all Motr services ...'
5252
systemctl stop $motr_services || m0_exit 'Failed to stop Motr services.'
5353

54-
systemctl list-units --all $motr_services
54+
systemctl list-units --all $motr_services | tee
5555

5656
for s in $(systemctl list-units --failed $motr_services | awk '/failed/ {if ($4 == "failed") print $2}'); do
5757
m0_log "Resetting failed state for $s."

scripts/jenkins/motr-hare-1node-cluster.groovy

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,55 @@
11
#!/usr/bin/env groovy
2-
pipeline {
2+
pipeline {
33
agent {
44
node {
5-
label 'ssc-vm-g3-rhev4-1327'
5+
label 'sncr'
66
}
77
}
8-
9-
parameters {
10-
string(name: 'NODE_HOST', defaultValue: '', description: 'Node 1 Host FQDN', trim: true)
11-
string(name: 'NODE_USER', defaultValue: '', description: 'Host machine root user', trim: true)
12-
string(name: 'NODE_PASS', defaultValue: '', description: 'Host machine root user password', trim: true)
13-
}
148

159
options {
1610
timeout(time: 180, unit: 'MINUTES')
1711
timestamps()
18-
ansiColor('xterm')
12+
ansiColor('xterm')
1913
buildDiscarder(logRotator(numToKeepStr: "30"))
2014
}
2115

22-
environment {
23-
NODE_PASS = "${NODE_PASS.isEmpty() ? NODE_DEFAULT_SSH_CRED_PSW : NODE_PASS}"
24-
}
2516

2617
stages {
27-
stage('Checkout') {
28-
steps {
29-
checkout([$class: 'GitSCM', branches: [[name: "main"]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'PathRestriction', excludedRegions: '', includedRegions: 'scripts/third-party-rpm/.*']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'cortx-admin-github', url: "https://github.com/Seagate/cortx-motr"]]])
30-
}
31-
}
32-
stage ('Build rpm packages') {
18+
stage ('Create Single node cluster') {
3319
steps {
3420
script { build_stage = env.STAGE_NAME }
35-
sh label: 'to build motr and hare rpm', script: '''
36-
sshpass -p ${NODE_PASS} ssh -o StrictHostKeyChecking=no ${NODE_USER}@${NODE_HOST} hostname
37-
sshpass -p ${NODE_PASS} ssh -o StrictHostKeyChecking=no ${NODE_USER}@${NODE_HOST} git clone https://github.com/Seagate/cortx-motr
38-
sshpass -p ${NODE_PASS} ssh -o StrictHostKeyChecking=no ${NODE_USER}@${NODE_HOST} "cd /root/cortx-motr ; /root/cortx-motr/scripts/build-prep-1node.sh -dev"
39-
sshpass -p ${NODE_PASS} ssh -o StrictHostKeyChecking=no ${NODE_USER}@${NODE_HOST} "hctl bootstrap --mkfs singlenode.yaml"
40-
sshpass -p ${NODE_PASS} ssh -o StrictHostKeyChecking=no ${NODE_USER}@${NODE_HOST} "dd if=/dev/urandom of=/tmp/128M bs=1M count=128"
41-
sshpass -p ${NODE_PASS} ssh -o StrictHostKeyChecking=no ${NODE_USER}@${NODE_HOST} "/opt/seagate/cortx/hare/libexec/m0crate-io-conf > /root/crate.yaml"
42-
sshpass -p ${NODE_PASS} ssh -o StrictHostKeyChecking=no ${NODE_USER}@${NODE_HOST} "/root/cortx-motr/utils/m0crate -S /root/crate.yaml"
21+
sh label: 'Download code and install single node cluster', script: '''
22+
hostname
23+
pwd
24+
ln -s "$WORKSPACE" ../cortx-motr
25+
./scripts/install/usr/libexec/cortx-motr/motr-cleanup || true
26+
losetup -D
27+
./scripts/build-prep-1node.sh -dev
28+
hctl bootstrap --mkfs ../singlenode.yaml
29+
dd if=/dev/urandom of=/tmp/128M bs=1M count=128
30+
/opt/seagate/cortx/hare/libexec/m0crate-io-conf > ./crate.yaml
31+
./utils/m0crate -S ./crate.yaml
4332
'''
4433
}
4534
}
4635
}
47-
36+
4837
post {
4938
always {
5039
script {
51-
sh label: 'download_log_files', returnStdout: true, script: """
52-
sshpass -p ${NODE_PASS} ssh -o StrictHostKeyChecking=no ${NODE_USER}@${NODE_HOST} rm -rf /root/cortx-motr
40+
sh label: 'Clean up work space', returnStdout: true, script: """
41+
pwd
42+
cd "$WORKSPACE"
43+
./scripts/install/usr/libexec/cortx-motr/motr-cleanup || true
44+
losetup -D
45+
make uninstall || true
46+
cd ../cortx-hare
47+
make uninstall || true
48+
cd ..
49+
rm -rf cortx-hare cortx-motr
50+
echo Done
5351
"""
52+
cleanWs()
5453
}
5554
}
5655
}

0 commit comments

Comments
 (0)