2 Commits

Author SHA1 Message Date
5257901e75 Merge pull request 'Test pipeline' (#21) from jenkins_agent_exemple into main
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Reviewed-on: #21
2026-04-30 14:47:05 +00:00
b3294a823e Test pipeline
Some checks failed
Organisation/sirh/pipeline/pr-main There was a failure building this commit
2026-04-30 14:45:35 +00:00

18
Jenkinsfile vendored
View File

@@ -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"
'''
} }
} }
} }