add proxy support

This commit is contained in:
Your Name 2021-07-31 12:15:32 +00:00
parent 532a0475bf
commit e1cae5872e
7 changed files with 113 additions and 15 deletions

View File

@ -37,26 +37,26 @@ for current_file in $(cat $PATCH_LIST); do
echo "Adding $current_file"
echo "Executing bash ~/create-from-patch.sh $PATCH_OLD_PATH/${current_file:1} $PATCH_NEW_PATH"
bash ~/buildtools/create-from-patch.sh $PATCH_OLD_PATH/${current_file:1} $PATCH_NEW_PATH
bash ~/bromite-buildtools/create-from-patch.sh $PATCH_OLD_PATH/${current_file:1} $PATCH_NEW_PATH
echo "Press return"
read -n 1
#echo "Press return"
#read -n 1
elif [[ $current_file =~ ^1.* ]]; then
echo "Using new path $current_file"
bash ~/buildtools/apply-single-patch.sh $PATCH_NEW_PATH/${current_file:1} $PATCH_NEW_PATH
bash ~/bromite-buildtools/apply-single-patch.sh $PATCH_NEW_PATH/${current_file:1} $PATCH_NEW_PATH
echo ""
LAST_COMMIT=$(git rev-parse HEAD)
echo "Last Commit " $LAST_COMMIT
bash ~/buildtools/export-single-patch.sh $LAST_COMMIT
bash ~/bromite-buildtools/export-single-patch.sh $LAST_COMMIT
else
bash ~/buildtools/apply-single-patch.sh $PATCH_OLD_PATH/$current_file $PATCH_NEW_PATH
bash ~/bromite-buildtools/apply-single-patch.sh $PATCH_OLD_PATH/$current_file $PATCH_NEW_PATH
echo $current_file >>$DESTINATION
echo $PATCH_FILE
@ -64,7 +64,7 @@ for current_file in $(cat $PATCH_LIST); do
echo ""
LAST_COMMIT=$(git rev-parse HEAD)
echo "Last Commit " $LAST_COMMIT
bash ~/buildtools/export-single-patch.sh $LAST_COMMIT
bash ~/bromite-buildtools/export-single-patch.sh $LAST_COMMIT
#cp -r ~/bromite/build/patches-new/* ~/br2/bromite/build/patches/
#git -C ~/br2/bromite/ add .

View File

@ -14,12 +14,16 @@ echo "Applying patch $PATCH" | tee -a ${LOG_FILE}
git apply --reject --whitespace=fix $PATCH && OK=1
if [[ OK -eq 0 ]]; then
OK=1
for file in $(grep '+++ b/' $PATCH | sed -e 's#+++ [ab]/##'); do
test -f $file || OK=0
done
for file in $(find . -name *.rej); do
echo " -> Check $file" | tee -a ${LOG_FILE};
wiggle --no-ignore --replace ${file::-4} $file && rm $file && rm ${file::-4}.porig && echo " OK";
wiggle --no-ignore --replace ${file::-4} $file && rm $file && rm ${file::-4}.porig && echo " OK" || OK=0
done
OK=1
for file in $(find . -name *.rej); do
echo "---Found: $file" | tee -a ${LOG_FILE};
git add ${file::-4}
@ -64,5 +68,5 @@ if [[ OK -eq 0 ]]; then
fi
if [[ DOEXPORT -eq 1 ]]; then
bash ~/buildtools/create-from-patch.sh $PATCH $2
bash ~/bromite-buildtools/create-from-patch.sh $PATCH $2
fi

41
clone-src.sh Normal file
View File

