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

Commit f4c3e11

Browse files
tunderwoodTodd Underwood
authored andcommitted
Migrate build to GitHub Actions
1 parent aaf386d commit f4c3e11

File tree

5 files changed

+76
-30
lines changed

5 files changed

+76
-30
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @Nike-Inc/Zookeepers

.github/workflows/build.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Build
5+
on:
6+
push:
7+
branches:
8+
- '**'
9+
pull_request:
10+
branches: [ master ]
11+
jobs:
12+
Build-and-Release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up JDK 8
17+
uses: actions/setup-java@v1
18+
with:
19+
java-version: 8
20+
- name: Grant execute permission for gradlew
21+
run: chmod +x gradlew
22+
- name: Build with Gradle
23+
run: ./gradlew clean cerberus-log-processor-lambda:shadowJar
24+
- name: Slack notification when release fails
25+
if: ${{ failure() }}
26+
uses: rtCamp/[email protected]
27+
env:
28+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
29+
SLACK_CHANNEL: cerberus-alerts
30+
SLACK_MESSAGE: 'Cerberus Serverless Components main build has failed :build-failed:'
31+
SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
32+
SLACK_TITLE: Cerberus Build Failure Notification
33+
SLACK_USERNAME: GitHub Actions
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Release
5+
6+
on:
7+
push:
8+
# Sequence of patterns matched against refs/tags
9+
tags:
10+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
11+
jobs:
12+
Build-and-Release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up JDK 8
17+
uses: actions/setup-java@v1
18+
with:
19+
java-version: 8
20+
- name: Grant execute permission for gradlew
21+
run: chmod +x gradlew
22+
- name: Build with Gradle
23+
run: ./gradlew clean cerberus-log-processor-lambda:shadowJar
24+
- name: Upload to GitHub release
25+
uses: svenstaro/upload-release-action@v2
26+
with:
27+
repo_token: ${{ secrets.GITHUB_TOKEN }}
28+
file: cerberus-log-processor-lambda/build/libs/cerberus-log-processor-lambda*
29+
tag: ${{ github.ref }}
30+
file_glob: true
31+
32+
- name: Slack notification when release fails
33+
if: ${{ failure() }}
34+
uses: rtCamp/[email protected]
35+
env:
36+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
37+
SLACK_CHANNEL: cerberus-alerts
38+
SLACK_MESSAGE: 'Cerberus Serverless Components release has failed :build-failed:'
39+
SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
40+
SLACK_TITLE: Cerberus Build Failure Notification
41+
SLACK_USERNAME: GitHub Actions

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Cerberus Serverless Components
22

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

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

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

37-
[travis]:https://travis-ci.org/Nike-Inc/cerberus-serverless-components
38-
[travis img]:https://api.travis-ci.org/Nike-Inc/cerberus-serverless-components.svg?branch=master
39-
4036
[license]:LICENSE.txt
4137
[license img]:https://img.shields.io/badge/License-Apache%202-blue.svg

0 commit comments

Comments
 (0)