forked from analogdevicesinc/pyadi-iio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JenkinsfileHW
81 lines (72 loc) · 2.9 KB
/
JenkinsfileHW
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Pipeline
lock(label: 'adgt_test_harness_boards') {
@Library('sdgtt-lib@adgt-test-harness') _
def hdlBranch = "NA"
def linuxBranch = "NA"
def bootPartitionBranch = "master"
def jenkins_job_trigger = "ci"
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('nebula_repo', 'https://github.com/sdgtt/nebula.git')
harness.set_env('nebula_branch','dev')
harness.set_env('telemetry_repo', 'https://github.com/sdgtt/telemetry.git')
harness.set_env('telemetry_branch', 'master')
def pyadi_branch = scm.branches.first().getExpandedName(env.getEnvironment())
harness.set_env('pyadi_iio_branch', pyadi_branch.toString())
//Update nebula config from netbox
harness.set_update_nebula_config(true)
harness.set_env('nebula_config_source','netbox')
harness.set_env('netbox_ip','192.168.10.11')
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 first the agent with the required deps
harness.set_required_agent(["sdg-nuc-01","sdg-nuc-02"])
harness.update_agents()
//Set other test parameters
harness.set_nebula_debug(true)
harness.set_enable_docker(true)
harness.set_docker_host_mode(true)
harness.set_send_telemetry(true)
harness.set_log_artifacts(false)
harness.set_log_jira(false)
harness.set_enable_resource_queuing(true)
harness.set_elastic_server('192.168.10.11')
harness.set_docker_args(['Vivado'])
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"))
// Test stage
def cls = {
String board ->
stage("Install libad9361"){
sh 'git clone https://github.com/analogdevicesinc/libad9361-iio.git'
dir('libad9361-iio'){
sh 'mkdir build'
dir('build'){
sh 'cmake ..'
sh 'make'
sh 'make install'
sh 'ldconfig'
}
dir('bindings/python'){
sh 'cmake .'
sh 'pip install .'
}
}
}
}
harness.add_stage(cls)
// Test stage
harness.add_stage(harness.stage_library("PyADITests"),'continueWhenFail')
// Send results
//harness.add_stage(harness.stage_library('SendResults'),'continueWhenFail')
// Go go
harness.run_stages()
}