Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow use of Kubernetes for Github Actions #910

Merged
merged 3 commits into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions .github/workflows/complete.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: complete workflow
name: complete

on: [push, pull_request]

jobs:
build-push-docker-images:
runs-on: ubuntu-latest
runs-on: [self-hosted]
strategy:
matrix:
component: [core, serving]
Expand All @@ -16,13 +16,11 @@ jobs:
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '290.0.1'
service_account_key: ${{ secrets.GCR_SERVICE_ACCOUNT }}
project_id: kf-feast
export_default_credentials: true
- run: gcloud auth configure-docker --quiet
- name: build image
- name: Build image
run: make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${GITHUB_SHA}
- name: push image
- name: Push image
run: |
docker push ${REGISTRY}/feast-${{ matrix.component }}:${GITHUB_SHA}
if [ -n "${GITHUB_PR_SHA}" ]; then
Expand All @@ -35,29 +33,29 @@ jobs:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: lint java
- name: Lint java
run: make lint-java

lint-python:
container: gcr.io/kf-feast/feast-ci:latest
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: install dependencies
- name: Install dependencies
run: make install-python-ci-dependencies
- name: compile protos
- name: Compile protos
run: make compile-protos-python
- name: lint python
- name: Lint python
run: make lint-python

lint-go:
container: gcr.io/kf-feast/feast-ci:latest
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: install dependencies
- name: Install dependencies
run: make install-go-ci-dependencies
- name: lint go
- name: Lint go
run: make lint-go

lint-versions:
Expand All @@ -66,7 +64,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: make lint-versions
run: Make lint-versions

unit-test-java:
runs-on: ubuntu-latest
Expand All @@ -79,7 +77,7 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: test java
- name: Test java
run: make test-java-with-coverage
- uses: actions/upload-artifact@v2
with:
Expand All @@ -91,19 +89,19 @@ jobs:
container: gcr.io/kf-feast/feast-ci:latest
steps:
- uses: actions/checkout@v2
- name: install python
- name: Install python
run: make install-python
- name: test python
- name: Test python
run: make test-python

unit-test-go:
runs-on: ubuntu-latest
container: gcr.io/kf-feast/feast-ci:latest
steps:
- uses: actions/checkout@v2
- name: install dependencies
- name: Install dependencies
run: make compile-protos-go
- name: test go
- name: Test go
run: make test-go

integration-test:
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/master_only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,31 @@ on:

jobs:
build-docker-images:
runs-on: [self-hosted, builder]
runs-on: [self-hosted]
strategy:
matrix:
component: [core, serving, jupyter, ci]
steps:
- uses: actions/checkout@v2
- name: build image
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '290.0.1'
export_default_credentials: true
- run: gcloud auth configure-docker --quiet
- name: Build image
run: make build-${{ matrix.component }}-docker REGISTRY=gcr.io/kf-feast VERSION=${GITHUB_SHA}
- name: push image
- name: Push image
run: make push-${{ matrix.component }}-docker REGISTRY=gcr.io/kf-feast VERSION=${GITHUB_SHA}
- name: push feast dev
- name: Push image to feast dev
run: |
if [ ${GITHUB_REF#refs/*/} == "master" ]; then
docker tag gcr.io/kf-feast/feast-${{ matrix.component }}:${GITHUB_SHA} gcr.io/kf-feast/feast-${{ matrix.component }}:dev
docker push gcr.io/kf-feast/feast-${{ matrix.component }}:dev
fi
- name: get version
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${${GITHUB_REF/refs\/tags\//}:1}
- name: push versioned release
- name: Push versioned release
run: |

# Build and push semver tagged commits
Expand All @@ -52,5 +57,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: test docker compose
- name: Test docker compose
run: ./infra/scripts/test-docker-compose.sh