Skip to content

Commit

Permalink
Debugging GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
meln5674 committed May 28, 2024
1 parent 9367345 commit 266bc43
Showing 1 changed file with 90 additions and 91 deletions.
181 changes: 90 additions & 91 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,92 +28,92 @@ env:
YQ_VERSION: v4.27.2

jobs:
lint:
# runs-on: ubuntu-latest
runs-on: self-hosted
permissions:
contents: read

steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v3

# Install deps
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: '${{ env.HELM_VERSION }}'

- uses: actions/setup-go@v4
with:
go-version: '^${{ env.GO_VERSION }}'

- name: Install Dependencies
run: |
make deps
# Run Linter
- name: Lint standalone chart
run: |
cd deploy/helm/mlflow-oidc-proxy
../../../bin/helm dependency update
../../../bin/helm-hog test --no-apply --batch --auto-remove-success --parallel=0
- name: Lint omnibus dependencies chart
run: |
cd deploy/helm/mlflow-multitenant-deps
../../../bin/helm lint .
../../../bin/helm template .
- name: Lint omnibus chart
run: |
cd deploy/helm/mlflow-multitenant
../../../bin/helm dependency update
../../../bin/helm-hog test --no-apply --batch --auto-remove-success --parallel=0
test:
# runs-on: ubuntu-latest
runs-on: self-hosted
permissions:
contents: read

steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true


# Install Deps

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

- name: Install Helm
uses: azure/setup-helm@v1
with:
version: '${{ env.HELM_VERSION }}'

- uses: actions/setup-go@v4
with:
go-version: '^${{ env.GO_VERSION }}'

- name: Install Dependencies
run: |
make deps
# Tests
- name: Unit Tests
run: |
make test
- name: End-to-End Tests
run: |
make e2e IS_CI=1
# lint:
# # runs-on: ubuntu-latest
# runs-on: self-hosted
# permissions:
# contents: read
#
# steps:
# # Checkout
# - name: Checkout repository
# uses: actions/checkout@v3
#
# # Install deps
# - name: Install Helm
# uses: azure/setup-helm@v1
# with:
# version: '${{ env.HELM_VERSION }}'
#
# - uses: actions/setup-go@v4
# with:
# go-version: '^${{ env.GO_VERSION }}'
#
# - name: Install Dependencies
# run: |
# make deps
#
# # Run Linter
# - name: Lint standalone chart
# run: |
# cd deploy/helm/mlflow-oidc-proxy
# ../../../bin/helm dependency update
# ../../../bin/helm-hog test --no-apply --batch --auto-remove-success --parallel=0
# - name: Lint omnibus dependencies chart
# run: |
# cd deploy/helm/mlflow-multitenant-deps
# ../../../bin/helm lint .
# ../../../bin/helm template .
# - name: Lint omnibus chart
# run: |
# cd deploy/helm/mlflow-multitenant
# ../../../bin/helm dependency update
# ../../../bin/helm-hog test --no-apply --batch --auto-remove-success --parallel=0
#
# test:
# # runs-on: ubuntu-latest
# runs-on: self-hosted
# permissions:
# contents: read
#
# steps:
# # Checkout
# - name: Checkout repository
# uses: actions/checkout@v3
# with:
# submodules: true
#
#
# # Install Deps
#
# # Workaround: https://github.com/docker/build-push-action/issues/461
# - name: Setup Docker buildx
# uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
#
# - name: Install Helm
# uses: azure/setup-helm@v1
# with:
# version: '${{ env.HELM_VERSION }}'
#
# - uses: actions/setup-go@v4
# with:
# go-version: '^${{ env.GO_VERSION }}'
#
# - name: Install Dependencies
# run: |
# make deps
#
# # Tests
# - name: Unit Tests
# run: |
# make test
# - name: End-to-End Tests
# run: |
# make e2e IS_CI=1


docker:
needs: [lint, test]
# needs: [lint, test]
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -136,9 +136,10 @@ jobs:
# https://github.com/sigstore/cosign-installer
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@7e0881f8fe90b25e305bbf0309761e9314607e25
with:
cosign-release: '${{ env.COSIGN_VERSION }}'
uses: sigstore/[email protected]
with:
cosign-release: 'v2.2.2'


# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
Expand Down Expand Up @@ -193,8 +194,6 @@ jobs:
type=ref,event=pr
type=sha,format=long,prefix=
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
Expand All @@ -217,9 +216,9 @@ jobs:
COSIGN_EXPERIMENTAL: "true"
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign --yes {}@${{ steps.build-and-push.outputs.digest }}
helm:
needs: [lint, test]
# needs: [lint, test]
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -288,7 +287,7 @@ jobs:
helm push bin/mlflow-oidc-proxy-*.tgz "${HELM_REPO}"
helm push bin/mlflow-multitenant-deps-*.tgz "${HELM_REPO}"
rm -rf bin/*.tgz # The wildcard below matches the deps chart, this is a hack-y workaround
helm dependency build deploy/helm/mlflow-multitenant
helm dependency update deploy/helm/mlflow-multitenant
helm package deploy/helm/mlflow-multitenant/ --destination bin
helm push bin/mlflow-multitenant-*.tgz "${HELM_REPO}"
Expand Down

0 comments on commit 266bc43

Please sign in to comment.