rombert commented on a change in pull request #27:
URL: 
https://github.com/apache/sling-org-apache-sling-feature-launcher/pull/27#discussion_r620437462



##########
File path: hooks/push
##########
@@ -0,0 +1,49 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# 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.
+# -----------------------------------------------------------------------------
+
+# tags the maven-generated image with the Docker-Hub estimated 
image-name:latest and additional tags 
+
+# name of the image, given by pom.xml
+BASE_IMAGE_NAME="sling/feature-launcher"
+
+# latest tag
+docker tag $BASE_IMAGE_NAME $DOCKER_REPO:latest
+docker push $DOCKER_REPO:latest
+
+# additional tag with the SHA1 hash of the commit.
+docker tag $BASE_IMAGE_NAME $DOCKER_REPO:$SOURCE_COMMIT
+docker push $DOCKER_REPO:$SOURCE_COMMIT
+
+# additional tag with project version,
+PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q 
-DforceStdout)

Review comment:
       Do we need this? I think we could use `${DOCKER_TAG}` instead.

##########
File path: hooks/push
##########
@@ -0,0 +1,49 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# 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.
+# -----------------------------------------------------------------------------
+
+# tags the maven-generated image with the Docker-Hub estimated 
image-name:latest and additional tags 
+
+# name of the image, given by pom.xml
+BASE_IMAGE_NAME="sling/feature-launcher"
+
+# latest tag
+docker tag $BASE_IMAGE_NAME $DOCKER_REPO:latest
+docker push $DOCKER_REPO:latest
+
+# additional tag with the SHA1 hash of the commit.
+docker tag $BASE_IMAGE_NAME $DOCKER_REPO:$SOURCE_COMMIT
+docker push $DOCKER_REPO:$SOURCE_COMMIT
+
+# additional tag with project version,
+PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q 
-DforceStdout)
+docker tag $BASE_IMAGE_NAME $DOCKER_REPO:$PROJECT_VERSION
+docker push $DOCKER_REPO:$PROJECT_VERSION
+
+# additional tag with snapshot or stable
+SNAPSHOT_REGEX="^(.*)-SNAPSHOT"

Review comment:
       No snapshots please

##########
File path: hooks/push
##########
@@ -0,0 +1,49 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# 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.
+# -----------------------------------------------------------------------------
+
+# tags the maven-generated image with the Docker-Hub estimated 
image-name:latest and additional tags 
+
+# name of the image, given by pom.xml
+BASE_IMAGE_NAME="sling/feature-launcher"

Review comment:
       Can we use `${IMAGE_NAME}` instead?

##########
File path: readme.md
##########
@@ -48,4 +55,36 @@ String[] arguments = new String[] {
 org.apache.sling.feature.launcher.impl.Main.main(arguments);
 ```
 
+# Container
+
+The container-image `apache/sling-org-apache-sling-feature-launcher:latest` is 
avaiable on DockerHub.
+
+Available tags:
+- **latest**    - latest build, could be a `snapshot` **or** `release` version.
+- **snapshot**  - latest build of a `*-SNAPSHOT` version.
+- **stable**    - latest build of a **release** version.
+- **(version)** - latest build of a fixed version, could be a `snapshot - 
(1.1.9-SNAPSHOT)` **or** `release - (1.1.9)` version.

Review comment:
       No snapshots please

##########
File path: readme.md
##########
@@ -48,4 +55,36 @@ String[] arguments = new String[] {
 org.apache.sling.feature.launcher.impl.Main.main(arguments);
 ```
 
+# Container
+
+The container-image `apache/sling-org-apache-sling-feature-launcher:latest` is 
avaiable on DockerHub.
+
+Available tags:
+- **latest**    - latest build, could be a `snapshot` **or** `release` version.
+- **snapshot**  - latest build of a `*-SNAPSHOT` version.

Review comment:
       No snapshots please

##########
File path: readme.md
##########
@@ -48,4 +55,36 @@ String[] arguments = new String[] {
 org.apache.sling.feature.launcher.impl.Main.main(arguments);
 ```
 
+# Container
+
+The container-image `apache/sling-org-apache-sling-feature-launcher:latest` is 
avaiable on DockerHub.

Review comment:
       Please use the new name.

##########
File path: readme.md
##########
@@ -48,4 +55,36 @@ String[] arguments = new String[] {
 org.apache.sling.feature.launcher.impl.Main.main(arguments);
 ```
 
+# Container
+
+The container-image `apache/sling-org-apache-sling-feature-launcher:latest` is 
avaiable on DockerHub.
+
+Available tags:
+- **latest**    - latest build, could be a `snapshot` **or** `release` version.
+- **snapshot**  - latest build of a `*-SNAPSHOT` version.
+- **stable**    - latest build of a **release** version.
+- **(version)** - latest build of a fixed version, could be a `snapshot - 
(1.1.9-SNAPSHOT)` **or** `release - (1.1.9)` version.
+- **(sha1)**    - uses SHA1 hash of the git commit as tag
+
+
+If you are running sling-feature-launcher as an container please use env vars.
+```
+$docker run -it --rm --env FEATURE_FILES=https://path.to/feature-model.json 
apache/sling-org-apache-sling-feature-launcher:latest

Review comment:
       Please use the new name.

##########
File path: hooks/build
##########
@@ -0,0 +1,28 @@
+#!/bin/bash
+# -----------------------------------------------------------------------------
+# 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.
+# -----------------------------------------------------------------------------
+
+# we are on ubuntu xenial (16.4) java-11 is hard to install so we tage java 8
+apt-get update -y
+apt-get install default-jdk maven -y
+java -version
+mvn -version
+mvn clean package -P container

Review comment:
       Maybe this would be a good place to validate that:
   - we don't build a snapshot version
   - the base image name is the one we expect from the pom ( compare with 
`${IMAGE_NAME}` )

##########
File path: pom.xml
##########
@@ -281,12 +281,8 @@
                         <configuration>
                             <images>
                                 <image>
-                                    
<name>apache/sling-feature-launcher:${project.version}</name>
+                                    <name>sling/feature-launcher</name>
                                     <build>
-                                        <tags>

Review comment:
       Shouldn't we keep this for simpler local builds?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to