Skip to content

Commit

Permalink
TBR
Browse files Browse the repository at this point in the history
  • Loading branch information
istreeter committed Oct 15, 2024
1 parent 9acda48 commit 67e0445
Showing 1 changed file with 6 additions and 69 deletions.
75 changes: 6 additions & 69 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,26 @@ name: CI

on:
push:
tags:
- '*'
pull_request:
branches:
- 'tbr'

jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: coursier/cache-action@v6
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Check Scala formatting
run: sbt scalafmtCheckAll scalafmtSbtCheck
- name: Run tests
run: sbt test

publish_docker:
needs: test
if: github.ref_type == 'tag'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
sbtProject:
- azure
- gcp
- aws
- awsHudi
- gcpHudi
- azureHudi
- gcpBiglake
include:
- sbtProject: azure
runSnyk: true
targetDir: "modules/azure/target"
dockerSuffix: azure
dockerTagSuffix: ""
- sbtProject: gcp
runSnyk: true
targetDir: "modules/gcp/target"
dockerSuffix: gcp
dockerTagSuffix: ""
- sbtProject: aws
runSnyk: true
targetDir: "modules/aws/target"
dockerSuffix: aws
dockerTagSuffix: ""
- sbtProject: azureHudi
runSnyk: false
targetDir: "packaging/hudi/target/azure"
dockerSuffix: azure
dockerTagSuffix: "-hudi"
- sbtProject: gcpHudi
runSnyk: false
targetDir: "packaging/hudi/target/gcp"
dockerSuffix: gcp
dockerTagSuffix: "-hudi"
- sbtProject: awsHudi
runSnyk: false
targetDir: "packaging/hudi/target/aws"
dockerSuffix: aws
dockerTagSuffix: "-hudi"
- sbtProject: gcpBiglake
runSnyk: false
targetDir: "packaging/biglake/target/gcp"
dockerSuffix: gcp
dockerTagSuffix: "-biglake"
steps:
- name: Install sbt
uses: sbt/setup-sbt@v1
- name: Checkout Github
uses: actions/checkout@v2
- uses: coursier/cache-action@v6
Expand All @@ -92,8 +42,7 @@ jobs:
with:
images: "snowplow/lake-loader-${{ matrix.dockerSuffix }}"
tags: |
type=raw,value=latest${{ matrix.dockerTagSuffix }},enable=${{ !contains(github.ref_name, 'rc') }}
type=raw,value=${{ github.ref_name }}${{ matrix.dockerTagSuffix }}
type=raw,value=0.5.0-rc4
flavor: |
latest=false
- name: Set up QEMU
Expand All @@ -108,15 +57,3 @@ jobs:
platforms: linux/amd64,linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
push: true
- name: Build local image, which is needed to run Snyk
if: ${{ !contains(github.ref_name, 'rc') && fromJSON(matrix.runSnyk) }}
run: sbt "project ${{ matrix.sbtProject }}" docker:publishLocal
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/docker@master
if: ${{ !contains(github.ref_name, 'rc') && fromJSON(matrix.runSnyk) }}
with:
image: "snowplow/lake-loader-${{ matrix.dockerSuffix }}:${{ github.ref_name }}${{ matrix.dockerTagSuffix }}"
args: "--app-vulns --org=99605b41-ca0f-42c9-a9ff-45c201a10a26"
command: monitor
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

0 comments on commit 67e0445

Please sign in to comment.