From 225bc8943d0ee6b2aa57dd6753ee26cdca2b4ef7 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev Date: Wed, 3 Jul 2024 13:33:37 +0200 Subject: [PATCH] tool(pulumi): switch default version to 3.122.0 (#6252) * tool(pulumi): switch default version to 3.102.0 * tool(pulumi): support the latest available version 3.122.0 * tool(pulumi): switch default version to 3.122.0 * chore(pulumi): exclude an older version from the Docker image --- docs/reference/providers/pulumi.md | 8 ++-- plugins/pulumi/src/cli.ts | 66 +++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 6 deletions(-) diff --git a/docs/reference/providers/pulumi.md b/docs/reference/providers/pulumi.md index be0f0e1da1..2f959473bd 100644 --- a/docs/reference/providers/pulumi.md +++ b/docs/reference/providers/pulumi.md @@ -32,7 +32,7 @@ providers: environments: # The version of pulumi to use. Set to `null` to use whichever version of `pulumi` is on your PATH. - version: 3.70.0 + version: 3.122.0 # Overrides the default plan directory path used when deploying with the `deployFromPreview` option for pulumi # deploy actions. @@ -128,9 +128,9 @@ providers: The version of pulumi to use. Set to `null` to use whichever version of `pulumi` is on your PATH. -| Type | Allowed Values | Default | Required | -| -------- | ----------------------------------- | ---------- | -------- | -| `string` | "3.102.0", "3.70.0", "3.64.0", null | `"3.70.0"` | Yes | +| Type | Allowed Values | Default | Required | +| -------- | ---------------------------------------------- | ----------- | -------- | +| `string` | "3.122.0", "3.102.0", "3.70.0", "3.64.0", null | `"3.122.0"` | Yes | ### `providers[].previewDir` diff --git a/plugins/pulumi/src/cli.ts b/plugins/pulumi/src/cli.ts index c4a974b4fb..883ab927eb 100644 --- a/plugins/pulumi/src/cli.ts +++ b/plugins/pulumi/src/cli.ts @@ -58,6 +58,9 @@ export class GlobalPulumi extends CliWrapper { } } +const PULUMI_SEM_VER_3_122_0 = new SemVer("3.122.0") +const PULUMI_VERSION_3_122_0 = PULUMI_SEM_VER_3_122_0.version + const PULUMI_SEM_VER_3_102_0 = new SemVer("3.102.0") const PULUMI_VERSION_3_102_0 = PULUMI_SEM_VER_3_102_0.version @@ -76,12 +79,71 @@ function getPulumiToolDescription(semVer: SemVer) { } export const pulumiCliSpecs: PluginToolSpec[] = [ + { + version: PULUMI_VERSION_3_122_0, + name: getPulumiToolName(PULUMI_SEM_VER_3_122_0), + description: getPulumiToolDescription(PULUMI_SEM_VER_3_122_0), + type: "binary", + _includeInGardenImage: true, + builds: [ + { + platform: "darwin", + architecture: "amd64", + url: `https://github.com/pulumi/pulumi/releases/download/v${PULUMI_VERSION_3_122_0}/pulumi-v${PULUMI_VERSION_3_122_0}-darwin-x64.tar.gz`, + sha256: "b06d2e15576a5522e7965c612094efc66b2350e473646138ca6c4dbbf2664cf2", + extract: { + format: "tar", + targetPath: "pulumi/pulumi", + }, + }, + { + platform: "darwin", + architecture: "arm64", + url: `https://github.com/pulumi/pulumi/releases/download/v${PULUMI_VERSION_3_122_0}/pulumi-v${PULUMI_VERSION_3_122_0}-darwin-arm64.tar.gz`, + sha256: "7537061ef6a82a4215d78de90a45d4548a72f01989f5a1636fb57d7d82bce4fa", + extract: { + format: "tar", + targetPath: "pulumi/pulumi", + }, + }, + { + platform: "linux", + architecture: "amd64", + url: `https://github.com/pulumi/pulumi/releases/download/v${PULUMI_VERSION_3_122_0}/pulumi-v${PULUMI_VERSION_3_122_0}-linux-x64.tar.gz`, + sha256: "19654329473635b3b4a32812e221d2aac737205c27b51d555c3b7b34d7e1e218", + extract: { + format: "tar", + targetPath: "pulumi/pulumi", + }, + }, + { + platform: "linux", + architecture: "arm64", + url: `https://github.com/pulumi/pulumi/releases/download/v${PULUMI_VERSION_3_122_0}/pulumi-v${PULUMI_VERSION_3_122_0}-linux-arm64.tar.gz`, + sha256: "b5bc4c80b8da257251358344c6b88a2d87533bab262958b136268602835e631d", + extract: { + format: "tar", + targetPath: "pulumi/pulumi", + }, + }, + { + platform: "windows", + architecture: "amd64", + url: `https://github.com/pulumi/pulumi/releases/download/v${PULUMI_VERSION_3_122_0}/pulumi-v${PULUMI_VERSION_3_122_0}-windows-x64.zip`, + sha256: "bed142db4ec4ff99faad2b88c2c59afc13deb2d1cf8a9e4ae070541bdfee31b2", + extract: { + format: "zip", + targetPath: "pulumi/bin/pulumi.exe", + }, + }, + ], + }, { version: PULUMI_VERSION_3_102_0, name: getPulumiToolName(PULUMI_SEM_VER_3_102_0), description: getPulumiToolDescription(PULUMI_SEM_VER_3_102_0), type: "binary", - _includeInGardenImage: true, + _includeInGardenImage: false, builds: [ { platform: "darwin", @@ -258,4 +320,4 @@ export const pulumiCliSpecs: PluginToolSpec[] = [ export const supportedVersions = pulumiCliSpecs.map((s) => s.version) // Default to latest pulumi version -export const defaultPulumiVersion = PULUMI_VERSION_3_70_0 +export const defaultPulumiVersion = PULUMI_VERSION_3_122_0