From 3bc2412ddc776f66cd6683878254a08658528b6e Mon Sep 17 00:00:00 2001 From: Mila Page Date: Mon, 18 Mar 2024 03:22:18 -0700 Subject: [PATCH 1/7] Add workflow file. --- .github/workflows/release-internal.yml | 64 ++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/release-internal.yml diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml new file mode 100644 index 000000000..5bc6cd667 --- /dev/null +++ b/.github/workflows/release-internal.yml @@ -0,0 +1,64 @@ +name: Release internal patch + +on: + workflow_dispatch: + inputs: + version_number: + description: "The release version number (i.e. 1.0.0b1)" + type: string + required: true + sha: + description: "The sha to use (leave empty to use latest on main)" + type: string + required: false + package_test_command: + description: "Package test command" + type: string + default: "python -c \"import dbt.adapters.bigquery\"" + required: true + dbms_name: + description: "The name of the warehouse the adapter connects to." + type: string + default: "bigquery" + required: true + workflow_call: + inputs: + version_number: + description: "The release version number (i.e. 1.0.0b1)" + type: string + required: true + sha: + description: "The sha to use (leave empty to use latest on main)" + type: string + required: false + package_test_command: + description: "Package test command" + type: string + default: "python -c \"import dbt.adapters.bigquery\"" + required: true + dbms_name: + description: "The name of the warehouse the adapter connects to." + type: string + default: "bigquery" + required: true + +defaults: + run: + shell: bash + +env: + PYTHON_TARGET_VERSION: 3.11 + +jobs: + invoke-reusable-workflow: + name: Build and Release Internally + + uses: VersusFacit/dbt-release/.github/workflows/internal-archive-release.yml@main + + with: + version_number: ${{ inputs.version_number }} + package_test_command: ${{ inputs.package_test_command }} + dbms_name: ${{ inputs.dbms_name }} + sha: ${{ inputs.sha }} + + secrets: inherit From 9bb16c285e1f3bc46a904ce0d25badac74469164 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Mon, 18 Mar 2024 03:23:07 -0700 Subject: [PATCH 2/7] Add changelog --- .changes/unreleased/Features-20240318-032256.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Features-20240318-032256.yaml diff --git a/.changes/unreleased/Features-20240318-032256.yaml b/.changes/unreleased/Features-20240318-032256.yaml new file mode 100644 index 000000000..e4948f433 --- /dev/null +++ b/.changes/unreleased/Features-20240318-032256.yaml @@ -0,0 +1,6 @@ +kind: Features +body: Add new workflow for internal patch releases +time: 2024-03-18T03:22:56.037781-07:00 +custom: + Author: versusfacit + Issue: "38" From 33139264a9ee32c695ccf2e18d24e225c7e409ff Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 19:35:03 -0700 Subject: [PATCH 3/7] Tweaks to input params. --- .github/workflows/release-internal.yml | 42 ++++++-------------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml index 5bc6cd667..ee17d85eb 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -8,39 +8,15 @@ on: type: string required: true sha: - description: "The sha to use (leave empty to use latest on main)" + description: "The ref (sha or branch name) to use" type: string - required: false - package_test_command: - description: "Package test command" - type: string - default: "python -c \"import dbt.adapters.bigquery\"" + default: "main" required: true - dbms_name: - description: "The name of the warehouse the adapter connects to." - type: string - default: "bigquery" - required: true - workflow_call: - inputs: - version_number: - description: "The release version number (i.e. 1.0.0b1)" - type: string - required: true - sha: - description: "The sha to use (leave empty to use latest on main)" - type: string - required: false package_test_command: description: "Package test command" type: string default: "python -c \"import dbt.adapters.bigquery\"" required: true - dbms_name: - description: "The name of the warehouse the adapter connects to." - type: string - default: "bigquery" - required: true defaults: run: @@ -51,14 +27,14 @@ env: jobs: invoke-reusable-workflow: - name: Build and Release Internally + name: "Build and Release Internally" - uses: VersusFacit/dbt-release/.github/workflows/internal-archive-release.yml@main + uses: "dbt-labs/dbt-release/.github/workflows/internal-archive-release.yml@mp/finish_internal_workflow" with: - version_number: ${{ inputs.version_number }} - package_test_command: ${{ inputs.package_test_command }} - dbms_name: ${{ inputs.dbms_name }} - sha: ${{ inputs.sha }} + version_number: "${{ inputs.version_number }}" + package_test_command: "${{ inputs.package_test_command }}" + dbms_name: "bigquery" + sha: "${{ inputs.sha }}" - secrets: inherit + secrets: "inherit" From c387a181a7795527577c8077a3184aee1c2d8ea3 Mon Sep 17 00:00:00 2001 From: Mila Page Date: Wed, 20 Mar 2024 19:36:04 -0700 Subject: [PATCH 4/7] Add changelog. --- .changes/unreleased/Under the Hood-20240320-193554.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Under the Hood-20240320-193554.yaml diff --git a/.changes/unreleased/Under the Hood-20240320-193554.yaml b/.changes/unreleased/Under the Hood-20240320-193554.yaml new file mode 100644 index 000000000..8cefe1f85 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20240320-193554.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Finalize the bigquery internal release build workflow +time: 2024-03-20T19:35:54.550603-07:00 +custom: + Author: versusfacit + Issue: "38" From ab3d43a7e7189ac19cb8b587b599f11bec4b2bbb Mon Sep 17 00:00:00 2001 From: Mila Page Date: Fri, 22 Mar 2024 13:27:13 -0700 Subject: [PATCH 5/7] Change python version to match Cloud. --- .github/workflows/release-internal.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml index ee17d85eb..1654dd41a 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -1,4 +1,16 @@ -name: Release internal patch +# What? +# +# Tag and release an arbitrary sha. Uploads to an internal archive for further processing. +# +# How? +# +# After checking out and testing the provided sha, the image is built and uploaded. +# +# When? +# +# Manual trigger. + +name: "Release internal patch" on: workflow_dispatch: @@ -23,7 +35,7 @@ defaults: shell: bash env: - PYTHON_TARGET_VERSION: 3.11 + PYTHON_TARGET_VERSION: 3.8 jobs: invoke-reusable-workflow: From 3cd85a40a158bd4ec4676143ecc37fd3ce36129c Mon Sep 17 00:00:00 2001 From: Mila Page Date: Tue, 26 Mar 2024 13:09:30 -0700 Subject: [PATCH 6/7] Finalize workflow. --- .../unreleased/Under the Hood-20240320-193554.yaml | 6 ------ .github/workflows/release-internal.yml | 11 ++++------- 2 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 .changes/unreleased/Under the Hood-20240320-193554.yaml diff --git a/.changes/unreleased/Under the Hood-20240320-193554.yaml b/.changes/unreleased/Under the Hood-20240320-193554.yaml deleted file mode 100644 index 8cefe1f85..000000000 --- a/.changes/unreleased/Under the Hood-20240320-193554.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Under the Hood -body: Finalize the bigquery internal release build workflow -time: 2024-03-20T19:35:54.550603-07:00 -custom: - Author: versusfacit - Issue: "38" diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml index 1654dd41a..42173b910 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -1,10 +1,10 @@ # What? # -# Tag and release an arbitrary sha. Uploads to an internal archive for further processing. +# Tag and release an arbitrary ref. Uploads to an internal archive for further processing. # # How? # -# After checking out and testing the provided sha, the image is built and uploaded. +# After checking out and testing the provided ref, the image is built and uploaded. # # When? # @@ -19,7 +19,7 @@ on: description: "The release version number (i.e. 1.0.0b1)" type: string required: true - sha: + ref: description: "The ref (sha or branch name) to use" type: string default: "main" @@ -34,9 +34,6 @@ defaults: run: shell: bash -env: - PYTHON_TARGET_VERSION: 3.8 - jobs: invoke-reusable-workflow: name: "Build and Release Internally" @@ -47,6 +44,6 @@ jobs: version_number: "${{ inputs.version_number }}" package_test_command: "${{ inputs.package_test_command }}" dbms_name: "bigquery" - sha: "${{ inputs.sha }}" + ref: "${{ inputs.ref }}" secrets: "inherit" From 0ad22d921c7d034f052824f7095dcd1695076e1c Mon Sep 17 00:00:00 2001 From: Mila Page Date: Tue, 26 Mar 2024 15:38:19 -0700 Subject: [PATCH 7/7] Change branch reference of workflow to main. --- .github/workflows/release-internal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-internal.yml b/.github/workflows/release-internal.yml index 42173b910..f29de2fb2 100644 --- a/.github/workflows/release-internal.yml +++ b/.github/workflows/release-internal.yml @@ -38,7 +38,7 @@ jobs: invoke-reusable-workflow: name: "Build and Release Internally" - uses: "dbt-labs/dbt-release/.github/workflows/internal-archive-release.yml@mp/finish_internal_workflow" + uses: "dbt-labs/dbt-release/.github/workflows/internal-archive-release.yml@main" with: version_number: "${{ inputs.version_number }}"