Skip to content
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

Extract common bazelrc to a shared file #781

Merged
merged 1 commit into from
May 23, 2019
Merged
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
16 changes: 2 additions & 14 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Print test logs for failed tests
test --test_output=errors
# Import shared settings first so we can override below
import common.bazelrc

# Mock versioning command to test the --stamp behavior
build --workspace_status_command="echo BUILD_SCM_VERSION 1.2.3"

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ var_8: &use_legacy_runfiles
run:
name: Use legacy runfiles
command: |
sed -i -e 's/run --nolegacy_external_runfiles//' .bazelrc
sed -i -e 's/test --nolegacy_external_runfiles//' .bazelrc
echo 'run --legacy_external_runfiles' >> .bazelrc
echo 'test --legacy_external_runfiles' >> .bazelrc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhhhhh. 🤦‍♂ That is much better.


var_9: &job_defaults
working_directory: ~/rules_nodejs
Expand Down
16 changes: 16 additions & 0 deletions common.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Common Bazel settings
# These are imported into the .bazelrc files in each workspace in this repo

# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
15 changes: 1 addition & 14 deletions e2e/bazel_bin/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/define_var/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/jasmine/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/karma/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/karma_stack_trace/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/karma_typescript/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/ts_auto_deps/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/ts_devserver/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/ts_library/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/tsconfig_extends/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/typescript_2.7/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/typescript_2.8/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/typescript_2.9/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/typescript_3.0/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/typescript_3.1/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions e2e/webpack/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions examples/app/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions examples/bazel_managed_deps/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions examples/parcel/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
12 changes: 3 additions & 9 deletions examples/program/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles
# Note, this workspace doesn't need --experimental_allow_incremental_repository_updates
# but it's simpler to get all the shared settings anyway.
import %workspace%/../../common.bazelrc
15 changes: 1 addition & 14 deletions examples/protocol_buffers/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
# Print test logs for failed tests
test --test_output=errors

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
import %workspace%/../../common.bazelrc
Loading