Jenkinsfiles: adapted loading yocto environment before building

the yocto environment load path changes, i.e. to load the env for
an ostree image changed from '. ./env.image-ostree' to
'. ./env/distro/ostree-image'

Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
This commit is contained in:
Marc Mattmueller 2022-02-10 11:30:48 +01:00 committed by Alexandre Bard
parent 75b959e552
commit 7a078ecee0
5 changed files with 15 additions and 15 deletions

View File

@ -72,7 +72,7 @@ def cleanupAutoRevIncludeFile(versionParam) {
def updateSourceRevisions() { def updateSourceRevisions() {
println "update source revisions to head..." println "update source revisions to head..."
sh(returnStdout: true, script: "bash -c '. ./env.image-ostree > /dev/null && cd ../ && ./src-rev.sh -v -d -r -l ./srcrev.log -a ./autorev-packages.inc'") sh(returnStdout: true, script: "bash -c '. ./env/distro/ostree-image > /dev/null && cd ../ && ./src-rev.sh -v -d -r -l ./srcrev.log -a ./autorev-packages.inc'")
} }
@ -180,8 +180,8 @@ def syncSources(src, dst) {
def getAutoRevHashes(envType) { def getAutoRevHashes(envType) {
def env = "${envType}" == "" ? "" : "-${envType}" def env = "${envType}" == "" ? "" : "${envType}-"
def revs = sh(returnStdout: true, script: "bash -c \". ./env.image${env} > /dev/null && buildhistory-collect-srcrevs\"").trim() def revs = sh(returnStdout: true, script: "bash -c \". ./env/distro/${env}image > /dev/null && buildhistory-collect-srcrevs\"").trim()
return revs return revs
} }

View File

@ -145,8 +145,8 @@ def printJobParameters() {
def cleaning(envType) { def cleaning(envType) {
sshagent (credentials: [env.SSH_ID]) { sshagent (credentials: [env.SSH_ID]) {
def envPostFix = "${envType}" == "" ? "" : "-${envType}" def envPostFix = "${envType}" == "" ? "" : "${envType}-"
sh "bash -c '. ./env.image${envPostFix} > /dev/null && bitbake -q -fc cleanall virtual/netmodule-image'" sh "bash -c '. ./env/distro/${envPostFix}image > /dev/null && bitbake -q -fc cleanall virtual/netmodule-image'"
} }
dir ("${env.SHARED_BUILD}/tmp") { deleteDir() } dir ("${env.SHARED_BUILD}/tmp") { deleteDir() }
dir ("${env.SHARED_BUILD}/tmp-glibc") { deleteDir() } dir ("${env.SHARED_BUILD}/tmp-glibc") { deleteDir() }
@ -155,8 +155,8 @@ def cleaning(envType) {
def build(envType, imgType) { def build(envType, imgType) {
sshagent (credentials: [env.SSH_ID]) { sshagent (credentials: [env.SSH_ID]) {
def envPostFix = "${envType}" == "" ? "" : "-${envType}" def envPostFix = "${envType}" == "" ? "" : "${envType}-"
sh "bash -c '. ./env.image${envPostFix} > /dev/null && bitbake -q -k virtual/netmodule-image'" sh "bash -c '. ./env/distro/${envPostFix}image > /dev/null && bitbake -q -k virtual/netmodule-image'"
} }
} }

View File

@ -175,7 +175,7 @@ def cleaning(imgType) {
if (tgtImgType == "vcu") if (tgtImgType == "vcu")
distroPostfix = "vcu" distroPostfix = "vcu"
sh "bash -c '. ./env.image-${distroPostfix} > /dev/null && bitbake -q -fc cleanall netmodule-linux-image${imgTypePostfix}'" sh "bash -c '. ./env/distro/${distroPostfix}-image > /dev/null && bitbake -q -fc cleanall netmodule-linux-image${imgTypePostfix}'"
} }
dir ("${env.SHARED_BUILD}/tmp") { deleteDir() } dir ("${env.SHARED_BUILD}/tmp") { deleteDir() }
dir ("${env.SHARED_BUILD}/tmp-glibc") { deleteDir() } dir ("${env.SHARED_BUILD}/tmp-glibc") { deleteDir() }
@ -192,7 +192,7 @@ def build(imgType) {
if (tgtImgType == "vcu") if (tgtImgType == "vcu")
distroPostfix = "vcu" distroPostfix = "vcu"
sh "bash -c '. ./env.image-${distroPostfix} > /dev/null && bitbake -q -k netmodule-linux-image${imgTypePostfix}'" sh "bash -c '. ./env/distro/${distroPostfix}-image > /dev/null && bitbake -q -k netmodule-linux-image${imgTypePostfix}'"
} }
} }

View File

@ -95,10 +95,10 @@ pipeline {
script { script {
sshagent (credentials: [env.SSH_ID]) { sshagent (credentials: [env.SSH_ID]) {
if(env.IS_NM_LINUX_SDK.toBoolean()) { if(env.IS_NM_LINUX_SDK.toBoolean()) {
sh "bash -c '. ./env.image-ostree && bitbake -q netmodule-linux-sdk'" sh "bash -c '. ./env/distro/ostree-image && bitbake -q netmodule-linux-sdk'"
} }
else { else {
sh "bash -c '. ./env.image-ostree && bitbake -q -fc populate_sdk netmodule-linux-image-dev'" sh "bash -c '. ./env/distro/ostree-image && bitbake -q -fc populate_sdk netmodule-linux-image-dev'"
} }
} }
} }
@ -139,17 +139,17 @@ def cleanLastBuildArtifacts() {
println "cleaning artifacts from last build..." println "cleaning artifacts from last build..."
sh "rm -f ${env.YOCTO_DEPLOYS}/*" sh "rm -f ${env.YOCTO_DEPLOYS}/*"
sshagent (credentials: [env.SSH_ID]) { sshagent (credentials: [env.SSH_ID]) {
sh "bash -c '. ./env.image-ostree > /dev/null && git fetch -ap && bitbake -q -c cleanall netmodule-linux-sdk'" sh "bash -c '. ./env/distro/ostree-image > /dev/null && git fetch -ap && bitbake -q -c cleanall netmodule-linux-sdk'"
} }
} }
def cleaning(isNmSdk) { def cleaning(isNmSdk) {
sshagent (credentials: [env.SSH_ID]) { sshagent (credentials: [env.SSH_ID]) {
if(env.IS_NM_LINUX_SDK.toBoolean()) { if(env.IS_NM_LINUX_SDK.toBoolean()) {
sh "bash -c '. ./env.image-ostree && bitbake -q -fc cleanall netmodule-linux-sdk'" sh "bash -c '. ./env/distro/ostree-image && bitbake -q -fc cleanall netmodule-linux-sdk'"
} }
else { else {
sh "bash -c '. ./env.image-ostree && bitbake -q -fc cleanall netmodule-linux-image-dev'" sh "bash -c '. ./env/distro/ostree-image && bitbake -q -fc cleanall netmodule-linux-image-dev'"
} }
} }
dir ("${env.SHARED_BUILD}/tmp") { deleteDir() } dir ("${env.SHARED_BUILD}/tmp") { deleteDir() }

View File

@ -116,7 +116,7 @@ def updateMachineSrcRevs(machine) {
env.MACHINE = "${machine}" env.MACHINE = "${machine}"
println "update source revisions for ${env.MACHINE} to head..." println "update source revisions for ${env.MACHINE} to head..."
sh("echo '==> ${env.MACHINE} =======================' >> ./${env.SOURCE_REVISION_UPDATE_LOG}") sh("echo '==> ${env.MACHINE} =======================' >> ./${env.SOURCE_REVISION_UPDATE_LOG}")
sh(returnStdout: true, script: "bash -c '. ./env.image-ostree > /dev/null && cd ../ && ./src-rev.sh -v -d -r -l ./srcrev.log -a ./autorev-packages.inc'") sh(returnStdout: true, script: "bash -c '. ./env/distro/ostree-image > /dev/null && cd ../ && ./src-rev.sh -v -d -r -l ./srcrev.log -a ./autorev-packages.inc'")
sh("cat ./srcrev.log >> ./${env.SOURCE_REVISION_UPDATE_LOG}") sh("cat ./srcrev.log >> ./${env.SOURCE_REVISION_UPDATE_LOG}")
} }