forked from realsenseai/realsense_mipi_platform_driver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLRS_libci_pipeline.groovy
More file actions
62 lines (58 loc) · 1.16 KB
/
Copy pathLRS_libci_pipeline.groovy
File metadata and controls
62 lines (58 loc) · 1.16 KB
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
import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException
pipeline {
agent { label 'rs-orin-01.realsenseai.com' }
options {
timestamps()
timeout(time: 30, unit: 'MINUTES')
}
parameters {
booleanParam(name: 'REBOOT', defaultValue: false)
}
stages {
stage('Get artifacts') {
when {
expression { params.REBOOT == true }
}
steps {
script {
copyArtifacts filter: '**/*.tar.bz2',
projectName: 'D4xx_Kernel_Module_Jetson_JP6',
flatten: true,
target: 'artifacts/'
}
}
}
stage('Install artifacts') {
when {
expression { params.REBOOT == true }
}
steps {
sh """#!/bin/sh
tar -xf artifacts/rootfs.tar.bz2
# external script on agent to install artifacts
sudo install.tegra.artifacts.sh
"""
script {
build job: env.JOB_NAME,
wait: false,
parameters: [ booleanParam(name: 'REBOOT', value: false) ]
}
}
post {
success {
sh 'nohup sudo reboot &'
}
}
}
stage('Pytest') {
when {
expression { params.REBOOT == false }
}
steps {
sh """#!/bin/sh
pytest --tb=no -s test
"""
}
}
}
}