Sign inSign up

omerxx/drone-lambda-plugin

By omerxx

Updated almost 9 years ago

The Drone plugin utilizes AWS go-sdk to update an existing function's code

Image
0

3.8K

omerxx/drone-lambda-plugin repository overview

Usage:

Execute from the working directory;

This will update my-function with a zip file under S3://some-bucket/lambda/lambda-project-1.zip:

docker run --rm
-e PLUGIN_FUNCTION_NAME=my-function
-e PLUGIN_S3_BUCKET=some-bucket
-e PLUGIN_PATH_PREFIX=lambda
-e PLUGIN_FILE_NAME=lambda-project-1.zip
-v $(pwd):$(pwd)
-w $(pwd)
--privileged
plugins/docker --dry-run Example:

pipeline: deploy-lambda: image: omerxx/drone-lambda-plugin pull: true function_name: my-function s3_bucket: some-bucket path_prefix: lambda file_name: lambda-project-${DRONE_BUILD_NUMBER}.zip Example of a complete Lambda project's pipeline:

pipeline: build: image: python:2.7-alpine commands: - apk update && apk add zip - pip install -r requirements.txt - zip -r -9 lambda-project-${DRONE_BUILD_NUMBER}.zip *

s3-publish: image: plugins/s3 acl: private region: us-east-1 bucket: some-bucket target: lambda source: lambda-project-${DRONE_BUILD_NUMBER}.zip

deploy-lambda: image: omerxx/drone-lambda-plugin pull: true function_name: testrevenuereport s3_bucket: devops.spot.im path_prefix: lambda file_name: revenue-report-${DRONE_BUILD_NUMBER}.zip

notify-slack-releases: image: plugins/slack channel: product-releases webhook: https://hooks.slack.com/services/ABCD/XYZ username: Drone-CI

Tag summary

Content type

Image

Digest

Size

4.8 MB

Last updated

almost 9 years ago

docker pull omerxx/drone-lambda-plugin