Skip to content

Commit

Permalink
Added github workflow (#22)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuvraj <[email protected]>
  • Loading branch information
yindia authored Jun 14, 2021
1 parent 74444cd commit 72b1795
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: flytekit-java build

on:
push:
branches: [master]
pull_request:
branches:
- master

jobs:
build-snapshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: "0"
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-prepare-release-${{ hashFiles('pom.xml') }}
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11.0
distribution: 'adopt'
- name: Log in to Docker Hub
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.FLYTE_BOT_USERNAME }}
password: ${{ secrets.FLYTE_BOT_PAT }}
- uses: s4u/[email protected]
if: ${{ github.ref == 'refs/heads/master' }}
with:
servers: |
[{
"id": "flytekit-java-release",
"username": "${{ secrets.SONATYPE_USERNAME }}",
"password": "${{ secrets.SONATYPE_PASSWORD }}"
}]
- name: Verify with Maven
run: mvn verify
- name: Release snapshot with Maven
if: ${{ github.ref == 'refs/heads/master' }}
env:
RELEASE_REPOSITORY_URL: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
SNAPSHOTS_REPOSITORY_URL: "https://s01.oss.sonatype.org/content/repositories/snapshots"
run: mvn deploy -DpreparationGoals=clean -DskipTests=true -Ddocker.image=gcr.io/flyteorg/jflyte -Ddockerfile.push
10 changes: 10 additions & 0 deletions spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,14 @@
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
</Match>

<!-- See: https://github.com/spotbugs/spotbugs/issues/600 -->
<Match>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>

<Match>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/>
</Match>

</FindBugsFilter>

0 comments on commit 72b1795

Please sign in to comment.