File tree Expand file tree Collapse file tree 4 files changed +46
-3
lines changed Expand file tree Collapse file tree 4 files changed +46
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Lambda
2+ on :
3+ push :
4+ branches :
5+ - master
6+ pull_request :
7+ types : [opened, synchronize, reopened]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ # Checkout the pull request branch
14+ - name : Checkout code
15+ uses : actions/checkout@v2
16+
17+ # Rebuild README
18+ - name : Prepare
19+ shell : bash
20+ run : |
21+ set -ex
22+ make init
23+ make terraform/install
24+ make terraform/get-plugins
25+ make terraform/get-modules
26+ make terraform/lint
27+ make terraform/validate
28+
29+ - name : Build
30+ run : make build
31+
32+ - name : Deploy
33+ run : aws s3 cp --acl public-read artifacts/lambda.zip s3://artifacts.prod.cloudposse.org/${{ github.event.repository.name }}/${{ github.sha }}/lambda.zip
34+ env :
35+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
36+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
37+
38+ - name : Test Download from CDN
39+ run : curl -fsSL -o /dev/null https://artifacts.cloudposse.com/${{ github.event.repository.name }}/${{ github.sha }}/lambda.zip
Original file line number Diff line number Diff line change 1212 $(SELF ) terraform/install terraform/get-modules terraform/get-plugins terraform/lint terraform/validate
1313
1414define docker
15- docker run -it -v $(PWD ) /$(LAMBDA_DIR ) /:/code -w /code $(DEPS_CONTAINER ) /bin/sh -c '$(1 ) '
15+ docker run -i -v $(PWD ) /$(LAMBDA_DIR ) /:/code -w /code $(DEPS_CONTAINER ) /bin/sh -c '$(1 ) '
1616endef
1717
1818# # Install dependencies
@@ -28,4 +28,5 @@ dependencies:
2828build : dependencies
2929 @echo " ==> Building Lambda function zip..."
3030 @mkdir -p artifacts
31- @cd $(LAMBDA_DIR ) && zip -r ../artifacts/lambda.zip * && cd ../
31+ @cd $(LAMBDA_DIR ) && zip -r ../artifacts/lambda.zip *
32+ @ls -l artifacts/lambda.zip
Original file line number Diff line number Diff line change 4444
4545# terraform-aws-lambda-elasticsearch-cleanup
4646
47- [ ![ Codefresh Build Status] ( https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-lambda-elasticsearch-cleanup?type=cf-1 )] ( https://g.codefresh.io/public/accounts/cloudposse/pipelines/5eaa33ff1dc82bb99faa3905 ) [ ![ Latest Release] ( https://img.shields.io/github/release/cloudposse/terraform-aws-lambda-elasticsearch-cleanup.svg )] ( https://github.com/cloudposse/terraform-aws-lambda-elasticsearch-cleanup/releases/latest ) [ ![ Slack Community] ( https://slack.cloudposse.com/badge.svg )] ( https://slack.cloudposse.com )
47+ [ ![ Codefresh Build Status] ( https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-lambda-elasticsearch-cleanup?type=cf-1 )] ( https://g.codefresh.io/public/accounts/cloudposse/pipelines/5eaa33ff1dc82bb99faa3905 ) [ ![ GitHub Action Build Status ] ( https://github.com/cloudposse/terraform-aws-lambda-elasticsearch-cleanup/workflows/Lambda/badge.svg?branch=master )] ( https://github.com/cloudposse/terraform-aws-lambda-elasticsearch-cleanup/actions?query=workflow%3ALambda ) [ ![ Latest Release] ( https://img.shields.io/github/release/cloudposse/terraform-aws-lambda-elasticsearch-cleanup.svg )] ( https://github.com/cloudposse/terraform-aws-lambda-elasticsearch-cleanup/releases/latest ) [ ![ Slack Community] ( https://slack.cloudposse.com/badge.svg )] ( https://slack.cloudposse.com )
4848
4949
5050Terraform module to provision a scheduled Lambda function which will
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ badges:
2121 - name : " Codefresh Build Status"
2222 image : " https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-lambda-elasticsearch-cleanup?type=cf-1"
2323 url : " https://g.codefresh.io/public/accounts/cloudposse/pipelines/5eaa33ff1dc82bb99faa3905"
24+ - name : " GitHub Action Build Status"
25+ image : " https://github.com/cloudposse/terraform-aws-lambda-elasticsearch-cleanup/workflows/Lambda/badge.svg?branch=master"
26+ url : " https://github.com/cloudposse/terraform-aws-lambda-elasticsearch-cleanup/actions?query=workflow%3ALambda"
2427 - name : " Latest Release"
2528 image : " https://img.shields.io/github/release/cloudposse/terraform-aws-lambda-elasticsearch-cleanup.svg"
2629 url : " https://github.com/cloudposse/terraform-aws-lambda-elasticsearch-cleanup/releases/latest"
You can’t perform that action at this time.
0 commit comments