forked from NVIDIA/deepops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
57 lines (52 loc) · 1.3 KB
/
Jenkinsfile
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
pipeline {
agent any
stages {
stage('Stop Any Old Builds') {
steps {
milestone label: '', ordinal: Integer.parseInt(env.BUILD_ID) - 1
milestone label: '', ordinal: Integer.parseInt(env.BUILD_ID)
}
}
stage('Cluster Up') {
steps {
// TODO: ideally lock should work with declared stages
lock(resource: null, label: 'gpu', quantity: 1, variable: 'GPUDATA') {
echo "Munge files for testing"
sh '''
bash -x ./.jenkins-scripts/munge-files.sh
'''
echo "Cluster Up"
sh '''
bash -x ./.jenkins-scripts/test-cluster-up.sh
'''
echo "Verify we can run a GPU job"
sh '''
bash -x ./.jenkins-scripts/run-gpu-job.sh
'''
echo "Verify ingress config"
sh '''
bash -x ./.jenkins-scripts/verify-ingress-config.sh
'''
echo "Set up Slurm"
sh '''
pwd
cd virtual
./scripts/setup_slurm.sh
'''
echo "Test Slurm"
sh '''
bash -x ./.jenkins-scripts/test-slurm-job.sh
'''
}
}
}
}
post {
always {
sh '''
pwd
cd virtual && ./vagrant_shutdown.sh
'''
}
}
}