-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathJenkinsfile
More file actions
68 lines (68 loc) · 2.36 KB
/
Jenkinsfile
File metadata and controls
68 lines (68 loc) · 2.36 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
63
64
65
66
67
68
pipeline {
agent {
docker {
image 'python:3.9-buster'
args '-v /root/.m2:/root/.m2'
}
}
stages {
stage('Pre-Tesks') {
steps {
sh 'python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple'
sh 'pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple'
}
}
stage('Build') {
steps {
sh 'python manage.py'
}
}
stage('Test') {
steps {
sh 'python manage.py test'
}
}
stage('Deploy') {
steps {
sh 'echo disabled'
// sshagent(['efe4fb22-9a6d-49d4-aea5-de7d077d397e']) {
// sh """
// ssh -o StrictHostKeyChecking=no -l group8 comp3030j.ucd.ie '
// ls
// cd /home/group8/comp3030j-project
// git checkout master
// git fetch --all
// git reset --hard origin/master
// git pull
// python3 -m pip install -r requirements.txt
// cd rasa
// chmod 777 train.sh
// '
// """
// }
// sshagent(['efe4fb22-9a6d-49d4-aea5-de7d077d397e']) {
// sh """
// ssh -o StrictHostKeyChecking=no -l group8 comp3030j.ucd.ie '
//
// ls
// cd /home/group8/comp3030j-project
// killall python3
// killall python
// git checkout master
// git fetch --all
// git reset --hard origin/master
// git pull
// python3 -m pip install -r requirements.txt
// nohup python3 manage.py runserver 0.0.0.0:5008 > log.txt 2>&1 &
// '
// """
// }
}
}
stage('Post-Tasks') {
steps {
sh 'echo Done!'
}
}
}
}