forked from unfoldingWord-dev/tx-manager
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature - Issue 560 - Merges tx-manager-lambda into tx-manager (unfol…
…dingWord-dev#91) * Merges tx-manager-lambda into tx-manager * Makes files executable
- Loading branch information
Showing
160 changed files
with
1,381 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
[run] | ||
source= | ||
client | ||
manager | ||
converters | ||
aws_tools | ||
door43_tools | ||
general_tools | ||
gogs_tools | ||
lambda_handlers | ||
libraries | ||
functions | ||
|
||
include = | ||
functions/*/main.py | ||
libraries/* | ||
|
||
omit = | ||
*/__init__.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
################################################################################ | ||
# | ||
# The AWS environment variables will only be available when merging a | ||
# pull request from develop into master due to travis security settings. | ||
# | ||
################################################################################ | ||
|
||
if [[ ${TRAVIS_EVENT_TYPE} == "push" && (${TRAVIS_BRANCH} == "master" || ${TRAVIS_BRANCH} == "develop") && ${TRAVIS_SECURE_ENV_VARS} == "true" ]] | ||
then | ||
echo "Deploying..." | ||
repoDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
thisDir="$( dirname "${repoDir}" )" | ||
"${thisDir}/apex" deploy -C "${repoDir}" --env ${TRAVIS_BRANCH} | ||
else | ||
echo "Not deploying:" | ||
echo " TRAVIS_EVENT_TYPE = $TRAVIS_EVENT_TYPE (must be 'push')" | ||
echo " TRAVIS_BRANCH = $TRAVIS_BRANCH (must be 'master' or 'develop')" | ||
echo " TRAVIS_SECURE_ENV_VARS = $TRAVIS_SECURE_ENV_VARS (must be 'true')" | ||
fi |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.dist-info/ | ||
*.egg-info/ | ||
.gitignore | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* | ||
!/main.py | ||
!/.gitignore | ||
!/.apexignore | ||
!/__init__.py | ||
!/requirements.txt | ||
!/function.json |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"description": "Callback function for the Web Client, called by https://api.door43.org/client/callback in the tx_start_job function" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from __future__ import unicode_literals, print_function | ||
from libraries.lambda_handlers.client_callback_handler import ClientCallbackHandler | ||
|
||
|
||
def handle(event, context): | ||
""" | ||
Called by API Gateway when the tx-manager is notified of a finished or failed conversion | ||
:param dict event: | ||
:param context: | ||
:return dict: | ||
""" | ||
return ClientCallbackHandler().handle(event, context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.dist-info/ | ||
*.egg-info/ | ||
.gitignore | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* | ||
!/main.py | ||
!/.gitignore | ||
!/.apexignore | ||
!/__init__.py | ||
!/requirements.txt | ||
!/function.json |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"description": "Client webhook, called by https://api.door43.org/client/webhook from a Gogs repo when commit occurs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from __future__ import unicode_literals, print_function | ||
from libraries.lambda_handlers.client_webhook_handler import ClientWebhookHandler | ||
|
||
|
||
def handle(event, context): | ||
""" | ||
Called by API Gateway when a Gogs repo triggers a webhook with API Gateway URL | ||
:param dict event: | ||
:param context: | ||
:return dict: | ||
""" | ||
return ClientWebhookHandler().handle(event, context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.dist-info/ | ||
*.egg-info/ | ||
.gitignore | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
* | ||
!/main.py | ||
!/.gitignore | ||
!/.apexignore | ||
!/__init__.py | ||
!/requirements.txt | ||
!/function.json | ||
!/module.json | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"description": "Converts Markdown (MD) files to HTML, called by https://api.door43.org/tx/convert/md2html in the tx_start_job function" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from __future__ import unicode_literals, print_function | ||
from libraries.lambda_handlers.convert_handler import ConvertHandler | ||
from libraries.converters.md2html_converter import Md2HtmlConverter | ||
|
||
|
||
def handle(event, context): | ||
""" | ||
Called through API Gateway to convert a given archive from MD to HTML | ||
:param dict event: | ||
:param context: | ||
:return dict: | ||
""" | ||
return ConvertHandler(Md2HtmlConverter).handle(event, context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "md2html", | ||
"version": "1", | ||
"type": "conversion", | ||
"resource_types": ["obs", "ta", "tn", "tq", "tw"], | ||
"input_format": ["md"], | ||
"output_format": ["html"], | ||
"options": [], | ||
"private_links": [], | ||
"public_links": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.dist-info/ | ||
*.egg-info/ | ||
.gitignore | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
* | ||
!/main.py | ||
!/.gitignore | ||
!/.apexignore | ||
!/__init__.py | ||
!/requirements.txt | ||
!/function.json | ||
!/module.json | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"description": "Converts USFM files to HTML, called by https://api.door43.org/tx/convert/usfm2html in the tx_start_job function" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from __future__ import unicode_literals, print_function | ||
from libraries.lambda_handlers.convert_handler import ConvertHandler | ||
from libraries.converters.usfm2html_converter import Usfm2HtmlConverter | ||
|
||
|
||
def handle(event, context): | ||
""" | ||
Called through API Gateway to convert a given archive from MD to HTML | ||
:param dict event: | ||
:param context: | ||
:return dict: | ||
""" | ||
return ConvertHandler(Usfm2HtmlConverter).handle(event, context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "usfm2html", | ||
"version": "1", | ||
"type": "conversion", | ||
"resource_types": ["bible", "ulb", "udb", "reg"], | ||
"input_format": ["usfm"], | ||
"output_format": ["html"], | ||
"options": [], | ||
"private_links": [], | ||
"public_links": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.dist-info/ | ||
*.egg-info/ | ||
.gitignore | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* | ||
!/main.py | ||
!/.gitignore | ||
!/.apexignore | ||
!/__init__.py | ||
!/requirements.txt | ||
!/function.json |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"description": "Dashboard for tX-Manager stats, called from https://api.door43.org/tx/dashboard" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from __future__ import unicode_literals, print_function | ||
from libraries.lambda_handlers.dashboard_handler import DashboardHandler | ||
|
||
|
||
def handle(event, context): | ||
""" | ||
Called by API Gateway when user wants a list of endpoints | ||
:param dict event: | ||
:param context: | ||
:return dict: | ||
""" | ||
return DashboardHandler().handle(event, context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.dist-info/ | ||
*.egg-info/ | ||
.gitignore | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* | ||
!/main.py | ||
!/.gitignore | ||
!/.apexignore | ||
!/__init__.py | ||
!/requirements.txt | ||
!/function.json |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"description": "Deploys a revision of a repo to door43.org, triggered when build_log.json is added to a cdn.door43.org/u/<user>/<repo>/<commit> S3 directory" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from __future__ import unicode_literals, print_function | ||
from libraries.lambda_handlers.door43_deploy_handler import Door43DeployHandler | ||
|
||
|
||
def handle(event, context): | ||
""" | ||
Triggered by adding a project's revision directory to the u/ directory of the cdn.door43.org bucket | ||
:param dict event: | ||
:param context: | ||
:return dict: | ||
""" | ||
return Door43DeployHandler().handle(event, context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.dist-info/ | ||
*.egg-info/ | ||
.gitignore | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* | ||
!/main.py | ||
!/.gitignore | ||
!/.apexignore | ||
!/__init__.py | ||
!/requirements.txt | ||
!/function.json |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"description": "Takes `<user>/<repo>/<commit>` as a parameter and returns a link to a full HTML page for printing. Called by https://api.door43.org/tx/print?id=<user>/<repo>/<commit>" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from __future__ import unicode_literals, print_function | ||
from libraries.lambda_handlers.door43_print_handler import Door43PrintHandler | ||
|
||
|
||
def handle(event, context): | ||
""" | ||
Called by API Gateway when a user wants to print a whole project on live.door43.org | ||
:param dict event: | ||
:param context: | ||
:return dict: | ||
""" | ||
return Door43PrintHandler().handle(event, context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.dist-info/ | ||
*.egg-info/ | ||
.gitignore | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* | ||
!/main.py | ||
!/.gitignore | ||
!/.apexignore | ||
!/__init__.py | ||
!/requirements.txt | ||
!/function.json |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"description": "List endpoints of the tX Manager API, called by https://api.door43.org/tx" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from __future__ import unicode_literals, print_function | ||
from libraries.lambda_handlers.list_endpoints_handler import ListEndpointsHandler | ||
|
||
|
||
def handle(event, context): | ||
""" | ||
Called by API Gateway when user wants a list of endpoints | ||
:param dict event: | ||
:param context: | ||
:return dict: | ||
""" | ||
return ListEndpointsHandler().handle(event, context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.dist-info/ | ||
*.egg-info/ | ||
.gitignore | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* | ||
!/main.py | ||
!/.gitignore | ||
!/.apexignore | ||
!/__init__.py | ||
!/requirements.txt | ||
!/function.json |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"description": "List jobs, called by https://api.door43.org/tx/job[/<job-id>]?gogs_user_token=<user_token> to get the status of one or more jobs" | ||
} |
Oops, something went wrong.