Skip to content

Commit ba2a1f8

Browse files
fix: add hashes to requirements.txt
and update Docker images so they require hashes.
1 parent 41cface commit ba2a1f8

File tree

7 files changed

+331
-22
lines changed

7 files changed

+331
-22
lines changed

docker/owlbot/java/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ COPY docker/owlbot/java/src /owlbot/src
2828
COPY docker/owlbot/java/templates /owlbot/templates
2929
COPY post-processor-changes.txt /post-processor-changes.txt
3030
RUN cd /owlbot/src && \
31-
python3 -m pip install -r requirements.txt
31+
python3 -m pip install --require-hashes -r requirements.txt
3232

3333
ADD https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/${JAVA_FORMAT_VERSION}/google-java-format-${JAVA_FORMAT_VERSION}-all-deps.jar /owlbot/google-java-format.jar
3434

docker/owlbot/nodejs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN apt-get install -y nodejs
2626

2727
###################### Install synthtool's requirements.
2828
COPY requirements.txt /synthtool/requirements.txt
29-
RUN pip install -r /synthtool/requirements.txt
29+
RUN pip install --require-hashes -r /synthtool/requirements.txt
3030

3131
# Put synthtool in the PYTHONPATH so owlbot.py scripts will find it.
3232
ENV PYTHONPATH="/synthtool"

docker/owlbot/nodejs_mono_repo/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN apt-get install -y nodejs
2626

2727
###################### Install synthtool's requirements.
2828
COPY requirements.txt /synthtool/requirements.txt
29-
RUN pip install -r /synthtool/requirements.txt
29+
RUN pip install --require-hashes -r /synthtool/requirements.txt
3030

3131
# Put synthtool in the PYTHONPATH so owlbot.py scripts will find it.
3232
ENV PYTHONPATH="/synthtool"

docker/owlbot/php/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN apt-get install -y nodejs
2626

2727
###################### Install synthtool's requirements.
2828
COPY requirements.txt /synthtool/requirements.txt
29-
RUN pip install -r /synthtool/requirements.txt
29+
RUN pip install --require-hashes -r /synthtool/requirements.txt
3030

3131
# Put synthtool in the PYTHONPATH so owlbot.py scripts will find it.
3232
ENV PYTHONPATH="/synthtool"

docker/owlbot/python/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN make altinstall
3434

3535
###################### Install synthtool's requirements.
3636
COPY requirements.txt /synthtool/requirements.txt
37-
RUN pip install -r /synthtool/requirements.txt
37+
RUN pip install --require-hashes -r /synthtool/requirements.txt
3838

3939
# Put synthtool in the PYTHONPATH so owlbot.py scripts will find it.
4040
ENV PYTHONPATH="/synthtool"

requirements.in

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
setuptools==65.0.1
2+
3+
nox
4+
requests
5+
pyyaml
6+
jinja2
7+
deprecation
8+
protobuf==3.20.1
9+
watchdog
10+
11+
# some java processing requires xml handling
12+
lxml
13+
14+
# Install sample-tester for generated samples
15+
sample-tester
16+
17+
# flake8 is used to validate the python samples noxfile template
18+
flake8

requirements.txt

Lines changed: 308 additions & 17 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)