This repository was archived by the owner on Dec 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Update Lambda Building and Related GHA Job #20
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
85e5e71
Convert lambda Python version to argument
mcdonnnj a96fe7e
Fix up build script
mcdonnnj 7cc9b1d
Remove unnecessary Python setup
mcdonnnj a2745ef
Change output file names both locally and in Actions workflows
mcdonnnj f4295ad
Restore simple build script output name
mcdonnnj a759190
Enable Docker BuildKit in Workflows
mcdonnnj 8004177
Clean up Dockerfile
mcdonnnj b7766d8
Adjust asset name for release uploads
mcdonnnj 7286f2d
Switch cp options to their long form
mcdonnnj 7d2718d
Add comment explaining options for zip in build script
mcdonnnj ec77abe
Expand the comment for an Actions job step
mcdonnnj f525714
Add comment explaining variable usage in GHA step command
mcdonnnj 1b65505
Merge branch 'develop' into improvement/dynamic_python_version
mcdonnnj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,15 +1,32 @@ | ||
FROM lambci/lambda:build-python3.8 | ||
LABEL maintainer="mark.feldhousen@trio.dhs.gov" | ||
LABEL vendor="Cyber and Infrastructure Security Agency" | ||
# Get the Python version to use from the commandline if provided | ||
ARG PY_VERSION=3.8 | ||
|
||
FROM lambci/lambda:build-python$PY_VERSION | ||
|
||
# Declare it a second time so it's brought into this scope. | ||
ARG PY_VERSION=3.8 | ||
# Get the output file name base from the commandline if provided | ||
ARG FILE_NAME=skeleton-aws-lambda | ||
|
||
# For a list of pre-defined annotation keys and value types see: | ||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md | ||
# Note: Additional labels are added by the build workflow. | ||
LABEL org.opencontainers.image.authors="nicholas.mcdonnell@cisa.dhs.gov" | ||
LABEL org.opencontainers.image.vendor="Cyber and Infrastructure Security Agency" | ||
|
||
# Bring the command line ARGs into the ENV so they are available in the | ||
# generated image. | ||
ENV BUILD_PY_VERSION=$PY_VERSION | ||
ENV BUILD_FILE_NAME=$FILE_NAME | ||
|
||
COPY build.sh . | ||
|
||
COPY lambda_handler.py . | ||
|
||
# Files needed to install local eal module | ||
COPY setup.py . | ||
COPY requirements.txt . | ||
COPY README.md . | ||
COPY requirements.txt . | ||
COPY setup.py . | ||
COPY eal ./eal | ||
|
||
COPY lambda_handler.py . | ||
|
||
ENTRYPOINT ["./build.sh"] |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.