Improve dockerfiles
This commit is contained in:
parent
afacbfa3b3
commit
f4027f0511
@ -1,6 +1,6 @@
|
||||
ARG VERSION
|
||||
|
||||
FROM localhost:5000/uazo/bromite:$VERSION
|
||||
FROM uazo/bromite:$VERSION
|
||||
ARG VERSION
|
||||
ENV VERSION=$VERSION
|
||||
|
||||
@ -10,6 +10,7 @@ COPY pre-start.sh .
|
||||
COPY start-build.sh .
|
||||
COPY goma_auth.py .
|
||||
COPY casupload .
|
||||
COPY build_args.gni .
|
||||
|
||||
RUN sudo chmod +x ./start-build.sh \
|
||||
&& \
|
||||
|
23
images/bromite-build/build_args.gni
Normal file
23
images/bromite-build/build_args.gni
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
declare_args() {
|
||||
_is_debug_build = ""
|
||||
target_cpu = "x86"
|
||||
}
|
||||
|
||||
_is_debug_build = getenv("TARGET_ISDEBUG")
|
||||
|
||||
not_needed(["_target_build", "_is_debug_build"])
|
||||
|
||||
if(getenv("TARGET_CPU") != "") {
|
||||
target_cpu = getenv("TARGET_CPU")
|
||||
}
|
||||
print("Target " + target_cpu)
|
||||
|
||||
if(!(_is_debug_build == "")) {
|
||||
print("Debug build on")
|
||||
is_debug = true
|
||||
is_official_build = false
|
||||
dcheck_always_on = true
|
||||
symbol_level = 1
|
||||
strip_debug_info = false
|
||||
}
|
@ -12,8 +12,3 @@ cipd install infra/goma/client/linux-amd64 -root $WORKSPACE/goma
|
||||
|
||||
echo "nomatter" >$WORKSPACE/.debug_auth_file
|
||||
sudo cp $WORKSPACE/goma_auth.py $WORKSPACE/goma/
|
||||
|
||||
cd chromium/src
|
||||
|
||||
echo -e ${RED} -------- gn gen ${NC}
|
||||
gn gen --args="$(cat ../../bromite/build/GN_ARGS) target_cpu=\"x86\" use_goma=true goma_dir=\"$WORKSPACE/goma\" " out/bromite
|
||||
|
@ -21,12 +21,23 @@ $WORKSPACE/goma/goma_ctl.py ensure_start
|
||||
|
||||
cd chromium/src
|
||||
|
||||
OUT_PRESENT=0
|
||||
test -d out/bromite && OUT_PRESENT=1
|
||||
if [[ OUT_PRESENT -eq 0 ]]; then
|
||||
echo -e ${RED} -------- gn gen ${NC}
|
||||
gn gen --args="import(\"../../bromite/build/GN_ARGS\") use_goma=true goma_dir=\"$WORKSPACE/goma\" $(cat ../../build_args.gni) " out/bromite
|
||||
|
||||
echo -e ${RED} -------- gn args ${NC}
|
||||
gn args out/bromite/ --list --short
|
||||
gn args out/bromite/ --list >$WORKSPACE/artifacs/gn_list
|
||||
fi
|
||||
|
||||
if [[ -z "${GOMAJOBS}" ]]; then
|
||||
GOMAJOBS=40
|
||||
fi
|
||||
|
||||
echo -e ${RED} -------- pre-cache toolchain ${NC}
|
||||
../../casupload --cas-server=http://$REMOTEEXEC_ADDR --instance=default_instance \
|
||||
sudo ../../casupload --cas-server=unix:/tmp/proxy/bots.sock --instance=default_instance \
|
||||
third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include \
|
||||
third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/include \
|
||||
third_party/llvm-build/Release+Asserts/lib \
|
||||
@ -37,6 +48,16 @@ echo -e ${RED} -------- pre-cache toolchain ${NC}
|
||||
|
||||
echo -e ${RED} -------- start build ${NC}
|
||||
autoninja -j $GOMAJOBS -C out/bromite chrome_public_apk
|
||||
echo -e ${RED} -------- end build ${NC}
|
||||
|
||||
bash
|
||||
wget http://127.0.0.1:8088/logz?subproc-INFO -o out/artifacs/goma-client.log
|
||||
cp out/bromite/apks/* $WORKSPACE/artifacs/
|
||||
|
||||
echo -e ${RED} -------- generating breakpad symbols ${NC}
|
||||
autoninja -j $GOMAJOBS -C out/bromite minidump_stackwalk dump_syms
|
||||
components/crash/content/tools/generate_breakpad_symbols.py --build-dir=out/bromite \
|
||||
--symbols-dir=$WORKSPACE/artifacs/symbols/ --binary=out/bromite/lib.unstripped/libchrome.so --clear --verbose
|
||||
cp out/bromite/lib.unstripped/libchrome.so $WORKSPACE/artifacs/symbols/libchrome.lib.so
|
||||
cp out/bromite/minidump_stackwalk $WORKSPACE/artifacs/symbols
|
||||
cp out/bromite/dump_syms $WORKSPACE/artifacs/symbols
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
ARG VERSION
|
||||
|
||||
FROM localhost:5000/uazo/chromium:$VERSION
|
||||
FROM uazo/chromium:$VERSION
|
||||
ARG VERSION
|
||||
ENV VERSION=$VERSION
|
||||
|
||||
|
@ -6,7 +6,7 @@ COPY config-file .
|
||||
|
||||
RUN apt-get update \
|
||||
&& \
|
||||
apt-get -y install sudo wget git \
|
||||
apt-get -y install sudo wget git socat \
|
||||
&& \
|
||||
sudo chmod +x ./install-goma-server.sh \
|
||||
&& \
|
||||
|
@ -12,6 +12,7 @@ echo -e ${RED} -------- install go 16.2 ${NC}
|
||||
wget https://golang.org/dl/go1.16.2.linux-amd64.tar.gz
|
||||
sudo rm -rf /usr/local/go
|
||||
sudo tar -C /usr/local -xzf go1.16.2.linux-amd64.tar.gz
|
||||
rm go1.16.2.linux-amd64.tar.gz
|
||||
|
||||
echo -e ${RED} -------- cloning goma-server ${NC}
|
||||
|
||||
|
@ -7,6 +7,8 @@ NC='\033[0m' # No Color
|
||||
|
||||
echo -e ${RED} -------- start goma-server ${NC}
|
||||
|
||||
socat UNIX-LISTEN:/tmp/proxy/bots.sock,reuseaddr,fork TCP4:$REMOTEEXEC_ADDR &
|
||||
|
||||
cd ./goma-server/
|
||||
/usr/local/go/bin/go run ./cmd/remoteexec_proxy/main.go \
|
||||
--port 5050 \
|
||||
|
Loading…
Reference in New Issue
Block a user