testing support
Some checks failed
SHS Gitea/shstk/pipeline/head Something is wrong with the build of this commit
Some checks failed
SHS Gitea/shstk/pipeline/head Something is wrong with the build of this commit
This commit is contained in:
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@@ -1,6 +1,10 @@
|
|||||||
@Library('SHS.Platforms') _
|
@Library('SHS.Platforms') _
|
||||||
def build_docker(dist, release_dir) {
|
def build_docker(dist, release_dir, is_testing) {
|
||||||
def image_name = "${dist.docker_image}-shstk"
|
def image_name = "${dist.docker_image}-shstk"
|
||||||
|
if (is_testing) {
|
||||||
|
image_name += "-test"
|
||||||
|
}
|
||||||
|
|
||||||
echo "Build image ${image_name}"
|
echo "Build image ${image_name}"
|
||||||
def args = ""
|
def args = ""
|
||||||
for (arg in dist.docker_build_options) {
|
for (arg in dist.docker_build_options) {
|
||||||
@@ -23,18 +27,24 @@ node {
|
|||||||
stage("Download SRC") {
|
stage("Download SRC") {
|
||||||
checkout scm
|
checkout scm
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def currentBranch = "${env.BRANCH_NAME}"
|
||||||
|
def is_testing = currentBranch.toLowerCase().contains("test")
|
||||||
|
|
||||||
def pl = new org.SHS.Platforms(this)
|
def pl = new org.SHS.Platforms(this)
|
||||||
pl.get()
|
pl.get()
|
||||||
|
|
||||||
def rel_dir = sh(script: "pwd", returnStdout: true).trim() + '/release'
|
def rel_dir = sh(script: "pwd", returnStdout: true).trim() + '/release'
|
||||||
|
if (is_testing) {
|
||||||
|
rel_dir += "-test"
|
||||||
|
}
|
||||||
echo "Release to ${rel_dir}"
|
echo "Release to ${rel_dir}"
|
||||||
sh "rm -rvf ${rel_dir}"
|
sh "rm -rvf ${rel_dir}"
|
||||||
sh "mkdir -p ${rel_dir}"
|
sh "mkdir -p ${rel_dir}"
|
||||||
|
|
||||||
def _msg = "Built images:"
|
def _msg = "Built images:"
|
||||||
pl.forEach ({ dist ->
|
pl.forEach ({ dist ->
|
||||||
_msg += build_docker(dist, rel_dir)
|
_msg += build_docker(dist, rel_dir, is_testing)
|
||||||
},
|
},
|
||||||
stageSuffix: "-shstk",
|
stageSuffix: "-shstk",
|
||||||
ondemand: true
|
ondemand: true
|
||||||
|
|||||||
2
pip
2
pip
Submodule pip updated: 5b066cbc27...ee137b2820
Reference in New Issue
Block a user