Skip to content

Commit

Permalink
Move some functions from Jenkinsfile and shell script to cms-meta-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
mharding-hpe committed Oct 28, 2024
1 parent 16d9184 commit 930fbb3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 47 deletions.
10 changes: 7 additions & 3 deletions Jenkinsfile.github
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def getRpmName(packageName, pythonVersion) {
if (pythonVersion == "meta") {
return "${packageName}"
}
// If it is not meta, then it should be 'major.minor'
if (!isValidMajorDotMinor(pythonVersion)) {
error("Invalid Python version specified: ${pythonVersion}")
}
if (pythonVersion == "3.6") {
return "python3-${packageName}"
}
Expand Down Expand Up @@ -115,7 +119,7 @@ pipeline {
}
}
environment {
PY_BIN = sh(script: "./get_python_bin.sh ${MAX_PY_VERSION}", returnStdout: true).trim()
PY_BIN = getPythonBinaryPath(env.MAX_PY_VERSION)
}
steps {
sh "make pymod_build"
Expand Down Expand Up @@ -160,15 +164,15 @@ pipeline {
}

environment {
RPM_NAME = getRpmName(env.NAME, "${PY_VERSION}")
RPM_NAME = getRpmName(env.NAME, env.PY_VERSION)
BUILD_METADATA = getRpmRevision(isStable: env.IS_STABLE)
SPEC_FILE = "python-${env.NAME}.spec"
}

stages {
stage("Pylint") {
environment {
PY_BIN = sh(script: "./get_python_bin.sh ${PY_VERSION}", returnStdout: true).trim()
PY_BIN = getPythonBinaryPath(env.PY_VERSION)
}
steps {
sh "make pymod_pylint_setup"
Expand Down
44 changes: 0 additions & 44 deletions get_python_bin.sh

This file was deleted.

0 comments on commit 930fbb3

Please sign in to comment.