Test pipeline
Some checks failed
Organisation/sirh/pipeline/pr-main There was a failure building this commit
Some checks failed
Organisation/sirh/pipeline/pr-main There was a failure building this commit
This commit is contained in:
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@@ -1,13 +1,23 @@
|
|||||||
pipeline
|
pipeline
|
||||||
{
|
{
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
stages
|
stages
|
||||||
{
|
{
|
||||||
stage ( 'Build' )
|
stage ( 'checkout' ){ steps {sh 'echo "Debut du pipeline"' } }
|
||||||
|
stage ( 'checkout' ){ steps { checkout scm } }
|
||||||
|
stage ( 'Deploiement' )
|
||||||
{
|
{
|
||||||
steps
|
when { branch 'main' }
|
||||||
{
|
steps {
|
||||||
echo 'Test réussi'
|
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