Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .kokoro/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,11 @@ RUN useradd -d /h -u ${UID} ${USERNAME}
# Allow nopasswd sudo
RUN echo "${USERNAME} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# Setup DRIFT region tag parser
ENV REGION_TAG_PARSER_DIR /region-tag-parser
ENV PARSER_PATH /region-tag-parser/wizard-py/cli.py

RUN git clone https://github.com/GoogleCloudPlatform/repo-automation-playground "$REGION_TAG_PARSER_DIR" --single-branch
RUN chmod +x $PARSER_PATH

CMD ["python3.6"]
7 changes: 7 additions & 0 deletions .kokoro/tests/run_single_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ fi
nox -s "$RUN_TESTS_SESSION"
EXIT=$?

# Inject region tag data into the test log
XUNIT_PATH="$PWD/sponge_log.xml"
XUNIT_TMP_PATH="$PWD/drift_tmp.xml"

cp $XUNIT_PATH $XUNIT_TMP_PATH
cat "$XUNIT_TMP_PATH" | python3.8 "$PARSER_PATH" inject-snippet-mapping "$PWD" > "$XUNIT_PATH"

# If REPORT_TO_BUILD_COP_BOT is set to "true", send the test log
# to the Build Cop Bot.
# See:
Expand Down
3 changes: 3 additions & 0 deletions .kokoro/tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ export PATH="${HOME}/.local/bin:${PATH}"
# install nox for testing
pip install --user -q nox

# install PyYaml (used by the DRIFT region tag parsing system)
pip install --user -q pyyaml

# On kokoro, we should be able to use the default service account. We
# need to somehow bootstrap the secrets on other CI systems.
if [[ "${TRAMPOLINE_CI}" == "kokoro" ]]; then
Expand Down