-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
39 lines (38 loc) · 1.04 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
pipeline {
agent any
stages {
stage('Setup') {
steps {
echo 'Setup...'
sh """
which python
python3 -v
whoami
pwd
python3 ./setup.py install --user
"""
}
}
stage('Test') {
steps {
sh """
python3 -m coverage run ./mentor/tests_jenkins.py
"""
}
}
stage('Safety Check') {
steps {
sh """
python3 -m safety check -r requirements.txt
"""
}
}
stage('SonarQube Analysis') {
steps {
withSonarQubeEnv('Goat Boat Sonar') {
sh "/bitnami/jenkins/home/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQubeScanner/sonar-scanner-4.6.2.2472-linux/bin/sonar-scanner -Dsonar.projectKey=Goat-Boat -Dsonar.python.version=3.7"
}
}
}
}
}