forked from TANGO-Project/alde
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
44 lines (44 loc) · 1.29 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
pipeline {
agent { label 'docker-slave' }
stages {
stage ('Pull repo code from github') {
steps {
checkout scm
}
}
stage('Install dependencies') {
steps {
sh "env"
sh "virtualenv -p python3 venv"
sh ". venv/bin/activate; pip install pybuilder==0.12.9; pyb install_dependencies"
}
}
stage('Test') {
steps {
sh ". venv/bin/activate; pyb coverage"
}
}
stage('Build Docker image') {
steps {
sh "git fetch --tags && resources/bin/make_docker.sh build sodaliteh2020/alde"
}
}
stage('SonarQube analysis') {
environment {
scannerHome = tool 'SonarQubeScanner'
}
steps {
withSonarQubeEnv('SonarCloud') {
sh "${scannerHome}/bin/sonar-scanner"
}
}
}
stage('Push image to DockerHub') {
steps {
withDockerRegistry(credentialsId: 'jenkins-sodalite.docker_token', url: '') {
sh "resources/bin/make_docker.sh push sodaliteh2020/alde"
}
}
}
}
}