Unverified Commit 71ac2021 authored by Bulat Khusnimardanov's avatar Bulat Khusnimardanov Committed by GitHub

Enhancing Terraform Feature Stability (#657)

* Added fallback method to retrieve cosign version

* Update src/terraform/install.sh
Co-authored-by: 's avatarSamruddhi Khandale <samruddhikhandale@github.com>

* Remove get_cosign_latest_version function

---------
Co-authored-by: 's avatarSamruddhi Khandale <samruddhikhandale@github.com>
parent a4b31f31
{ {
"id": "terraform", "id": "terraform",
"version": "1.3.3", "version": "1.3.4",
"name": "Terraform, tflint, and TFGrunt", "name": "Terraform, tflint, and TFGrunt",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/terraform", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/terraform",
"description": "Installs the Terraform CLI and optionally TFLint and Terragrunt. Auto-detects latest version and installs needed dependencies.", "description": "Installs the Terraform CLI and optionally TFLint and Terragrunt. Auto-detects latest version and installs needed dependencies.",
......
...@@ -165,7 +165,8 @@ ensure_cosign() { ...@@ -165,7 +165,8 @@ ensure_cosign() {
if ! type cosign > /dev/null 2>&1; then if ! type cosign > /dev/null 2>&1; then
echo "Installing cosign..." echo "Installing cosign..."
local LATEST_COSIGN_VERSION=$(curl https://api.github.com/repos/sigstore/cosign/releases/latest | grep tag_name | cut -d : -f2 | tr -d "v\", ") LATEST_COSIGN_VERSION="latest"
find_version_from_git_tags LATEST_COSIGN_VERSION 'https://github.com/sigstore/cosign'
curl -L "https://github.com/sigstore/cosign/releases/latest/download/cosign_${LATEST_COSIGN_VERSION}_${architecture}.deb" -o /tmp/cosign_${LATEST_COSIGN_VERSION}_${architecture}.deb curl -L "https://github.com/sigstore/cosign/releases/latest/download/cosign_${LATEST_COSIGN_VERSION}_${architecture}.deb" -o /tmp/cosign_${LATEST_COSIGN_VERSION}_${architecture}.deb
dpkg -i /tmp/cosign_${LATEST_COSIGN_VERSION}_${architecture}.deb dpkg -i /tmp/cosign_${LATEST_COSIGN_VERSION}_${architecture}.deb
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment