Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions go/runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,27 @@ spec:
ENV GIT_SSH_COMMAND "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
RUN apk --no-cache add git ca-certificates openssh \
&& go get github.com/triggermesh/aws-custom-runtime \
&& go get github.com/triggermesh/knative-lambda-runtime/go \
&& go get github.com/golang/dep/...
&& go get github.com/triggermesh/knative-lambda-runtime/go
RUN mv /go/bin/go /go/bin/bootstrap
WORKDIR /go/src/handler
COPY . .
RUN if [ -f "$HOME/.ssh/id_$(inputs.params.SSH_KEY)" ]; then \
eval "\$(ssh-agent -s)"; \
ssh-add $HOME/.ssh/id_$(inputs.params.SSH_KEY); \
fi \
&& if [ -f "Gopkg.toml" ]; then dep ensure; fi \
&& go get -v \
&& go install
&& if [ ! -f "go.mod" ]; then \
go mod init handler; \
fi \
&& go get -d -v \
&& go build -o handler

FROM alpine
WORKDIR /opt
ENV LAMBDA_TASK_ROOT "/opt"
ENV _HANDLER "handler"
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=0 /go/bin/ /opt
COPY --from=0 /go/src/handler/handler /opt
ENTRYPOINT ["/opt/aws-custom-runtime"]
EOF
- name: export
Expand Down