Skip to content

Commit f3aa240

Browse files
authored
Finish internal build workflow (#945)
* Add workflow for snowflake * Add comments and make fit conventions. * reorder input params * Tweaks to input params. * Add quotes * Add build to valid semver. * Change python version to match Cloud. * Finalize workflow. * Change branch reference of workflow to main. --------- Co-authored-by: Mila Page <[email protected]>
1 parent 1b5c165 commit f3aa240

File tree

2 files changed

+25
-39
lines changed

2 files changed

+25
-39
lines changed
+23-38
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
name: Release internal patch
1+
# What?
2+
#
3+
# Tag and release an arbitrary ref. Uploads to an internal archive for further processing.
4+
#
5+
# How?
6+
#
7+
# After checking out and testing the provided ref, the image is built and uploaded.
8+
#
9+
# When?
10+
#
11+
# Manual trigger.
12+
13+
name: "Release internal patch"
214

315
on:
416
workflow_dispatch:
@@ -7,58 +19,31 @@ on:
719
description: "The release version number (i.e. 1.0.0b1)"
820
type: string
921
required: true
10-
sha:
11-
description: "The sha to use (leave empty to use latest on main)"
12-
type: string
13-
required: false
14-
package_test_command:
15-
description: "Package test command"
16-
type: string
17-
default: "python -c \"import dbt.adapters.snowflake\""
18-
required: true
19-
dbms_name:
20-
description: "The name of the warehouse the adapter connects to."
21-
type: string
22-
default: "snowflake"
23-
required: true
24-
workflow_call:
25-
inputs:
26-
version_number:
27-
description: "The release version number (i.e. 1.0.0b1)"
22+
ref:
23+
description: "The ref (sha or branch name) to use"
2824
type: string
25+
default: "main"
2926
required: true
30-
sha:
31-
description: "The sha to use (leave empty to use latest on main)"
32-
type: string
33-
required: false
3427
package_test_command:
3528
description: "Package test command"
3629
type: string
3730
default: "python -c \"import dbt.adapters.snowflake\""
3831
required: true
39-
dbms_name:
40-
description: "The name of the warehouse the adapter connects to."
41-
type: string
42-
default: "snowflake"
43-
required: true
4432

4533
defaults:
4634
run:
4735
shell: bash
4836

49-
env:
50-
PYTHON_TARGET_VERSION: 3.11
51-
5237
jobs:
5338
invoke-reusable-workflow:
54-
name: Build and Release Internally
39+
name: "Build and Release Internally"
5540

56-
uses: VersusFacit/dbt-release/.github/workflows/internal-archive-release.yml@main
41+
uses: "dbt-labs/dbt-release/.github/workflows/internal-archive-release.yml@main"
5742

5843
with:
59-
version_number: ${{ inputs.version_number }}
60-
package_test_command: ${{ inputs.package_test_command }}
61-
dbms_name: ${{ inputs.dbms_name }}
62-
sha: ${{ inputs.sha }}
44+
version_number: "${{ inputs.version_number }}"
45+
package_test_command: "${{ inputs.package_test_command }}"
46+
dbms_name: "snowflake"
47+
ref: "${{ inputs.ref }}"
6348

64-
secrets: inherit
49+
secrets: "inherit"

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def _get_plugin_version_dict():
3434
_semver = r"""(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)"""
3535
_pre = r"""((?P<prekind>a|b|rc)(?P<pre>\d+))?"""
3636
_nightly = r"""(\.(?P<nightly>[a-z0-9]+)?)?"""
37-
_version_pattern = rf"""version\s*=\s*["']{_semver}{_pre}{_nightly}["']"""
37+
_build = r"""(\+build[0-9]+)?"""
38+
_version_pattern = rf"""version\s*=\s*["']{_semver}{_pre}{_nightly}{_build}["']"""
3839
with open(_version_path) as f:
3940
match = re.search(_version_pattern, f.read().strip())
4041
if match is None:

0 commit comments

Comments
 (0)