yetus-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [yetus] branch master updated: YETUS-814. docker hub builds are out of sync
Date Fri, 15 Mar 2019 16:53:46 GMT
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yetus.git


The following commit(s) were added to refs/heads/master by this push:
     new 8ae3986  YETUS-814. docker hub builds are out of sync
8ae3986 is described below

commit 8ae39866be9f402e9758479ab39b936123996e62
Author: Allen Wittenauer <aw@apache.org>
AuthorDate: Sat Mar 9 09:18:28 2019 -0800

    YETUS-814. docker hub builds are out of sync
    
    Signed-off-by: Allen Wittenauer <aw@apache.org>
---
 hooks/build           | 30 +++++++++++++++++++-----------
 hooks/{build => push} | 13 ++-----------
 2 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/hooks/build b/hooks/build
index 531cf76..622589c 100755
--- a/hooks/build
+++ b/hooks/build
@@ -14,14 +14,22 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-if [[ -n "${DOCKERFILE_PATH}" ]]; then
-  docker build -t "${IMAGE_NAME}" \
-    --build-arg DOCKER_TAG="${DOCKER_TAG}" \
-    --build-arg DOCKER_REPO="${DOCKER_REPO}" \
-    -f "${DOCKERFILE_PATH}"
-else
-  docker build -t "${IMAGE_NAME}" \
-    --build-arg DOCKER_TAG="${DOCKER_TAG}" \
-    --build-arg DOCKER_REPO="${DOCKER_REPO}" \
-    .
-fi
+GIT_URL=$(git config --get remote.origin.url)
+
+# Build the -base image
+docker build \
+  --label "git-commit-sha=${SOURCE_COMMIT}" \
+  --label "git-commit-branch=${SOURCE_BRANCH}" \
+  --label "git-commit-url=${GIT_URL}" \
+  --tag "${DOCKER_REPO}-base:${DOCKER_TAG}" \
+  precommit/src/main/shell/test-patch-docker
+
+# Build the full image using base above
+docker build \
+  --label "git-commit-sha=${SOURCE_COMMIT}" \
+  --label "git-commit-branch=${SOURCE_BRANCH}" \
+  --label "git-commit-url=${GIT_URL}" \
+  --tag "${DOCKER_REPO}:${DOCKER_TAG}" \
+  --build-arg DOCKER_TAG="${DOCKER_TAG}" \
+  --build-arg DOCKER_REPO="${DOCKER_REPO}" \
+  .
\ No newline at end of file
diff --git a/hooks/build b/hooks/push
similarity index 70%
copy from hooks/build
copy to hooks/push
index 531cf76..8452e68 100755
--- a/hooks/build
+++ b/hooks/push
@@ -14,14 +14,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-if [[ -n "${DOCKERFILE_PATH}" ]]; then
-  docker build -t "${IMAGE_NAME}" \
-    --build-arg DOCKER_TAG="${DOCKER_TAG}" \
-    --build-arg DOCKER_REPO="${DOCKER_REPO}" \
-    -f "${DOCKERFILE_PATH}"
-else
-  docker build -t "${IMAGE_NAME}" \
-    --build-arg DOCKER_TAG="${DOCKER_TAG}" \
-    --build-arg DOCKER_REPO="${DOCKER_REPO}" \
-    .
-fi
+docker push "${DOCKER_REPO}-base:${DOCKER_TAG}"
+docker push "${DOCKER_REPO}:${DOCKER_TAG}"
\ No newline at end of file


Mime
View raw message