The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Fix broken containerize workflow (#69156)
Nemanja Glumac0d24b395e8f2
diff --git a/.github/actions/fetch-artifact/action.yml b/.github/actions/fetch-artifact/action.ymlindex c32605a21f1..8b5d00937d4 100644--- a/.github/actions/fetch-artifact/action.yml+++ b/.github/actions/fetch-artifact/action.yml@@ -8,6 +8,10 @@ inputs:edition:description: Metabase edition (ee or oss)required: true+ release:+ description: Whether this is a release artifact (uses metabase-release- prefix)+ required: false+ default: "false"output-name:description: Optional custom name for the output jar file (defaults to metabase.jar)required: false@@ -28,7 +32,9 @@ runs:script: | # jsconst fs = require('fs');- const artifactName = `metabase-${{ inputs.edition }}-${{ inputs.commit }}-uberjar`;+ const isRelease = "${{ inputs.release }}" === "true";+ const prefix = isRelease ? "metabase-release" : "metabase";+ const artifactName = `${prefix}-${{ inputs.edition }}-${{ inputs.commit }}-uberjar`;console.log(`Looking for artifact: ${artifactName}`);const artifacts = await github.rest.actions.listArtifactsForRepo({diff --git a/.github/workflows/containerize-jar.yml b/.github/workflows/containerize-jar.ymlindex 124ecb07dcc..7a7408adab9 100644--- a/.github/workflows/containerize-jar.yml+++ b/.github/workflows/containerize-jar.yml@@ -4,8 +4,10 @@ run-name: Containerize ${{ inputs.tag }} Uberjaron:workflow_call:inputs:- artifact-name:+ edition:+ description: Metabase edition (ee or oss)type: string+ required: truerepo:description: owner and repo like "metabase/metabase"type: string@@ -15,14 +17,18 @@ on:type: stringrelease:type: string- default: 'true'+ default: 'false'build-args:type: stringworkflow_dispatch:inputs:- artifact-name:- description: usually something like "metabase-release-{{ edition }}-{{ hash }}-uberjar"- type: string+ edition:+ description: Metabase edition (ee or oss)+ type: choice+ options:+ - ee+ - oss+ required: truerepo:description: docker owner and repo like "metabase/metabase"type: string@@ -32,6 +38,13 @@ on:commit:description: the full commit hashtype: string+ release:+ description: Whether this is a release artifact (uses metabase-release- prefix)+ type: choice+ options:+ - "false"+ - "true"+ default: "false"jobs:containerize:@@ -45,10 +58,12 @@ jobs:fetch-depth: 0# we want the dockerfile from the commit we're building- run: git checkout ${{ inputs.commit }} -- bin/docker- - name: Retrieve test build uberjar artifact+ - name: Retrieve uberjar artifactuses: ./.github/actions/fetch-artifactwith:- name: ${{ inputs.artifact-name }}+ commit: ${{ inputs.commit }}+ edition: ${{ inputs.edition }}+ release: ${{ inputs.release }}- name: Prepare build scriptsrun: cd ${{ github.workspace }}/release && yarn && yarn build- name: Get platformsdiff --git a/.github/workflows/containerize-uberjar.yml b/.github/workflows/containerize-uberjar.ymlindex e5a7f6ed3f9..97bc3b621fa 100644--- a/.github/workflows/containerize-uberjar.yml+++ b/.github/workflows/containerize-uberjar.yml@@ -55,7 +55,7 @@ jobs:uses: ./.github/workflows/containerize-jar.ymlsecrets: inheritwith:- artifact-name: metabase-${{ matrix.edition }}-${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}-uberjar+ edition: ${{ matrix.edition }}commit: ${{ github.event.inputs.commit || github.sha }}repo: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).repo }}tag: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).tag }}diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.ymlindex 286fccdf438..81ca31c37eb 100644--- a/.github/workflows/pre-release.yml+++ b/.github/workflows/pre-release.yml@@ -71,10 +71,12 @@ jobs:- uses: actions/checkout@v4with:sparse-checkout: .github- - name: Retrieve test build uberjar artifact for ${{ matrix.edition }}+ - name: Retrieve release uberjar artifact for ${{ matrix.edition }}uses: ./.github/actions/fetch-artifactwith:- name: metabase-release-${{ matrix.edition }}-${{ inputs.commit }}-uberjar+ commit: ${{ inputs.commit }}+ edition: ${{ matrix.edition }}+ release: "true"- name: Extract version number from version.propertiesid: version-properties@@ -228,20 +230,22 @@ jobs:uses: ./.github/workflows/containerize-jar.ymlsecrets: inheritwith:- artifact-name: metabase-release-oss-${{ inputs.commit }}-uberjar+ edition: osscommit: ${{ inputs.commit }}repo: ${{ vars.DOCKERHUB_OWNER }}/${{ vars.DOCKERHUB_STAGING_REPO }}tag: ${{ needs.release-artifact.outputs.oss_version }}-${{ inputs.commit }}+ release: "true"containerize-ee:needs: release-artifactuses: ./.github/workflows/containerize-jar.ymlsecrets: inheritwith:- artifact-name: metabase-release-ee-${{ inputs.commit }}-uberjar+ edition: eecommit: ${{ inputs.commit }}repo: ${{ vars.DOCKERHUB_OWNER }}/${{ vars.DOCKERHUB_STAGING_REPO }}tag: ${{ needs.release-artifact.outputs.ee_version }}-${{ inputs.commit }}+ release: "true"tests-complete-message:if: always()diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex b3c6c757a02..0378ec094b7 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -140,10 +140,12 @@ jobs:- uses: actions/checkout@v4with:sparse-checkout: .github- - name: Retrieve test build uberjar artifact for ${{ matrix.edition }}+ - name: Retrieve release uberjar artifact for ${{ matrix.edition }}uses: ./.github/actions/fetch-artifactwith:- name: metabase-release-${{ matrix.edition }}-${{ inputs.commit }}-uberjar+ commit: ${{ inputs.commit }}+ edition: ${{ matrix.edition }}+ release: "true"- name: Check JAR version propertiesrun: |# ensure actual jar checksum matches checksum file@@ -259,20 +261,22 @@ jobs:uses: ./.github/workflows/containerize-jar.ymlsecrets: inheritwith:- artifact-name: metabase-release-oss-${{ inputs.commit }}-uberjar+ edition: osscommit: ${{ inputs.commit }}repo: ${{ vars.DOCKERHUB_OWNER }}/${{ vars.DOCKERHUB_REPO }}tag: ${{ needs.check-version.outputs.oss }}+ release: "true"containerize-ee:needs: check-versionuses: ./.github/workflows/containerize-jar.ymlsecrets: inheritwith:- artifact-name: metabase-release-ee-${{ inputs.commit }}-uberjar+ edition: eecommit: ${{ inputs.commit }}repo: ${{ vars.DOCKERHUB_OWNER }}/${{ vars.DOCKERHUB_REPO }}-enterprisetag: ${{ needs.check-version.outputs.ee }}+ release: "true"push-tags:permissions: write-all