https://github.com/stephanfward/deployflaskwebongithub
https://github.com/stephanfward/deployflaskwebongithub
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/stephanfward/deployflaskwebongithub
- Owner: StephanFWard
- Created: 2023-11-22T15:10:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-22T15:43:28.000Z (about 2 years ago)
- Last Synced: 2023-11-22T16:35:58.955Z (about 2 years ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This README provides step-by-step instructions on how to set up and use the auto-deployment script if Flask web application is hosted on GitHub. It covers prerequisites, installation steps, configuration, and additional notes for customization. Users can follow these instructions to deploy their Flask web application using Jenkins.
# Auto Deployment Script
This Python script automates the deployment of a Flask web application using Jenkins. It includes setting up a virtual environment, installing dependencies, running tests, and triggering a Jenkins build.
## Prerequisites
- Python 3.x
- `virtualenv` package (optional but recommended)
- `requests` library.
Clone the web application repository:
git clone https://github.com/StephanFWard/DeployFlaskWebOnGithub.git
cd DeployFlaskWebOnGithub
Install the required packages:
pip install -r requirements.txt
Replace the placeholders in the deploy_app.py script with your Jenkins server URL and job name.
Set up a virtual environment (optional but recommended):
python -m venv venv
. venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Run tests:
pytest tests
If tests pass, deploy the application:
python deploy_app.py
Notes:
Make sure your Jenkins server is accessible from the machine where you run this script.
Ensure that Jenkins job is properly configured for auto deployment.
You can customize the test command and deployment process based on your application's needs.