From 9d48e79c643ba4563c06d91a853bf055b96fb455 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Wed, 25 Mar 2020 20:13:05 -0500 Subject: [PATCH 1/4] Added multiarch to docker-versions-create.sh --- docker-versions-create.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-versions-create.sh b/docker-versions-create.sh index fd1db9c4..922508b6 100755 --- a/docker-versions-create.sh +++ b/docker-versions-create.sh @@ -1,7 +1,7 @@ #!/bin/bash #set -x # Use this variable to indicate a list of branches that docker hub is watching -branches_list=('openj9' 'openj9-nightly' 'adopt11') +branches_list=('openj9' 'openj9-nightly' 'adopt11' 'multiarch') . /start-utils From 002ed4bc77c8585718af448664abbf32ed26d6aa Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Thu, 26 Mar 2020 09:41:55 -0500 Subject: [PATCH 2/4] Added armv7 to docker-versions-create.sh --- docker-versions-create.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-versions-create.sh b/docker-versions-create.sh index 922508b6..a0740a0d 100755 --- a/docker-versions-create.sh +++ b/docker-versions-create.sh @@ -1,7 +1,7 @@ #!/bin/bash #set -x # Use this variable to indicate a list of branches that docker hub is watching -branches_list=('openj9' 'openj9-nightly' 'adopt11' 'multiarch') +branches_list=('openj9' 'openj9-nightly' 'adopt11' 'multiarch' 'armv7') . /start-utils From 6f67f76eefe3e7c260e204e3e64c63910fa4929e Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Thu, 26 Mar 2020 20:50:13 -0500 Subject: [PATCH 3/4] Upgraded easy-add to 0.7.1 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0c5f682a..96660e95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ ARG TARGETOS=linux ARG TARGETARCH=amd64 ARG TARGETVARIANT="" -ARG EASY_ADD_VER=0.7.0 +ARG EASY_ADD_VER=0.7.1 ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add RUN chmod +x /usr/bin/easy-add From c73bedc63cf5dc66ddfe374c8c2ee932c44e4769 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Thu, 26 Mar 2020 20:53:10 -0500 Subject: [PATCH 4/4] Removed logging change from docker-versions-create.sh --- docker-versions-create.sh | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/docker-versions-create.sh b/docker-versions-create.sh index a0740a0d..008ae1a5 100755 --- a/docker-versions-create.sh +++ b/docker-versions-create.sh @@ -3,10 +3,8 @@ # Use this variable to indicate a list of branches that docker hub is watching branches_list=('openj9' 'openj9-nightly' 'adopt11' 'multiarch' 'armv7') -. /start-utils - function TrapExit { - log "Checking out back in master" + echo "Checking out back in master" git checkout master } @@ -19,33 +17,33 @@ do batchMode=true ;; *) - log "Unsupported arg $arg" + echo "Unsupported arg $arg" exit 2 ;; esac done -${batchMode} && log "Using batch mode" +${batchMode} && echo "Using batch mode" trap TrapExit EXIT SIGTERM -test -d ./.git || { log ".git folder was not found. Please start this script from root directory of the project!"; +test -d ./.git || { echo ".git folder was not found. Please start this script from root directory of the project!"; exit 1; } # Making sure we are in master git checkout master -git pull --all || { log "Can't pull the repo!"; \ +git pull --all || { echo "Can't pull the repo!"; \ exit 1; } git_branches=$(git branch -a) for branch in "${branches_list[@]}"; do if [[ "$git_branches" != *"$branch"* ]]; then - log "Can't update $branch because I can't find it in the list of branches." + echo "Can't update $branch because I can't find it in the list of branches." exit 1 else - log "Branch $branch found. Working with it." - git checkout "$branch" || { log "Can't checkout into the branch. Don't know the cause."; \ + echo "Branch $branch found. Working with it." + git checkout "$branch" || { echo "Can't checkout into the branch. Don't know the cause."; \ exit 1; } proceed='False' while [[ "$proceed" == "False" ]]; do @@ -54,14 +52,14 @@ for branch in "${branches_list[@]}"; do if git merge -m 'Auto-merging via docker-versions-create' master; then proceed="True" - log "Branch $branch updated to current master successfully" + echo "Branch $branch updated to current master successfully" # pushing changes to remote for this branch git commit -m "Auto merge branch with master" -a # push may fail if remote doesn't have this branch yet. In this case - sending branch - git push || git push -u origin "$branch" || { log "Can't push changes to the origin."; exit 1; } + git push || git push -u origin "$branch" || { echo "Can't push changes to the origin."; exit 1; } elif ${batchMode}; then status=$? - log "Git merge failed in batch mode" + echo "Git merge failed in batch mode" exit ${status} # and trap exit gets us back to master else