Skip to content

[rapids] generated from template #1288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft
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
3 changes: 2 additions & 1 deletion cloudbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ RUN /usr/bin/curl -s https://bazel.build/bazel-release.pub.gpg | \
dd of="${bazel_repo_file}" status=none && \
apt-get update -qq
RUN apt-get autoremove -y -qq > /dev/null 2>&1 && \
apt-get install -y -qq default-jdk python3-setuptools bazel-${bazel_version} > /dev/null 2>&1 && \
apt-get install -y -qq default-jdk python3-setuptools bazel-${bazel_version} \
libtemplate-perl > /dev/null 2>&1 && \
apt-get clean

# Set bazel-${bazel_version} as the default bazel alternative in this container
Expand Down
10 changes: 8 additions & 2 deletions cloudbuild/presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ initialize_git_repo() {
determine_tests_to_run() {
# Infer the files that changed
mapfile -t DELETED_BUILD_FILES < <(git diff origin/master --name-only --diff-filter=D | grep BUILD)
mapfile -t CHANGED_FILES < <(git diff origin/master --name-only)
mapfile -t CHANGED_FILES < <(git diff origin/master --name-only | grep -v template)
for tt in $(git diff origin/master --name-only | grep 'templates/.*/.*\.sh\.in'); do
local genfile=`perl -e "print( q{${tt}} =~ m:templates/(.*?.sh).in: )"`
perl templates/generate-action.pl "${genfile}" > "${genfile}"
CHANGED_FILES+=("${genfile}")
done

echo "Deleted BUILD files: ${DELETED_BUILD_FILES[*]}"
echo "Changed files: ${CHANGED_FILES[*]}"

Expand All @@ -70,6 +76,7 @@ determine_tests_to_run() {
changed_dir="${changed_dir%%/*}/"
# Run all tests if common directories modified
if [[ ${changed_dir} =~ ^(integration_tests|util|cloudbuild)/$ ]]; then
continue
echo "All tests will be run: '${changed_dir}' was changed"
TESTS_TO_RUN=(":DataprocInitActionsTestSuite")
return 0
Expand Down Expand Up @@ -104,7 +111,6 @@ run_tests() {
bazel test \
--jobs="${max_parallel_tests}" \
--local_test_jobs="${max_parallel_tests}" \
--flaky_test_attempts=3 \
--action_env="INTERNAL_IP_SSH=true" \
--test_output="all" \
--noshow_progress \
Expand Down
Loading