Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pipeline {
- agent any
- environment {
- AUTHOR = 'Guillaume Rémy'
- PURPOSE = 'This is a sample app'
- LIFE_QUOTE = 'The greatest glory in living lies not in never falling, but in rising every time we fall.'
- }
- stages {
- stage('Checkout') {
- steps {
- // Checkout your source code repository
- git branch: 'main',
- url: 'https://gitlab.com/qualibre-info-formations/public/python-django-simple.git'
- }
- }
- stage('Build') {
- steps {
- // Build your Django application
- sh 'docker build -t django-simple-app .'
- }
- }
- stage('Deploy') {
- steps {
- // Deploy your Django application
- sh 'docker rm -f django-sample-app || true'
- sh 'docker run --name django-sample-app -d -p 8000:8000 -it -e AUTHOR="$AUTHOR" -e PURPOSE="$PURPOSE" -e LIFE_QUOTE="$LIFE_QUOTE" django-simple-app'
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement