Skip to content

Commit ca4c7ce

Browse files
authored
chore(owlbot-nodejs): install 3.13.5 Python (#2102)
* chore: install higher version of Python * chore: update to python 3.15 * update lagging dependency * fix vulnerability * change the version
1 parent 05f1d86 commit ca4c7ce

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

docker/owlbot/nodejs/Dockerfile

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,31 @@ RUN apt-get update && \
2525
apt-get install -y --no-install-recommends \
2626
ca-certificates \
2727
git \
28-
python3 \
29-
python3-pip \
30-
python3-venv \
3128
curl \
32-
xz-utils && \
33-
rm -rf /var/lib/apt/lists/*
34-
35-
# Verify Python installation and ensure pip is available.
36-
# 'python3' command will now point to Python 3.11.
37-
RUN python3 --version
38-
RUN python3 -m pip --version
29+
xz-utils
3930

31+
# Install pyenv dependencies
32+
RUN apt-get update && \
33+
apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
34+
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
35+
xz-utils tk-dev libffi-dev liblzma-dev && \
36+
apt-get upgrade -y
37+
38+
WORKDIR /root
39+
40+
# Install pyenv
41+
RUN curl -L -o /tmp/pyenv.tar.gz https://github.com/pyenv/pyenv/archive/refs/tags/v2.6.3.tar.gz && \
42+
mkdir -p /root/.pyenv && \
43+
tar -xzvf /tmp/pyenv.tar.gz -C /root/.pyenv --strip-components=1 && \
44+
echo 'eval "$(pyenv init -)"' >> /root/.profile && \
45+
echo 'eval "$(pyenv virtualenv-init -)"' >> /root/.profile
46+
47+
ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}"
48+
49+
# Install python
50+
RUN pyenv install 3.13.5 && \
51+
pyenv global 3.13.5 && \
52+
python3 -m pip install --upgrade pip setuptools
4053

4154
## Install Node.js from apt-get
4255

docker/owlbot/nodejs/container_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ commandTests:
55
expectedOutput: ["v18.20.6"]
66
- name: "python"
77
command: ["python", "--version"]
8-
expectedOutput: ["Python 3.11.2"]
8+
expectedOutput: ["Python 3.13.5"]

synthtool/gcp/templates/node_library/.github/workflows/issues-no-repro.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
pull-requests: write
1212
steps:
1313
- uses: actions/checkout@v4
14-
- uses: actions/setup-node@v3
14+
- uses: actions/setup-node@v4
1515
with:
1616
node-version: 18
1717
- run: npm install

0 commit comments

Comments
 (0)