Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Migrate build to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tunderwood committed Dec 1, 2020
1 parent aaf386d commit f4c3e11
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 30 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @Nike-Inc/Zookeepers
33 changes: 33 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Build
on:
push:
branches:
- '**'
pull_request:
branches: [ master ]
jobs:
Build-and-Release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean cerberus-log-processor-lambda:shadowJar
- name: Slack notification when release fails
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2.1.0
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: cerberus-alerts
SLACK_MESSAGE: 'Cerberus Serverless Components main build has failed :build-failed:'
SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
SLACK_TITLE: Cerberus Build Failure Notification
SLACK_USERNAME: GitHub Actions
41 changes: 41 additions & 0 deletions .github/workflows/buildAndRelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Release

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
Build-and-Release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean cerberus-log-processor-lambda:shadowJar
- name: Upload to GitHub release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: cerberus-log-processor-lambda/build/libs/cerberus-log-processor-lambda*
tag: ${{ github.ref }}
file_glob: true

- name: Slack notification when release fails
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2.1.0
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: cerberus-alerts
SLACK_MESSAGE: 'Cerberus Serverless Components release has failed :build-failed:'
SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
SLACK_TITLE: Cerberus Build Failure Notification
SLACK_USERNAME: GitHub Actions
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Cerberus Serverless Components

[![][travis img]][travis]
[![Coverage Status](https://coveralls.io/repos/github/Nike-Inc/cerberus-serverless-components/badge.svg)](https://coveralls.io/github/Nike-Inc/cerberus-serverless-components)
![Build](https://github.com/Nike-Inc/cerberus-serverless-components/workflows/Build/badge.svg)
[![][license img]][license]

This project contains the serverless components that can be used with Cerberus.
Expand Down Expand Up @@ -34,8 +33,5 @@ We keep our profiles in a separate repo and create soft links to the profile dir

This project is released under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)

[travis]:https://travis-ci.org/Nike-Inc/cerberus-serverless-components
[travis img]:https://api.travis-ci.org/Nike-Inc/cerberus-serverless-components.svg?branch=master

[license]:LICENSE.txt
[license img]:https://img.shields.io/badge/License-Apache%202-blue.svg

0 comments on commit f4c3e11

Please sign in to comment.