-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into renovate/platformdirs-4.x
- Loading branch information
Showing
84 changed files
with
2,769 additions
and
558 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,26 +15,68 @@ | |
# build from the root of this repo: | ||
FROM gcr.io/cloud-devrel-public-resources/python | ||
|
||
# install tools | ||
ARG SYNTHTOOL_COMMITTISH=63cc541da2c45fcfca2136c43e638da1fbae174d | ||
ARG OWLBOT_CLI_COMMITTISH=ac84fa5c423a0069bbce3d2d869c9730c8fdf550 | ||
ENV HOME=/home | ||
|
||
# install OS tools | ||
RUN apt-get update && apt-get install -y \ | ||
unzip openjdk-17-jdk rsync maven jq \ | ||
&& apt-get clean | ||
|
||
COPY library_generation /src | ||
|
||
# use python 3.11 (the base image has several python versions; here we define the default one) | ||
RUN rm $(which python3) | ||
RUN ln -s $(which python3.11) /usr/local/bin/python | ||
RUN ln -s $(which python3.11) /usr/local/bin/python3 | ||
RUN python -m pip install --upgrade pip | ||
RUN cd /src && python -m pip install -r requirements.txt | ||
RUN cd /src && python -m pip install . | ||
|
||
# set dummy git credentials for empty commit used in postprocessing | ||
RUN git config --global user.email "[email protected]" | ||
RUN git config --global user.name "Cloud Java Bot" | ||
# copy source code | ||
COPY library_generation /src | ||
|
||
WORKDIR /workspace | ||
RUN chmod 750 /workspace | ||
RUN chmod 750 /src/generate_repo.py | ||
# install scripts as a python package | ||
WORKDIR /src | ||
RUN python -m pip install -r requirements.txt | ||
RUN python -m pip install . | ||
|
||
# install synthtool | ||
WORKDIR /tools | ||
RUN git clone https://github.com/googleapis/synthtool | ||
WORKDIR /tools/synthtool | ||
RUN git checkout "${SYNTHTOOL_COMMITTISH}" | ||
RUN python3 -m pip install --no-deps -e . | ||
RUN python3 -m pip install -r requirements.in | ||
|
||
CMD [ "/src/generate_repo.py" ] | ||
# Install nvm with node and npm | ||
ENV NODE_VERSION 20.12.0 | ||
WORKDIR /home | ||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash | ||
RUN chmod o+rx /home/.nvm | ||
ENV NODE_PATH=/home/.nvm/versions/node/v${NODE_VERSION}/bin | ||
ENV PATH=${PATH}:${NODE_PATH} | ||
RUN node --version | ||
RUN npm --version | ||
|
||
# install the owl-bot CLI | ||
WORKDIR /tools | ||
RUN git clone https://github.com/googleapis/repo-automation-bots | ||
WORKDIR /tools/repo-automation-bots/packages/owl-bot | ||
RUN git checkout "${OWLBOT_CLI_COMMITTISH}" | ||
RUN npm i && npm run compile && npm link | ||
RUN owl-bot copy-code --version | ||
RUN chmod -R o+rx ${NODE_PATH} | ||
RUN ln -sf ${NODE_PATH}/* /usr/local/bin | ||
|
||
# allow users to access the script folders | ||
RUN chmod -R o+rx /src | ||
|
||
# set dummy git credentials for the empty commit used in postprocessing | ||
# we use system so all users using the container will use this configuration | ||
RUN git config --system user.email "[email protected]" | ||
RUN git config --system user.name "Cloud Java Bot" | ||
|
||
# allow read-write for /home and execution for binaries in /home/.nvm | ||
RUN chmod -R a+rw /home | ||
RUN chmod -R a+rx /home/.nvm | ||
|
||
WORKDIR /workspace | ||
ENTRYPOINT [ "python", "/src/cli/entry_point.py", "generate" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
java-version: 17 | ||
cache: maven | ||
- name: Set up Maven | ||
uses: stCarolas/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.