Commit 4a7baf19 authored by Syed Bilal Raees's avatar Syed Bilal Raees

changes in yaml

parent 40e06060
Pipeline #2084 failed with stage
in 9 seconds
......@@ -31,11 +31,11 @@ build_app:
# - sudo systemctl start prod.service
# - sudo systemctl status python.service
- |
if [[ $CI_COMMIT_REF_NAME == master ]]; then
if [[ $CI_COMMIT_REF_NAME = master ]]; then
echo "deploying to prod server"
sudo systemctl start prod.service
elif [[ $CI_COMMIT_REF_NAME == dev ]]; then
sudo systemctl start python.service
systemctl start prod.service
elif [[ $CI_COMMIT_REF_NAME = dev ]]; then
systemctl start python.service
fi
# environment:
# name: staging
......
import flask
app = flask.Flask(__name__)
app.config["DEBUG"] = True
@app.route('/', methods=['GET'])
def home():
return "<h1>PRODUCTION ENVIRONMENT</h1><p>This site is a prototype API for greeting Nisum DevOps!</p>"
app.run(host='0.0.0.0', port=5003)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment