Commit 5a7c1a35 authored by Syed Bilal Raees's avatar Syed Bilal Raees

deploying

parent add0ca8e
Pipeline #2026 passed with stage
in 10 seconds
stages:
- test
test_app:
# - test
- deploy
#test_app:
deploy_app:
image: python:3.6
stage: test
# stage: test
stage: deploy
before_script:
- python3 -V
......@@ -14,6 +16,10 @@ test_app:
- source python3-virtualenv/bin/activate
script:
- pip install Flask
- python test.py
# - python test.py
- echo "deploy to staging server"
environment:
name: staging
url : http://myApp.com
tags:
- ci
#import flask
from flask import Flask, request
#app = flask.Flask(__name__)
#app.config["DEBUG"] = True
app = Flask(__name__)
import flask
#from flask import Flask, request
app = flask.Flask(__name__)
app.config["DEBUG"] = True
#app = Flask(__name__)
@app.route('/', methods=['GET'])
def home():
return "<h1>HelloO DevOps people</h1><p>This site is a prototype API for greeting Nisum DevOps!</p>"
#app.run(host='myApp.com', port=5000)
app.run(host='myApp.com', port=5000)
@app.route('/')
def calc():
a = int(request.args.get('a'))
b = int(request.args.get('b'))
#@app.route('/')
#def calc():
# a = int(request.args.get('a'))
# b = int(request.args.get('b'))
return str(sum(a, b))
# return str(sum(a, b))
def sum(a, b):
return a + b
#def sum(a, b):
# return a + b
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