Skip to content

Commit

Permalink
Change proxy to be passed in as a parameter (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangruin authored Sep 27, 2022
1 parent a42bfc3 commit 27f32d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ sudo sh build.sh $1 $2 $3
# $1: Choose to use branch or pr
# $2: Branch name or pr id
# $3: The image name of the final successful compilation, which defaults is rc
# $4: The http proxy path, which defaults is ""
```
For example, if you want to use branch-2.4 latest code to compile the image, you can write like this
```
sudo sh build.sh branch branch-2.4
```
If you want to compile the image using the code from https://github.com/StarRocks/starrocks/pull/9436 and you have an http proxy address, you can write like this
```
sudo sh build.sh pr 9436 rc "http://x.x.x.x:port"
```
### Compile StarRocks using the image compiled in the previouse step
For specific steps, please refer to the [documentation](https://docs.starrocks.com/en-us/main/administration/Build_in_docker). For example, if we choose to use the `branch-2.2` to compile, `{version}` in the documentation will be `branch-2.2-rc`.
Expand Down
5 changes: 3 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ curdir=$(
pwd
)

BUILD_TYPE=${1:?"The first parameter is required, select use branch or pr code"}
BUILD_TYPE=${1:?"The first parameter is required, select branch/pr"}
GIT_BRANCH=${2:?"The second parameter is required, input branch name or pr id"}
IMAGE_VERSION=${3:-"rc"}
PROXY=${4:-""}

GIT_REPO='https://github.com/StarRocks/starrocks.git'
CONTAINER_NAME_TOOLCHAIN="con_chain_"${GIT_BRANCH}
CONTAINER_NAME_THIRDPARTY='con_thirdparty'
Expand All @@ -23,7 +25,6 @@ PARAMS_TARGET=params_source_$MACHINE_TYPE.sh

source $curdir/$PARAMS_TARGET

PROXY="http://172.26.92.139:28888"
echo "===== proxy is $PROXY"
export https_proxy=$PROXY

Expand Down

0 comments on commit 27f32d1

Please sign in to comment.