Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit 8a90692

Browse files
authored
Move build binaries from /usr/local/bin to /opt/build/bin (#450)
* Move build binaries from /usr/local/bin to /opt/build/bin * Remove old location of buildbot binary
1 parent ca811f4 commit 8a90692

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,9 @@ WORKDIR /
485485
USER root
486486

487487
# Add buildscript for local testing
488-
ADD run-build-functions.sh /usr/local/bin/run-build-functions.sh
489-
ADD run-build.sh /usr/local/bin/build
488+
RUN mkdir -p /opt/build/bin
489+
ADD run-build-functions.sh /opt/build/bin/run-build-functions.sh
490+
ADD run-build.sh /opt/build/bin/build
490491
ADD buildbot-git-config /root/.gitconfig
491492
RUN rm -r /tmp/*
492493

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ If you're having problems with your build, you can also use these tools to test
66

77
## Available images
88

9-
Netlify maintains multiple build images for testing new development as well as supporting legacy builds. Each image uses a different version of Ubuntu Linux, with a slightly different list of included language and software versions.
9+
Netlify maintains multiple build images for testing new development as well as supporting legacy builds. Each image uses a different version of Ubuntu Linux, with a slightly different list of included language and software versions.
1010

1111
The following images are currently available:
1212

@@ -54,7 +54,7 @@ If the command works correctly, you should see a new prompt, with the user `buil
5454
In the buildbot shell, run `build` followed by your site build command. For example, for a site build command of `npm run build`, you would run the following:
5555

5656
```
57-
build npm run build
57+
/opt/build/bin/build npm run build
5858
```
5959

6060
This will run the build as it would run on Netlify, displaying logs in your terminal as it goes. When you are done testing, you can exit the buildbot shell by typing `exit`.

run-build-functions.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ install_dependencies() {
466466
if [ -f package.json ]
467467
then
468468
restore_cwd_cache node_modules "node modules"
469-
if [ "$NETLIFY_USE_YARN" = "true" ] || ([ "$NETLIFY_USE_YARN" != "false" ] && [ -f yarn.lock ])
469+
if [ "$NETLIFY_USE_YARN" = "true" ] || ([ "$NETLIFY_USE_YARN" != "false" ] && [ -f yarn.lock ])
470470
then
471471
run_yarn $YARN_VERSION
472472
else
@@ -479,7 +479,7 @@ install_dependencies() {
479479
then
480480
if ! [ $(which bower) ]
481481
then
482-
if [ "$NETLIFY_USE_YARN" = "true" ] || ([ "$NETLIFY_USE_YARN" != "false" ] && [ -f yarn.lock ])
482+
if [ "$NETLIFY_USE_YARN" = "true" ] || ([ "$NETLIFY_USE_YARN" != "false" ] && [ -f yarn.lock ])
483483
then
484484
echo "Installing bower with Yarn"
485485
yarn add bower
@@ -788,7 +788,7 @@ set_go_import_path() {
788788
}
789789

790790
find_running_procs() {
791-
ps aux | grep -v [p]s | grep -v [g]rep | grep -v [b]ash | grep -v "/usr/local/bin/buildbot" | grep -v [d]efunct | grep -vw '\[build\]'
791+
ps aux | grep -v [p]s | grep -v [g]rep | grep -v [b]ash | grep -v "/opt/build/bin/buildbot" | grep -v [d]efunct | grep -vw '\[build\]'
792792
}
793793

794794
report_lingering_procs() {

test-tools/start-image.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ docker run --rm -t -i \
1515
-e SWIFT_VERSION \
1616
-e PYTHON_VERSION \
1717
-v ${REPO_PATH}:/opt/repo \
18-
-v ${BASE_PATH}/run-build.sh:/usr/local/bin/build \
19-
-v ${BASE_PATH}/run-build-functions.sh:/usr/local/bin/run-build-functions.sh \
18+
-v ${BASE_PATH}/run-build.sh:/opt/build/bin/build \
19+
-v ${BASE_PATH}/run-build-functions.sh:/opt/build/bin/run-build-functions.sh \
2020
$NETLIFY_IMAGE /bin/bash

test-tools/test-build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ chmod +w $T
4141
mkdir -p $T/cache
4242
chmod a+w $T/cache
4343

44-
SCRIPT="/usr/local/bin/build $2"
44+
SCRIPT="/opt/build/bin/build $2"
4545

4646
docker run --rm \
4747
-e NODE_VERSION \
@@ -55,8 +55,8 @@ docker run --rm \
5555
-e GO_IMPORT_PATH \
5656
-e SWIFT_VERSION \
5757
-v "${REPO_PATH}:/opt/repo" \
58-
-v "${BASE_PATH}/run-build.sh:/usr/local/bin/build" \
59-
-v "${BASE_PATH}/run-build-functions.sh:/usr/local/bin/run-build-functions.sh" \
58+
-v "${BASE_PATH}/run-build.sh:/opt/build/bin/build" \
59+
-v "${BASE_PATH}/run-build-functions.sh:/opt/build/bin/run-build-functions.sh" \
6060
-v $PWD/$T/cache:/opt/buildhome/cache \
6161
-w /opt/build \
6262
-it \

0 commit comments

Comments
 (0)