From 266bc430a46fce96effbecc4bb95a43ff5ed3485 Mon Sep 17 00:00:00 2001 From: Andrew Melnick Date: Tue, 28 May 2024 09:28:57 -0600 Subject: [PATCH] Debugging GHA --- .github/workflows/cd.yaml | 181 +++++++++++++++++++------------------- 1 file changed, 90 insertions(+), 91 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index d07a52f..d69ce8e 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -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 @@ -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/cosign-installer@v3.5.0 + with: + cosign-release: 'v2.2.2' + # Workaround: https://github.com/docker/build-push-action/issues/461 - name: Setup Docker buildx @@ -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 @@ -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 @@ -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}"