pingcap / pingcap/tidb

bazel makefile task using env var instead of make params

Open
#37,199 5 comments 0 reactions 1 assignee Assigned to @wuhuizuo View on GitHub
type/feature-request
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Feature Request

**Is your feature request related to a problem? Please describe:**
In https://github.com/pingcap/tidb/blob/master/Makefile#L418~L420

If I want set remote cache server, run make task:
```bash
make bazel_build BAZEL_CMD_CONFIG="'--remote_cache=cache-server.com'"
```

**Describe the feature you'd like:**

I think it prefer to this style:

```bash
export BAZEL_CMD_CONFIG="'--remote_cache=cache-server.com'" # it can define global in CI server

make bazel_build # no need to change in pipeline file
```

**Describe alternatives you've considered:**

- change all `$(BAZEL_GLOBAL_CONFIG)` to `${BAZEL_GLOBAL_CONFIG}` or add a line to set BAZEL_GLOBAL_CONFIG from env var when no `BAZEL_GLOBAL_CONFIG` make param provided.
- change all `$(BAZEL_CMD_CONFIG)` to `${BAZEL_CMD_CONFIG}` or add a line to set BAZEL_CMD_CONFIG param from env var when no `BAZEL_CMD_CONFIG` make param provided.

**Teachability, Documentation, Adoption, Migration Strategy:**

it's not a break changes if we prefer to:
> add a line to set BAZEL_GLOBAL_CONFIG from env var when no `BAZEL_GLOBAL_CONFIG` make param provided.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.