forked from deparkes/simple-django-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
30 lines (30 loc) · 1006 Bytes
/
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
pipeline {
agent any
stages {
// stage('Clonar el repositorio (build)') {
// steps {
// echo "clonando repositorio..."
// git 'https://github.com/Uscateguito/simple-django-app.git'
// }
// }
stage('Instalar dependencias (build)') {
steps {
echo "instalando dependencias..."
// sh 'apt-get install -y pipx'
sh '/opt/venv/bin/pip install --upgrade pip && /opt/venv/bin/pip install -r requirements.txt'
}
}
stage('Ejecutar pylint (test)') {
steps {
echo "ejecutando pylint... comprobando errores"
sh '/opt/venv/bin/python -m pylint . || true'
}
}
stage('Desplegar con docker compose (deploy)') {
steps {
echo "construyendo imagen de Docker..."
sh 'docker build -t simple-django-app .'
}
}
}
}