You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@yetus.apache.org by aw...@apache.org on 2021/11/15 21:56:44 UTC
[yetus] branch YETUS-1138 updated: retry
This is an automated email from the ASF dual-hosted git repository.
aw pushed a commit to branch YETUS-1138
in repository https://gitbox.apache.org/repos/asf/yetus.git
The following commit(s) were added to refs/heads/YETUS-1138 by this push:
new 986522c retry
986522c is described below
commit 986522c59e102bbf078d3ae296b58a24a741d44c
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Mon Nov 15 13:56:38 2021 -0800
retry
---
hooks/build | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/hooks/build b/hooks/build
index 2482b24..e237e3a 100755
--- a/hooks/build
+++ b/hooks/build
@@ -13,6 +13,14 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+env
+hostname
+
+traphandler() {
+ docker buildx rm yetus-multiarch || true
+}
+
+trap traphandler HUP INT QUIT TERM
GIT_URL=$(git config --get remote.origin.url)
@@ -44,8 +52,16 @@ if [[ -z "${DOCKER_REPO}" ]]; then
export DOCKER_REPO
fi
-docker buildx create --name multiarch --driver docker-container --use
-docker buildx inspect --bootstrap
+if [[ "$(uname -s)" == 'Linux' ]]; then
+ if [[ ! -f /proc/sys/fs/binfmt_misc/qemu-aarch64 ]]; then
+ sudo apt-get update && sudo apt-get install -y qemu-user-static
+ sudo /etc/init.d/binfmt-support force-reload
+ fi
+ cat /proc/sys/fs/binfmt_misc/qemu-aarch64
+fi
+
+docker buildx create --name yetus-multiarch --driver docker-container --use || exit 1
+docker buildx inspect --bootstrap || exit 1
KNOWN_PLATFORMS=$(docker buildx inspect --bootstrap)
@@ -68,7 +84,7 @@ docker buildx build --platform "${PLATSTRING}" \
--label "git-commit-url=${GIT_URL}" \
--tag "${DOCKER_REPO}-base:${DOCKER_TAG}" \
--push \
- precommit/src/main/shell/test-patch-docker
+ precommit/src/main/shell/test-patch-docker || exit 1
# Build the full image using base above
docker buildx build --platform "${PLATSTRING}" \