Compare commits

...

4 Commits

Author SHA1 Message Date
Marc Mattmüller 1e8e7bcddf jobs/nwlTargets: added target for GEMINI (XG900)
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-11-21 14:49:14 +01:00
Alexandre Bard 083d6eb455 Jenkinsfile_common: Build test image
Now that the test image is supported by all platforms, we can set it
back as default.
2023-11-21 10:48:01 +01:00
Alexandre Bard e57d4fb27b jobs/UpdateSrcRevisions: Ignore errors when PR already exists 2023-10-04 10:41:05 +02:00
Alexandre Bard 5bd30a70f1 update-src-revision: Overwrite nightly branch
This branch is reserved for that and may not be merged every day.
We want to overwrite anyway everynight with the latest changes.
2023-09-27 17:30:52 +02:00
3 changed files with 10 additions and 15 deletions

View File

@ -27,7 +27,7 @@ env.HASHSERVER = "${env.HASH_SSTATE_SRV_IP}:8686"
env.YOCTO_REPO_DIR = "nwl"
env.YOCTO_RELEASE = 'kirkstone'
env.CI_IMAGE = "nwl-ramdisk-minimal"
env.CI_IMAGE = "nwl-test-image"
// Artifactory

View File

@ -91,18 +91,6 @@ def updateTheSourceRevisions(commonHelpers, repoDir, theBranch) {
}
}
//---------------------------------------------------------------------------------------------------------------------
def setupNewBranchAndGetGitPushPostfix(theNewBranch) {
if(sh(returnStatus: true, script: "git checkout ${theNewBranch}") == 0) {
println "----------------------------------------------------\n\
NOTE: Branch ${theNewBranch} already available \n\
and potentially as well a pull/merge request.\n\
--> handle this branch and request first\n----------------------------------------------------"
error("Available branch ${theNewBranch} detected --> handle this first")
}
sh(script: "git checkout -b ${theNewBranch}")
}
//---------------------------------------------------------------------------------------------------------------------
def createPR(theBranch) {
def prReviewer = "bard"
def prProject = "NM-NSP"
@ -129,6 +117,12 @@ def createPR(theBranch) {
--header '${acceptHeader}' \
--header '${contentHeader}' \
--data '${prDataJson}'").toString()
// It is okay if the pull request already exists: we can ignore the error
if(prResponse.contains("DuplicatePullRequestException"))
return
if(prResponse.contains("error")) {
error("Failed creating PR/MR:\n${prResponse}")
}
@ -151,7 +145,6 @@ def commitAndPushTheChanges(commonHelpers, repoDir, origBranch) {
}
else {
def theCredentials = commonHelpers.getGitCredentialID()
setupNewBranchAndGetGitPushPostfix("${nightlyBranch}")
println "Commit and Push changes; message = '${commitMsg}'\nchanges = ${changedItems}"
sshagent (credentials: [theCredentials]) {
// ToDo: replace the user.email and user.name once a CI user is setup in the
@ -159,8 +152,9 @@ def commitAndPushTheChanges(commonHelpers, repoDir, origBranch) {
sh(label: "Commit and push changes", returnStdout: true, script: """
git config --global user.email "marc.mattmueller@netmodule.com"
git config --global user.name "Marc Mattm\u00fcller"
git checkout -B ${nightlyBranch}
git commit -m "${commitMsg}"
git push -u origin ${nightlyBranch}
git push --force --set-upstream origin ${nightlyBranch}
""")
}
usedBranch = "${nightlyBranch}"

View File

@ -9,3 +9,4 @@ netmodule-hw22
netmodule-hw24
netmodule-hw25
netmodule-hw26
netmodule-hw34