jenkins: used writeFile for the distro version file and clean only this at the end
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
2b84d3db8f
commit
3d76f212bf
|
|
@ -22,6 +22,8 @@ pipeline {
|
||||||
build_deploy = "${SHARED_BUILD}/tmp/deploy/images/${MACHINE}"
|
build_deploy = "${SHARED_BUILD}/tmp/deploy/images/${MACHINE}"
|
||||||
build_licenses = "${SHARED_BUILD}/tmp/deploy/licenses"
|
build_licenses = "${SHARED_BUILD}/tmp/deploy/licenses"
|
||||||
buildhistory = "${SHARED_BUILD}/buildhistory"
|
buildhistory = "${SHARED_BUILD}/buildhistory"
|
||||||
|
|
||||||
|
DISTO_VERSION_FILE = "${SHARED_BUILD}/conf/distro_version.inc"
|
||||||
}
|
}
|
||||||
|
|
||||||
options {
|
options {
|
||||||
|
|
@ -131,14 +133,13 @@ def build_version(versionParam) {
|
||||||
|
|
||||||
def change_distro_version(versionString){
|
def change_distro_version(versionString){
|
||||||
println "Set the distro version to ${versionString}..."
|
println "Set the distro version to ${versionString}..."
|
||||||
def versionTag = "DISTRO_VERSION = "
|
def versionTag = "DISTRO_VERSION = \"${versionString}\""
|
||||||
def sedCmd = "sed -i 's/^${versionTag}.*\$/${versionTag}\"${versionString}\"/'"
|
writeFile(file: "${env.DISTO_VERSION_FILE}", text: "${versionTag}")
|
||||||
sh(script:"${sedCmd} meta-netmodule-distro/conf/distro/netmodule-linux.conf")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def cleanup_distro_version() {
|
def cleanup_distro_version() {
|
||||||
println "cleaning submodule holding distro version..."
|
println "cleaning repository regarding distro version..."
|
||||||
sh 'cd meta-netmodule-distro && git checkout *'
|
sh(script:"git clean -f ${env.DISTO_VERSION_FILE}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,3 +42,5 @@ PREMIRRORS_prepend = "\
|
||||||
ftp://.*/.* file://${YOCTOROOT}/sla-mirror/ \n \
|
ftp://.*/.* file://${YOCTOROOT}/sla-mirror/ \n \
|
||||||
http://.*/.* file://${YOCTOROOT}/sla-mirror/ \n \
|
http://.*/.* file://${YOCTOROOT}/sla-mirror/ \n \
|
||||||
https://.*/.* file://${YOCTOROOT}/sla-mirror/ \n"
|
https://.*/.* file://${YOCTOROOT}/sla-mirror/ \n"
|
||||||
|
|
||||||
|
include distro_version.inc
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue