mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 08:53:07 -06:00
ensure pipenv uses python 3.11 on AL2023
This commit is contained in:
@@ -20,6 +20,7 @@ set +a
|
|||||||
pipenv run \
|
pipenv run \
|
||||||
ansible-playbook -v \
|
ansible-playbook -v \
|
||||||
$ATL_DEPLOYMENT_REPOSITORY_CUSTOM_PARAMS \
|
$ATL_DEPLOYMENT_REPOSITORY_CUSTOM_PARAMS \
|
||||||
|
-e "ansible_python_interpreter=$(pipenv --venv)/bin/python" \
|
||||||
-e "${PLAYBOOK_INVOCATION_EXTRA_PARAMS}" \
|
-e "${PLAYBOOK_INVOCATION_EXTRA_PARAMS}" \
|
||||||
-i $INV \
|
-i $INV \
|
||||||
$PLAYBOOK \
|
$PLAYBOOK \
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
PIP_BIN="pip3"
|
PIP_BIN="pip3"
|
||||||
|
PIPENV_PYTHON="3"
|
||||||
|
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
if [[ $ID = "amzn" ]] && [[ $VERSION = "2" ]]; then
|
if [[ $ID = "amzn" ]] && [[ $VERSION = "2" ]]; then
|
||||||
@@ -19,6 +20,7 @@ elif [[ $ID = "amzn" ]] && [[ $VERSION = "2023" ]]; then
|
|||||||
python3.11-pip \
|
python3.11-pip \
|
||||||
python3.11-devel
|
python3.11-devel
|
||||||
PIP_BIN="pip3.11"
|
PIP_BIN="pip3.11"
|
||||||
|
PIPENV_PYTHON="3.11"
|
||||||
else
|
else
|
||||||
# FIXME: Currently assumes Debian-based
|
# FIXME: Currently assumes Debian-based
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
@@ -33,7 +35,7 @@ echo "Installing pipenv..."
|
|||||||
$PIP_BIN install pipenv
|
$PIP_BIN install pipenv
|
||||||
|
|
||||||
echo "Installing ansible and dependencies..."
|
echo "Installing ansible and dependencies..."
|
||||||
PIPENV_NOSPIN=1 PIPENV_HIDE_EMOJIS=1 pipenv sync 2>&1 | iconv -c -f utf-8 -t ascii
|
PIPENV_NOSPIN=1 PIPENV_HIDE_EMOJIS=1 pipenv --python $PIPENV_PYTHON sync 2>&1 | iconv -c -f utf-8 -t ascii
|
||||||
|
|
||||||
if [[ $1 == "--dev" ]]; then
|
if [[ $1 == "--dev" ]]; then
|
||||||
pipenv sync --dev
|
pipenv sync --dev
|
||||||
|
|||||||
Reference in New Issue
Block a user