Skip to content

Commit

Permalink
Pull request project-chip#708: Adding the RPS file for the 917 SoC
Browse files Browse the repository at this point in the history
Merge in WMN_TOOLS/matter from feature/rps_addition to silabs

Squashed commit of the following:

commit 4dd69cd1149253ee8cb60e46cf08219f78dc48ed
Author: Chirag Bansal <[email protected]>
Date:   Thu Apr 27 00:06:51 2023 +0530

    adding the / to save the path

commit e3b8817254a2c06b2af8faa92b9ac39706a514ee
Author: Chirag Bansal <[email protected]>
Date:   Wed Apr 26 22:59:25 2023 +0530

    updated the path of rps file due to change in the path

commit e195ffc754f79d8f4e41254d31ae8eff5c90d793
Author: Chirag Bansal <[email protected]>
Date:   Sat Apr 22 16:33:17 2023 +0530

    saving the file name with the example

... and 9 more commits
  • Loading branch information
chirag-silabs authored and jmartinez-silabs committed Oct 17, 2023
1 parent 8e1a37b commit d641ae1
Showing 1 changed file with 94 additions and 3 deletions.
97 changes: 94 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,89 @@ def generateGblFileAndOTAfiles()
}
}

def generateRpsFiles()
{
actionWithRetry {
node(buildFarmLabel)
{
def boards = "BRD4325B"
def wifiPlatforms = "917_soc"
def appName = "lighting,lock,light-switch,window,onoff-plug"
def workspaceTmpDir = createWorkspaceOverlay(advanceStageMarker.getBuildStagesList(),
buildOverlayDir)
def dirPath = workspaceTmpDir + createWorkspaceOverlay.overlayMatterPath
def saveDir = 'matter/'

def image = "artifactory.silabs.net/gsdk-docker-production/gsdk_nomad_containers/gsdk_23q2:latest"

// Closure to generate the rps files
def genRpsFiles = {app, board, radioName ->

sh """
commander --version
pwd
bin_path_std="${dirPath}/${saved_workspace}/out/standard/${board}/WiFi/"
bin_path_release="${dirPath}/${saved_workspace}/out/release/${board}/WiFi/"
file_std="\$(find \$bin_path_std/*${app}*.s37 | grep -o '[^/]*\$')"
file_release="\$(find \$bin_path_release/*${app}*.s37 | grep -o '[^/]*\$')"
rps_file_std="\$(basename \$file_std .s37).rps"
rps_file_release="\$(basename \$file_release .s37).rps"
commander rps create \$bin_path_std/\$rps_file_std --app \$bin_path_std/\$file_std
commander rps create \$bin_path_release/\$rps_file_release --app \$bin_path_release/\$file_release
ls -al \$bin_path_std
ls -al \$bin_path_release
"""
return 0
}

withDockerRegistry([url: "https://artifactory.silabs.net ", credentialsId: 'svc_gsdk']){
sh "docker pull $image"
}

dir(dirPath) {
try{
withDockerContainer(image: image)
{
withCredentials([usernamePassword(credentialsId: 'svc_gsdk', passwordVariable: 'SL_PASSWORD', usernameVariable: 'SL_USERNAME')])
{
withEnv(['file_std=""',
'file_release=""',
'rps_file_std=""',
'rps_file_release=""',
'bin_path_std=""',
'bin_path_release=""']){
boards.tokenize(",").each{ brd ->
wifiPlatforms.tokenize(",").each{ platform ->
appName.tokenize(",").each{ app ->
// generating the RPS file for BRD4325B
genRpsFiles.call(app, brd, platform)
}
}
}
}
}
}
}
catch (e)
{
deactivateWorkspaceOverlay(advanceStageMarker.getBuildStagesList(),
workspaceTmpDir,
saveDir,
'-name no-files')
throw e
}
}
deactivateWorkspaceOverlay(advanceStageMarker.getBuildStagesList(), workspaceTmpDir, 'matter/' + saved_workspace,'-name "*.rps"')
}
}
}

def pushToArtifactoryAndUbai()
{
actionWithRetry {
Expand Down Expand Up @@ -1462,7 +1545,8 @@ def pipeline()
exportIoTReports()
}
}
stage("Generate GBL and OTA files")
def parallelNodesImages = [:]
stage("Generate SQA images")
{
advanceStageMarker()
/*
Expand All @@ -1471,9 +1555,16 @@ def pipeline()
BRD4161A and BRD4187C
WiFi
mg12 + wf200/rs9116 ( one per each combo)
mg24 + wf200/rs9116/917/917_soc ( one per each combo)
mg24 + wf200/rs9116/917 ( one per each combo)
*/
generateGblFileAndOTAfiles()

parallelNodesImages['Generate GBL and OTA files'] = { this.generateGblFileAndOTAfiles() }

// Generating the RPS file for 917 SoC
parallelNodesImages['Generate Rps files'] = { this.generateRpsFiles() }

parallelNodesImages.failFast = false
parallel parallelNodesImages
}
stage("Push to Artifactory and UBAI")
{
Expand Down

0 comments on commit d641ae1

Please sign in to comment.