@ -0,0 +1,41 @@
#!/bin/bash
VERSION=$(cat ~/bromite/build/RELEASE)
CURRENT_RELEASE=$(git -C ~/chromium/src/ rev-parse --verify refs/tags/$VERSION)
for file in $(git -C ~/chromium/src/ show --pretty="" --name-only $CURRENT_RELEASE...HEAD); do
DIRNAME=$(dirname $file)
mkdir -p ~/mytests/$DIRNAME
git -C ~/chromium/src/ show $CURRENT_RELEASE:$file > ~/mytests/$file
done
git -C ~/mytests/ add .
git -C ~/mytests/ commit -m "$VERSION"
ALLPATCHS_E=$(git -C ~/chromium/src/ rev-list --reverse $CURRENT_RELEASE...HEAD)
for patch in $ALLPATCHS_E; do
for file in $(git -C ~/chromium/src/ show --pretty="" --name-only $patch); do
DIRNAME=$(dirname $file)
mkdir -p ~/mytests/$DIRNAME
#cp ~/chromium/src/$file ~/mytests/$file
#echo $file
OK=0
git -C ~/chromium/src/ show $patch:$file > ~/mytests/$file && OK=1
if [[ OK -eq 0 ]]; then
echo " Removing ~/mytests/$file"
rm ~/mytests/$file
fi
done
#echo $ALLFILES_E
#read -n 1
MESSAGE=$(git -C ~/chromium/src/ log --pretty=format:%s -n 1 $patch)
git -C ~/mytests/ add .
git -C ~/mytests/ commit -m "$MESSAGE"
#read -n 1
done

View File

@ -34,17 +34,23 @@ else
if [[ "$NEWLINE" == Subject:* ]]; then
echo "" >>$PATCH_FILE
fi
fi
fi
echo "FILE:$(basename $PATCH)" >>$PATCH_FILE
echo "---" >>$PATCH_FILE
echo "$CONTENT" >>$PATCH_FILE
#echo press return
#read -n 1
echo press return
read -n 1
git reset --hard
git clean -f -d
echo " Applying new patch"
git am $PATCH_FILE
OK=1
git am $PATCH_FILE || OK=0
if [[ OK -eq 0 ]]; then
echo "---> Failed to apply. Press return"
read -n 1
fi

View File

@ -25,6 +25,6 @@ for patch in $ALLPATCHS_E; do
read -n 1
fi
bash ~/buildtools/export-single-patch.sh $patch $PATCH_FILE
bash ~/bromite-buildtools/export-single-patch.sh $patch $PATCH_FILE
done

View File

@ -0,0 +1 @@
REMOTEEXEC_ADDR=<ip-address>:50051

View File

@ -1,6 +1,38 @@
version: "3.9"
services:
runner-proxy:
image: uazo/privoxy
networks:
- bridge-ext
env_file:
- buildstack.env
volumes:
- /tmp/proxy:/tmp/proxy:rw
- /tmp/forward-proxy:/tmp/forward-proxy:rw
deploy:
mode: global
placement:
max_replicas_per_node: 1
constraints: [node.labels.githubrunner == 1]
# githubrunner:
# image: uazo/github-runner
# runtime: sysbox-runc
# depends_on:
# - runner-proxy
# networks:
# - bridge-int
# volumes:
# - /tmp/proxy:/tmp/proxy:rw
# - /tmp/forward-proxy:/tmp/forward-proxy:rw
# - /tmp/docker-inner:/var/lib/docker:rw
# deploy:
# mode: global
# placement:
# max_replicas_per_node: 1
# constraints: [node.labels.githubrunner == 1]
buildboxcasd:
image: uazo/buildboxcasd
networks:
@ -28,6 +60,20 @@ services:
max_replicas_per_node: 8
constraints: [node.labels.gomarunners == 8]
buildboxrunner-6:
image: uazo/buildboxrunner
networks:
- bridge-int
depends_on:
- buildboxcasd
volumes:
- /tmp/cache:/wrk-cache:rw
deploy:
replicas: 20
placement:
max_replicas_per_node: 6
constraints: [node.labels.gomarunners == 6]
buildboxrunner-4:
image: uazo/buildboxrunner
networks: