Skip to content

Commit

Permalink
Merge pull request #32 from mongulu-cm/feat/save_main
Browse files Browse the repository at this point in the history
Feat/save main
  • Loading branch information
billmetangmo authored Oct 31, 2023
2 parents 2841687 + cf69883 commit adb3fca
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/deploy-data-ingestion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ on:
push:
branches:
- main
- feat/save_main
paths:
- 'data_ingestion/events_tracking/**'
- '.github/workflows/deploy-data-ingestion.yml'


jobs:
deploy:
Expand All @@ -21,11 +24,15 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1 # Replace with your desired AWS region

- name: Set up Python
uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a # ratchet:actions/setup-python@v2
with:
python-version: "3.11"
- name: Deploy Lambda
run: |
echo | pwd
ls
cd data_ingestion/events_tracking
echo | pwd
sam deploy --parameter-overrides "easyAppointementsKey=${{ secrets.EASY_APPOINTMENTS_KEY }} dbHost=${{ secrets.DB_HOST }} dbPort=${{ secrets.DB_PORT }} dbUser=${{ secrets.DB_USER }} dbPassword=${{ secrets.DB_PASSWORD }} dbName=${{ secrets.DB_NAME }}" --no-fail-on-empty-changeset
sam build
sam deploy --parameter-overrides "easyAppointementsKey=${{ secrets.EASY_APPOINTMENTS_KEY }} dbHost=${{ secrets.DB_HOST }} dbPort=${{ secrets.DB_PORT }} dbUser=${{ secrets.DB_USER }} dbPassword=${{ secrets.DB_PASSWORD }} dbName=${{ secrets.DB_NAME }}"
2 changes: 1 addition & 1 deletion data_ingestion/events_tracking/.aws-sam/build.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ codeuri = "C:\\Users\\DELL\\Documents\\Workspace\\mongulu\\manzi-mfa\\data_inges
runtime = "python3.11"
architecture = "x86_64"
handler = "app.lambda_handler"
manifest_hash = "af96387165dae99fe6c44796318c954d"
manifest_hash = "6079aca1c831a03c2f4098ea1e7e75bd"
packagetype = "Zip"
functions = ["EventTrackingFunction"]

Expand Down
6 changes: 3 additions & 3 deletions data_ingestion/events_tracking/event-tracking/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def connect_to_db():

db_user = os.environ["dbUser"]
db_password = os.environ["dbPassword"]#get_parameter("/manzi-mfa/postgrel/password")
db_host = os.environ["db_host"]
db_port = os.environ["db_port"]
db_name = os.environ["db_name"]
db_host = os.environ["dbHost"]
db_port = os.environ["dbPort"]
db_name = os.environ["dbName"]

connection = psycopg2.connect(
host=db_host,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
requests==2.31.0
requests==2.31.0
psycopg2-binary
sqlalchemy
sqlalchemy

0 comments on commit adb3fca

Please sign in to comment.