Publishing a Snowflake Native App to customers¶
先决条件
- You must have an existing connection in your
config.tomlfile. - You must have a
snowflake.ymlfile in your Snowflake Native App project. - You must have an existing listing if you are publishing a Snowflake Native App to the Snowflake Marketplace.
How to publish a Snowflake Native App to customers¶
In Snowflake, publishing a Snowflake Native App to customers is done by setting release directives. Release directives are a set of rules that determine which version and patch of the Snowflake Native App is available to which customers.
发布通道为不同类型的客户提供了管理单独发布流程的方法。例如,早期访问客户可以使用 ALPHA 通道,内部 QA 团队可以使用 QA 通道,一般客户可以使用 DEFAULT 通道。
如果为应用程序包启用了发布通道,则发布指令将绑定到发布通道;否则,发布指令将直接绑定到应用程序包。
Note
The release channels feature might not be available in all regions. Please contact Snowflake Support for more information.
启用了发布通道的过程
To explicitly enable release channels, add enable_release_channels=true to the application package definition in your snowflake.yml file. You need to update or recreate your application package after enabling release channels.
Note
启用后,无法禁用发布频道
To confirm that release channels have been enabled, run the snow app release-channel list command. A list of release channels in the application package is then displayed:
The simplest way to publish an existing version and patch to all customers on the default release channel is to use the snow app publish command with the --version and --patch options:
To automatically create a new version and patch, use the --create-version option:
To publish a Snowflake Native App to a non-default release channel, use the --channel option:
To publish a Snowflake Native App to a custom release directive targeting specific customers, use the --directive option:
The snow app publish command adds the version to the release channel. If the release channel already has the maximum number of versions allowed, this command first attempts to remove from the channel one of the versions not referenced by any release directive.
将版本添加到发布通道后,该命令将该发布通道的默认发布指令设置为指定的版本和补丁。
要对正在发生的事情进行更多控制,请将之前的命令替换为以下命令:
For more information on managing release channels and release directives, see the snow app release-channel and snow app release-directive command references.
禁用了发布通道的过程
如果未为应用程序包启用发布通道,则发布指令将直接绑定到应用程序包。
The simplest way to publish an existing version and patch to all customers is to use the snow app publish command with the --version and --patch options.
此命令将应用程序包的默认发布指令设置为指定的版本和补丁。在这种情况下,发布通道尚未启用,因此该过程中不涉及发布通道。
If you want the publish command to automatically create a new version and patch, use the --create-version option:
To publish a Snowflake Native App to a custom release directive targeting specific customers, use the --directive option:
These snow app publish commands continue to work even if release channels are enabled in the future. When release channels are enabled, the command starts using the default release channel.