From 644067e9711fe0feb86787f80b3721ae14675482 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Thu, 22 Oct 2026 10:58:32 +0300 Subject: [PATCH 1/3] chore: Pin the README example, test the PR script and add curl timeouts --- README.md | 4 ++-- env0.plugin.yaml | 6 +++--- test/env0.yaml | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a183c23..e693da3 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ The plugin uses the env0 API to fetch the output values from another environment The plugin downloads a prebuilt binary for the agent architecture (`amd64` or `arm64`) from the [GitHub releases](https://github.com/env0/env0-import-variable-plugin/releases) and verifies its SHA-256 checksum. It does not install Go. If the download fails, the plugin installs Go and builds the binary from source. -Use `use: https://github.com/env0/env0-import-variable-plugin` in your custom flow to get this behavior. If you copied the old plugin script into your `env0.yaml`, replace it with `use:`. +Use `use: https://github.com/env0/env0-import-variable-plugin@` in your custom flow to get this behavior, with the latest version from the [releases](https://github.com/env0/env0-import-variable-plugin/releases). If you copied the old plugin script into your `env0.yaml`, replace it with `use:`. ## Example Usage @@ -76,7 +76,7 @@ deploy: terraformPlan: before: - name: Import Variables # The name that will be presented in the UI for this step - use: https://github.com/env0/env0-import-variable-plugin + use: https://github.com/env0/env0-import-variable-plugin@0.5.1 inputs: {} ``` diff --git a/env0.plugin.yaml b/env0.plugin.yaml index d4522d1..2e449ba 100644 --- a/env0.plugin.yaml +++ b/env0.plugin.yaml @@ -37,9 +37,9 @@ run: arch="$(plugin_arch)" || return 1 binary="import-variable-plugin_linux_$arch" download_dir="$(mktemp -d)" - curl -fsSL --retry 3 -o "$download_dir/$binary" "$(release_url "$binary")" && - curl -fsSL --retry 3 -o "$download_dir/importVariables.sh" "$(release_url importVariables.sh)" && - curl -fsSL --retry 3 -o "$download_dir/checksums.txt" "$(release_url checksums.txt)" && + curl -fsSL --retry 3 --connect-timeout 10 --max-time 120 -o "$download_dir/$binary" "$(release_url "$binary")" && + curl -fsSL --retry 3 --connect-timeout 10 --max-time 120 -o "$download_dir/importVariables.sh" "$(release_url importVariables.sh)" && + curl -fsSL --retry 3 --connect-timeout 10 --max-time 120 -o "$download_dir/checksums.txt" "$(release_url checksums.txt)" && verify_checksum "$download_dir" "$binary" && verify_checksum "$download_dir" importVariables.sh && chmod +x "$download_dir/$binary" "$download_dir/importVariables.sh" && diff --git a/test/env0.yaml b/test/env0.yaml index 1a0167d..1df156c 100644 --- a/test/env0.yaml +++ b/test/env0.yaml @@ -5,7 +5,8 @@ deploy: setupVariables: after: - name: Import Variables - use: https://github.com/env0/env0-import-variable-plugin + run: | + sed -n '/^ exec: |$/,$p' "$ENV0_ROOT_DIR/env0.plugin.yaml" | tail -n +2 | sed 's/^ //' | bash terraformOutput: after: - name: Test Outputs From d85154ea1e217ba9649f1b4c631b2ee74ac2ab31 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Thu, 22 Oct 2026 11:05:09 +0300 Subject: [PATCH 2/3] chore: Check that the README pins the plugin default version --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80de02e..009016a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,3 +27,12 @@ jobs: - name: Check plugin script syntax run: yq '.run.exec' env0.plugin.yaml | bash -n + + - name: Check the README uses the plugin default version + run: | + default_version="$(sed -n 's/^ *PLUGIN_DEFAULT_VERSION=//p' env0.plugin.yaml)" + readme_versions="$(grep -oE 'env0-import-variable-plugin@[0-9][0-9A-Za-z.-]*' README.md | cut -d@ -f2 | sort -u | paste -sd ' ' -)" + if [[ "$readme_versions" != "$default_version" ]]; then + echo "::error file=README.md::README pins '${readme_versions}', but PLUGIN_DEFAULT_VERSION is '$default_version'" + exit 1 + fi From e1c2b35998603f7b949b8365f2a12ba8d1045066 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Thu, 22 Oct 2026 11:52:31 +0300 Subject: [PATCH 3/3] chore: Remove the README version check --- .github/workflows/ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 009016a..80de02e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,12 +27,3 @@ jobs: - name: Check plugin script syntax run: yq '.run.exec' env0.plugin.yaml | bash -n - - - name: Check the README uses the plugin default version - run: | - default_version="$(sed -n 's/^ *PLUGIN_DEFAULT_VERSION=//p' env0.plugin.yaml)" - readme_versions="$(grep -oE 'env0-import-variable-plugin@[0-9][0-9A-Za-z.-]*' README.md | cut -d@ -f2 | sort -u | paste -sd ' ' -)" - if [[ "$readme_versions" != "$default_version" ]]; then - echo "::error file=README.md::README pins '${readme_versions}', but PLUGIN_DEFAULT_VERSION is '$default_version'" - exit 1 - fi