Skip to content

Commit e8981b3

Browse files
committed
Merge pull request #11 from SpaceInvaderTech/bugfix/ci-cd
Bugfix/ci cd
2 parents a58023b + d154f73 commit e8981b3

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

.github/workflows/build-deploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ jobs:
3838
- name: Install Python
3939
uses: actions/setup-python@v4
4040
with:
41-
python-version: '3.11'
41+
python-version: '3.12'
4242

4343
- name: Install Poetry
4444
run: |
45-
pipx install poetry==1.8.2
46-
poetry install --no-root --no-interaction
45+
pip install "poetry==1.8.2"
4746
4847
- name: Deploy to AWS
49-
run: ./node_modules/.bin/sls deploy --stage ${{ github.event.inputs.stage }}
48+
run: ./node_modules/.bin/sls deploy --stage ${{ github.event.inputs.stage }}
49+
env:
50+
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
File renamed without changes.

launched.AppleCollector.plist

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<string>launched.AppleCollector</string>
77
<key>ProgramArguments</key>
88
<array>
9-
<string>python</string>
9+
<string>/Users/spaceinvader/.pyenv/versions/3.12.9/bin/python3.12</string>
1010
<string>manage.py</string>
1111
<string>refresh-credentials</string>
1212
<string>--schedule-location-fetching</string>
@@ -15,12 +15,9 @@
1515
<string>/dev/null</string>
1616
<key>StandardOutPath</key>
1717
<string>/dev/null</string>
18-
<key>StartCalendarInterval</key>
19-
<dict>
20-
<key>Minute</key>
21-
<integer>0</integer>
22-
</dict>
18+
<key>StartInterval</key>
19+
<integer>900</integer>
2320
<key>WorkingDirectory</key>
24-
<string>/path/to/these/scripts</string>
21+
<string>/Users/spaceinvader/Documents/AppleCollector</string>
2522
</dict>
2623
</plist>

serverless.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ provider:
55
runtime: python3.12
66
stage: ${opt:stage, 'prod'}
77
region: eu-central-1
8+
layers:
9+
- Ref: PythonRequirementsLambdaLayer
810
environment:
911
STAGE: ${self:provider.stage}
1012
QUEUE_URL: !GetAtt LocationsQueue.QueueUrl
@@ -37,7 +39,7 @@ provider:
3739
- !GetAtt LocationsQueue.Arn
3840

3941
package:
40-
individually: true
42+
individually: false
4143
patterns:
4244
- '!node_modules/**'
4345
- '!.venv/**'
@@ -113,8 +115,17 @@ custom:
113115
pythonRequirements:
114116
usePoetry: true
115117
dockerizePip: true
118+
slim: true
119+
layer:
120+
name: ${self:provider.stage}-${self:service}-layer
121+
compatibleRuntimes:
122+
- python3.12
123+
compatibleArchitectures:
124+
- x86_64
125+
allowedAccounts:
126+
- '*'
116127

117128
plugins:
118-
- serverless-offline
119129
- serverless-python-requirements
130+
- serverless-offline
120131
- serverless-cloudside-plugin

0 commit comments

Comments
 (0)