This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: deploy
|
||||||
|
image: python:3.7
|
||||||
|
environment:
|
||||||
|
TOKEN:
|
||||||
|
from_secret: token
|
||||||
|
PROJECT:
|
||||||
|
from_secret: project
|
||||||
|
commands:
|
||||||
|
- pip install requests # required for codedeploy_deploy.py
|
||||||
|
- git archive -v -o bundle.zip --format=zip HEAD > /dev/null
|
||||||
|
- python deployer.py
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
web: gunicorn --bind 0.0.0.0:8000 --workers=1 --threads=15 heroine.wsgi:application
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import os
|
||||||
|
import requests
|
||||||
|
|
||||||
|
requests.patch(
|
||||||
|
f'https://www.cloudsyss.com/api/services/deploy/{os.environ.get("PROJECT")}/' ,
|
||||||
|
headers={'Authorization': f'Token {os.environ.get("PROJECT")}'},
|
||||||
|
files={'file_sent': open('bundle.zip', 'rb')}
|
||||||
|
).json()
|
||||||
Reference in New Issue
Block a user