From 70810b10270a281eeff02bb208878fb4694ce099 Mon Sep 17 00:00:00 2001 From: Craig Thacker Date: Thu, 14 Dec 2023 00:36:56 +0000 Subject: [PATCH] Update code --- containers/jenkins-alpine/packer.pkr.hcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/containers/jenkins-alpine/packer.pkr.hcl b/containers/jenkins-alpine/packer.pkr.hcl index 1d78acb..128a55b 100644 --- a/containers/jenkins-alpine/packer.pkr.hcl +++ b/containers/jenkins-alpine/packer.pkr.hcl @@ -217,6 +217,8 @@ build { execute_command = "sudo -Hu ${var.normal_user} sh -c '{{ .Vars }} {{ .Path }}'" inline = [ "eval \"$(pyenv init --path)\"", + "pyenvLatestStable=$(pyenv install --list | grep -v - | grep -E \"^\\s*[0-9]+\\.[0-9]+\\.[0-9]+$\" | tail -1)", + "pyenv install $pyenvLatestStable", "pyenv global $pyenvLatestStable", "pip install --upgrade pip", "pip install --user pipenv virtualenv terraform-compliance checkov pywinrm",