Test pipeline #21
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@@ -1,13 +1,23 @@
|
||||
pipeline
|
||||
{
|
||||
agent any
|
||||
|
||||
stages
|
||||
{
|
||||
stage ( 'Build' )
|
||||
stage ( 'checkout' ){ steps {sh 'echo "Debut du pipeline"' } }
|
||||
stage ( 'checkout' ){ steps { checkout scm } }
|
||||
stage ( 'Deploiement' )
|
||||
{
|
||||
steps
|
||||
{
|
||||
echo 'Test réussi'
|
||||
when { branch 'main' }
|
||||
steps {
|
||||
sh '''
|
||||
cd /jenkins_test/ && python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
python manage.py makemigrations
|
||||
python manage.py migrate
|
||||
echo "Deploiement reussi"
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user