Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JenkinsfileHW: Update to mock Jenkinsfile for testing
Signed-off-by: bia1708 <bianca-maria.popu@analog.com>
- Loading branch information
Showing
1 changed file
with
89 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,98 @@ | ||
// Pipeline | ||
lock(label: 'adgt_test_harness_boards') { | ||
@Library('sdgtt-lib@adgt-test-harness') _ // Not necessary when we turn on global libraries :) | ||
def hdlBranch = "NA" | ||
def linuxBranch = "NA" | ||
def bootPartitionBranch = "2021_r2" | ||
def firmwareVersion = 'v0.34' | ||
def bootfile_source = 'artifactory' // options: sftp, artifactory, http, local | ||
def harness = getGauntlet(hdlBranch, linuxBranch, bootPartitionBranch, firmwareVersion, bootfile_source) | ||
|
||
//Update repos | ||
harness.set_env('libiio_repo', 'http://gateway.englab:3000/mirrors/libiio.git') | ||
harness.set_env('libiio_branch', 'v0.25') | ||
harness.set_env('nebula_repo', 'http://gateway.englab:3000/mirrors/nebula.git') | ||
harness.set_env('nebula_branch','dev') | ||
harness.set_env('nebula_config_branch','release') | ||
// harness.set_env('telemetry_repo', 'http://gateway.englab:3000/mirrors/telemetry.git') | ||
// harness.set_env('telemetry_branch', 'master') | ||
harness.set_env('matlab_repo', 'https://github.com/analogdevicesinc/TransceiverToolbox.git') // Not necessary when using checkout scm | ||
harness.set_env('matlab_release','R2023b') | ||
harness.set_env('matlab_license','network') | ||
harness.set_matlab_timeout('8m') | ||
|
||
//Update nebula config from netbox | ||
harness.set_update_nebula_config(true) | ||
harness.set_env('nebula_config_source','netbox') | ||
harness.set_env('netbox_ip','primary.englab') | ||
harness.set_env('netbox_port','8000') | ||
harness.set_env('netbox_base_url','netbox') | ||
withCredentials([string(credentialsId: 'netbox_token', variable: 'TOKEN')]) { | ||
harness.set_env('netbox_token', TOKEN) | ||
pipeline { | ||
agent { node { label "master" } } | ||
stages { | ||
stage ('Stage1') { | ||
steps { | ||
script { | ||
echo "DONE" | ||
sh 'wget https://artifactory.analog.com:443/artifactory/sdg-generic-development/test_upload/info.txt && cat info.txt' | ||
} | ||
} | ||
} | ||
} | ||
harness.set_env('netbox_devices_tag','active') | ||
} | ||
|
||
// lock(label: 'adgt_test_harness_boards') { | ||
// @Library('sdgtt-lib@adgt-test-harness') _ // Not necessary when we turn on global libraries :) | ||
// def hdlBranch = "NA" | ||
// def linuxBranch = "NA" | ||
// def bootPartitionBranch = "2021_r2" | ||
// def firmwareVersion = 'v0.34' | ||
// def bootfile_source = 'artifactory' // options: sftp, artifactory, http, local | ||
// def harness = getGauntlet(hdlBranch, linuxBranch, bootPartitionBranch, firmwareVersion, bootfile_source) | ||
|
||
// //Update repos | ||
// harness.set_env('libiio_repo', 'http://gateway.englab:3000/mirrors/libiio.git') | ||
// harness.set_env('libiio_branch', 'v0.25') | ||
// harness.set_env('nebula_repo', 'http://gateway.englab:3000/mirrors/nebula.git') | ||
// harness.set_env('nebula_branch','dev') | ||
// harness.set_env('nebula_config_branch','release') | ||
// // harness.set_env('telemetry_repo', 'http://gateway.englab:3000/mirrors/telemetry.git') | ||
// // harness.set_env('telemetry_branch', 'master') | ||
// harness.set_env('matlab_repo', 'https://github.com/analogdevicesinc/TransceiverToolbox.git') // Not necessary when using checkout scm | ||
// harness.set_env('matlab_release','R2023b') | ||
// harness.set_env('matlab_license','network') | ||
// harness.set_matlab_timeout('8m') | ||
|
||
// //Update nebula config from netbox | ||
// harness.set_update_nebula_config(true) | ||
// harness.set_env('nebula_config_source','netbox') | ||
// harness.set_env('netbox_ip','primary.englab') | ||
// harness.set_env('netbox_port','8000') | ||
// harness.set_env('netbox_base_url','netbox') | ||
// withCredentials([string(credentialsId: 'netbox_token', variable: 'TOKEN')]) { | ||
// harness.set_env('netbox_token', TOKEN) | ||
// } | ||
// harness.set_env('netbox_devices_tag','active') | ||
|
||
//Update agent with required deps | ||
harness.set_required_agent(["sdg-nuc-01","sdg-nuc-02"]) | ||
harness.set_env('update_container_lib', true) | ||
harness.set_env('update_lib_requirements', true) | ||
harness.update_agents() | ||
// //Update agent with required deps | ||
// harness.set_required_agent(["sdg-nuc-01","sdg-nuc-02"]) | ||
// harness.set_env('update_container_lib', true) | ||
// harness.set_env('update_lib_requirements', true) | ||
// harness.update_agents() | ||
|
||
//Set other test parameters | ||
harness.set_nebula_debug(true) | ||
harness.set_enable_docker(true) | ||
harness.set_docker_host_mode(true) // Set to false if using machine-specific license | ||
harness.set_send_telemetry(false) | ||
harness.set_log_jira(false) | ||
harness.set_enable_resource_queuing(true) | ||
harness.set_lock_agent(false) // Set to true if using machine-specific license | ||
harness.set_elastic_server('192.168.10.1') | ||
harness.set_required_hardware(["zynq-zed-adv7511-adrv9002-vcmos", | ||
"zynq-zed-adv7511-adrv9002-rx2tx2-vcmos", | ||
"zynqmp-zcu102-rev10-adrv9002-vcmos", | ||
"zynqmp-zcu102-rev10-adrv9002-rx2tx2-vcmos", | ||
"zynqmp-zcu102-rev10-adrv9002-vlvds", | ||
"zynqmp-zcu102-rev10-adrv9002-rx2tx2-vlvds", | ||
"pluto", | ||
"zynq-adrv9361-z7035-fmc", | ||
"zynq-zed-adv7511-ad9364-fmcomms4", | ||
"zynq-zed-adv7511-ad9361-fmcomms2-3", | ||
"zynq-zc706-adv7511-ad9361-fmcomms5", | ||
"zynq-zc702-adv7511-ad9361-fmcomms2-3", | ||
"zynq-adrv9364-z7020-bob-vcmos", | ||
"zynq-adrv9364-z7020-bob-vlvds"]) | ||
harness.set_docker_args(['Vivado', 'MATLAB', 'udev']) | ||
harness.set_nebula_local_fs_source_root("artifactory.analog.com") | ||
// //Set other test parameters | ||
// harness.set_nebula_debug(true) | ||
// harness.set_enable_docker(true) | ||
// harness.set_docker_host_mode(true) // Set to false if using machine-specific license | ||
// harness.set_send_telemetry(false) | ||
// harness.set_log_jira(false) | ||
// harness.set_enable_resource_queuing(true) | ||
// harness.set_lock_agent(false) // Set to true if using machine-specific license | ||
// harness.set_elastic_server('192.168.10.1') | ||
// harness.set_required_hardware(["zynq-zed-adv7511-adrv9002-vcmos", | ||
// "zynq-zed-adv7511-adrv9002-rx2tx2-vcmos", | ||
// "zynqmp-zcu102-rev10-adrv9002-vcmos", | ||
// "zynqmp-zcu102-rev10-adrv9002-rx2tx2-vcmos", | ||
// "zynqmp-zcu102-rev10-adrv9002-vlvds", | ||
// "zynqmp-zcu102-rev10-adrv9002-rx2tx2-vlvds", | ||
// "pluto", | ||
// "zynq-adrv9361-z7035-fmc", | ||
// "zynq-zed-adv7511-ad9364-fmcomms4", | ||
// "zynq-zed-adv7511-ad9361-fmcomms2-3", | ||
// "zynq-zc706-adv7511-ad9361-fmcomms5", | ||
// "zynq-zc702-adv7511-ad9361-fmcomms2-3", | ||
// "zynq-adrv9364-z7020-bob-vcmos", | ||
// "zynq-adrv9364-z7020-bob-vlvds"]) | ||
// harness.set_docker_args(['Vivado', 'MATLAB', 'udev']) | ||
// harness.set_nebula_local_fs_source_root("artifactory.analog.com") | ||
|
||
// Set stages (Stages are run sequentially on agents.) | ||
harness.add_stage(harness.stage_library("UpdateBOOTFiles"), 'stopWhenFail', | ||
harness.stage_library("RecoverBoard")) | ||
// // Set stages (Stages are run sequentially on agents.) | ||
// harness.add_stage(harness.stage_library("UpdateBOOTFiles"), 'stopWhenFail', | ||
// harness.stage_library("RecoverBoard")) | ||
|
||
// Test stage | ||
harness.set_matlab_commands(["ad=adi.utils.libad9361", | ||
"ad.download_libad9361()", | ||
"addpath(genpath('test'))", | ||
"runHWTests(getenv('board'))"]) | ||
harness.add_stage(harness.stage_library("MATLABTests"),'continueWhenFail') | ||
// // Test stage | ||
// harness.set_matlab_commands(["ad=adi.utils.libad9361", | ||
// "ad.download_libad9361()", | ||
// "addpath(genpath('test'))", | ||
// "runHWTests(getenv('board'))"]) | ||
// harness.add_stage(harness.stage_library("MATLABTests"),'continueWhenFail') | ||
|
||
// Send results | ||
harness.add_stage(harness.stage_library('SendResults'),'continueWhenFail') | ||
// // Send results | ||
// harness.add_stage(harness.stage_library('SendResults'),'continueWhenFail') | ||
|
||
// Go go | ||
harness.run_stages() | ||
} | ||
// // Go go | ||
// harness.run_stages() | ||
// } |