You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2022/02/11 15:48:45 UTC

[sling-org-apache-sling-starter] branch master updated (ef712b8 -> a558abf)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter.git.


    from ef712b8  SLING-9638 - Update Starter Docker image to be based on the feature model
     new 6c16cfb  SLING-9638 - Update Starter Docker image to be based on the feature model
     new a558abf  SLING-9638 - Update Starter Docker image to be based on the feature model

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 hooks/{pre_build => post_push} | 13 ++++++++++++-
 hooks/pre_build                |  5 +++++
 2 files changed, 17 insertions(+), 1 deletion(-)
 copy hooks/{pre_build => post_push} (66%)

[sling-org-apache-sling-starter] 02/02: SLING-9638 - Update Starter Docker image to be based on the feature model

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter.git

commit a558abf0d0d9cc4695c449b77d517854f18f7e4f
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Feb 11 16:28:01 2022 +0100

    SLING-9638 - Update Starter Docker image to be based on the feature model
    
    Document DockerHub tags
---
 hooks/post_push | 7 +++++++
 hooks/pre_build | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/hooks/post_push b/hooks/post_push
index 63c44e2..6127c1c 100755
--- a/hooks/post_push
+++ b/hooks/post_push
@@ -17,6 +17,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
+# This script makes sure that when a tag is build, it is also pushed
+# to the 'latest' tag, so that 'docker run apache/sling' always uses
+# the latest release
+#
+# see https://docs.docker.com/docker-hub/builds/advanced/
+
+
 if [[ ${DOCKER_TAG} =~ ^[0-9]+$ ]] ; then
     echo "Detected tag build, pushing to 'latest' tag"
     docker tag ${IMAGE_NAME} ${DOCKER_REPO}:latest
diff --git a/hooks/pre_build b/hooks/pre_build
index 49a4f4d..1a533b1 100755
--- a/hooks/pre_build
+++ b/hooks/pre_build
@@ -17,4 +17,9 @@
 # specific language governing permissions and limitations
 # under the License.
 
+# Since the top-level Dockerfile expects the project to be already be built, we hook
+# in the DockerHub build process and replicate the build using docker
+# 
+# see https://docs.docker.com/docker-hub/builds/advanced/
+
 docker run --rm -v "$(pwd)":/build -w /build maven:3.8-openjdk-11 mvn -B package

[sling-org-apache-sling-starter] 01/02: SLING-9638 - Update Starter Docker image to be based on the feature model

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter.git

commit 6c16cfbf4abe9faf85ccd10270407552e39c5862
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Feb 11 16:13:36 2022 +0100

    SLING-9638 - Update Starter Docker image to be based on the feature model
    
    Add post_push hook to push release tags as latest.
---
 hooks/post_push | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/hooks/post_push b/hooks/post_push
new file mode 100755
index 0000000..63c44e2
--- /dev/null
+++ b/hooks/post_push
@@ -0,0 +1,24 @@
+#!/bin/bash -e
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, 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.
+
+if [[ ${DOCKER_TAG} =~ ^[0-9]+$ ]] ; then
+    echo "Detected tag build, pushing to 'latest' tag"
+    docker tag ${IMAGE_NAME} ${DOCKER_REPO}:latest
+    docker push ${DOCKER_REPO}:latest
+fi