Skip to content

Commit

Permalink
added test environment deploy + fixed ui
Browse files Browse the repository at this point in the history
Signed-off-by: Tullio Sebastiani <[email protected]>
  • Loading branch information
tsebastiani committed Feb 13, 2024
1 parent 9d5eb43 commit 5876d34
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Set Secrets
run: |
CONTENT=`jq '.production.environment_variables.BUCKET_NAME="${{secrets.LAMBDA_PRODUCTION_BUCKET}}"' zappa_settings.json` && echo $CONTENT > zappa_settings.json
CONTENT=`jq '.test.environment_variables.BUCKET_NAME="${{secrets.LAMBDA_TEST_BUCKET}}"' zappa_settings.json` && echo $CONTENT > zappa_settings.json
- name: Configure AWS Creds
uses: aws-actions/configure-aws-credentials@v2
with:
Expand All @@ -26,4 +30,6 @@ jobs:
run: poetry install --no-interaction

- name: Zappa deployments
run: poetry run zappa update production
run: |
poetry run zappa update production
poetry run zappa update test
2 changes: 1 addition & 1 deletion templates/downloads.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h5>refresh the page to renew them</h5>
{% if files_number > 0 %}
<h5> once the archive files will be all downloaded to untar them run the command:</h5>
<div class="col">
<h5><code id="shell_code">printf 'n prometheus-%02d.tar\n' {1..{{ files_number }}} | tar xfM prometheus-00.tar</code></h5>
<h5><code id="shell_code">cat prometheus-* > prometheus-backup.tar && tar xfv prometheus-backup.tar</code></h5>
</div>
<div class="col col-xl-1">
<button onclick="copyText('shell_code')"><i class="fa-solid fa-copy"></i></button>
Expand Down
16 changes: 16 additions & 0 deletions zappa_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
"production": {
"app_function": "app.app",
"aws_region": "us-west-2",
"environment_variables": {
"BUCKET_NAME": "",
"S3_LINK_EXPIRATION": "1200"
},
"project_name": "krkn-telemetry",
"runtime": "python3.9",
"s3_bucket": "krkn-telemetry-lambda-bucket",
"slim_handler": true
},
"test": {
"app_function": "app.app",
"aws_region": "us-west-2",
"environment_variables": {
"BUCKET_NAME": "",
"S3_LINK_EXPIRATION": "1200"
},
"project_name": "krkn-telemetry",
"runtime": "python3.9",
"s3_bucket": "krkn-telemetry-lambda-bucket",
Expand Down

0 comments on commit 5876d34

Please sign in to comment.