Skip to content

Commit

Permalink
Adds circleci config
Browse files Browse the repository at this point in the history
  • Loading branch information
kimpepper committed Jul 8, 2020
1 parent f29e054 commit 8fc9383
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
version: 2

workflows:
version: 2
test:
jobs:
- lint
- test
release:
jobs:
- release:
filters:
branches:
ignore: /.*/
tags:
# Only on tags formatted like v0.1.1
only: /^v\d+\.\d+\.\d+$/

jobs:
lint:
docker:
- image: golang:1.13
working_directory: /go/src/github.com/codedropau/sns-slack-notifier
steps:
- checkout
- run: |
go get golang.org/x/lint/golint
make lint
test:
docker:
- image: golang:1.13
working_directory: /go/src/github.com/codedropau/sns-slack-notifier
steps:
- checkout
- run: make test

release:
docker:
- image: golang:1.13
steps:
- checkout
- run:
name: "Install Dependencies"
command: |
apt-get update && apt-get install -y zip
go get github.com/tcnksm/ghr
- run:
name: "Build"
command: make package
- run:
name: "Publish Release on GitHub"
command: |
VERSION=$(git describe --tags --always)
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./function.zip
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SNS Slack Notifier

A Lambda function to post SNS Topic notifications to Slack.

0 comments on commit 8fc9383

Please sign in to comment.