diff --git a/java/fish-pepper.yml b/java/fish-pepper.yml index 905db76e..7d7c69cc 100644 --- a/java/fish-pepper.yml +++ b/java/fish-pepper.yml @@ -14,9 +14,9 @@ blocks: - type: "git" url: "https://github.com/fabric8io/run-java-sh.git" path: "fish-pepper" - # tag: "v1.0.0" + tag: "v1.0.3" # jolokia integration taken from agent-bond - type: "git" url: "https://github.com/fabric8io/agent-bond.git" path: "fish-pepper" - # tag: "v1.0.0" + tag: "v1.0.2" diff --git a/java/images.yml b/java/images.yml index a59c0617..7daa4f84 100644 --- a/java/images.yml +++ b/java/images.yml @@ -3,7 +3,7 @@ fish-pepper: params: - base name: "fabric8/s2i-java" - build: "2.0.0" + build: "2.0.2" # Used for escaping in 'agent-bond-opts' where the same delimiters are used abSepOpen: "{{" diff --git a/java/images/jboss/Dockerfile b/java/images/jboss/Dockerfile index fbfffdc9..9c018e70 100644 --- a/java/images/jboss/Dockerfile +++ b/java/images/jboss/Dockerfile @@ -45,6 +45,7 @@ RUN chmod 444 /opt/jolokia/jolokia.jar \ EXPOSE 8778 + # Install rsync RUN yum install -y rsync diff --git a/java/images/rhel/README.md b/java/images/rhel/README.md index 7745bddf..f8c4a93f 100644 --- a/java/images/rhel/README.md +++ b/java/images/rhel/README.md @@ -8,8 +8,8 @@ The following environment variables can be used to influence the behaviour of th ## Build Time -* **MAVEN_ARGS** Arguments to use when calling maven, replacing the default `package hawt-app:build -DskipTests -e`. Please be sure to run the `hawt-app:build` goal (when not already bound to the `package` execution phase), otherwise the startup scripts won't work. -* **MAVEN_ARGS_APPEND** Additional Maven arguments, useful for temporary adding arguments like `-X` or `-am -pl ..` +* **MAVEN_ARGS** Arguments to use when calling Maven, replacing the default `package hawt-app:build -DskipTests -e`. Please be sure to run the `hawt-app:build` goal (when not already bound to the `package` execution phase), otherwise the startup scripts won't work. +* **MAVEN_ARGS_APPEND** Additional Maven arguments, useful for temporary adding arguments like `-X` or `-am -pl ..` * **ARTIFACT_DIR** Path to `target/` where the jar files are created for multi module builds. These are added to `${MAVEN_ARGS}` * **ARTIFACT_COPY_ARGS** Arguments to use when copying artifacts from the output dir to the application dir. Useful to specify which artifacts will be part of the image. It defaults to `-r hawt-app/*` when a `hawt-app` dir is found on the build directory, otherwise jar files only will be included (`*.jar`). * **MAVEN_CLEAR_REPO** If set then the Maven repository is removed after the artifact is built. This is useful for keeping diff --git a/java/templates/Dockerfile b/java/templates/Dockerfile index e59febdf..b78d2861 100644 --- a/java/templates/Dockerfile +++ b/java/templates/Dockerfile @@ -49,12 +49,10 @@ RUN curl https://archive.apache.org/dist/maven/maven-3/{{= mavenVersion }}/binar mavenRepo: mavenRepo, userGroupMode: "root", version: fp.config.base.lib.version.jolokia }) }} - -# Install rsync {{? fp.param.base != "rhel"}} +# Install rsync RUN yum install -y rsync {{?}} - # S2I scripts + README COPY s2i /usr/local/s2i RUN chmod 755 /usr/local/s2i/* diff --git a/java/templates/README.md b/java/templates/README.md index ee88d7a6..81617296 100644 --- a/java/templates/README.md +++ b/java/templates/README.md @@ -9,7 +9,7 @@ The following environment variables can be used to influence the behaviour of th ## Build Time * **MAVEN_ARGS** Arguments to use when calling Maven, replacing the default `package hawt-app:build -DskipTests -e`. Please be sure to run the `hawt-app:build` goal (when not already bound to the `package` execution phase), otherwise the startup scripts won't work. -* **MAVEN_ARGS_APPEND** Additional Maven arguments, useful for temporary adding arguments like `-X` or `-am -pl ..` +* **MAVEN_ARGS_APPEND** Additional Maven arguments, useful for temporary adding arguments like `-X` or `-am -pl ..` * **ARTIFACT_DIR** Path to `target/` where the jar files are created for multi module builds. These are added to `${MAVEN_ARGS}` * **ARTIFACT_COPY_ARGS** Arguments to use when copying artifacts from the output dir to the application dir. Useful to specify which artifacts will be part of the image. It defaults to `-r hawt-app/*` when a `hawt-app` dir is found on the build directory, otherwise jar files only will be included (`*.jar`). * **MAVEN_CLEAR_REPO** If set then the Maven repository is removed after the artifact is built. This is useful for keeping @@ -59,4 +59,5 @@ To enable automatic restarts, three things are required: 3. Set environment variables `JAVA_DEBUG=true` or `DEBUG=true` and optionally `JAVA_DEBUG_PORT=` or `DEBUG_PORT=`, which defaults to 5005. Since the `DEBUG` variable clashes with Spring Boot's recognition of the same variable to enable Spring Boot debug logging, use `SPRINGBOOT_DEBUG` instead. -WARNING: Do not use devtools in production!!! This can be accomplished in Maven using a custom profile. \ No newline at end of file +WARNING: Do not use devtools in production!!! This can be accomplished in Maven using a custom profile. + diff --git a/karaf/fish-pepper.yml b/karaf/fish-pepper.yml index 820417a3..fd01a923 100644 --- a/karaf/fish-pepper.yml +++ b/karaf/fish-pepper.yml @@ -1,7 +1,7 @@ --- # Who to blame -maintainer: "rhuss@redhat.com" +maintainer: "dbokde@redhat.com" # Meta info influencing the build fish-pepper: @@ -14,9 +14,9 @@ blocks: - type: "git" url: "https://github.com/fabric8io/run-java-sh.git" path: "fish-pepper" - tag: "v1.0.0" + tag: "v1.0.2" # jolokia integration taken from agent-bond - type: "git" url: "https://github.com/fabric8io/agent-bond.git" path: "fish-pepper" - tag: "v1.0.0" + tag: "v1.0.2" diff --git a/karaf/images.yml b/karaf/images.yml index a6e321ef..64ec646b 100644 --- a/karaf/images.yml +++ b/karaf/images.yml @@ -3,7 +3,7 @@ fish-pepper: params: - base name: "fabric8/s2i-karaf" - build: "2.0.0" + build: "2.0.2" # Used for escaping in 'agent-bond-opts' where the same delimiters are used abSepOpen: "{{" diff --git a/karaf/images/jboss/Dockerfile b/karaf/images/jboss/Dockerfile index 330be210..01da3a93 100644 --- a/karaf/images/jboss/Dockerfile +++ b/karaf/images/jboss/Dockerfile @@ -17,7 +17,7 @@ LABEL io.fabric8.s2i.version.maven="3.3.3" \ io.openshift.s2i.scripts-url="image:///usr/local/s2i" \ io.openshift.s2i.destination="/tmp" \ io.openshift.tags="builder,karaf" \ - org.jboss.deployments-dir="/deployments" + org.jboss.deployments-dir="/deployments/karaf" # Temporary switch to root USER root diff --git a/karaf/images/jboss/README.md b/karaf/images/jboss/README.md index fb5a672a..58187cad 100644 --- a/karaf/images/jboss/README.md +++ b/karaf/images/jboss/README.md @@ -25,7 +25,7 @@ The location of the Karaf4 or hawt-app assembly built by the Maven project can b ## Customizing the build -It may be possible that the Maven build needs to be customized. For example: +It may be possible that the maven build needs to be customized. For example: - To invoke custom goals. - To skip tests. diff --git a/karaf/images/jboss/s2i/run b/karaf/images/jboss/s2i/run index da41850c..a6a9f718 100644 --- a/karaf/images/jboss/s2i/run +++ b/karaf/images/jboss/s2i/run @@ -13,6 +13,12 @@ if [ -f "${DEPLOYMENTS_DIR}/java-default-options" ]; then source "${DEPLOYMENTS_DIR}/java-default-options" fi +# support JBoss Tools OpenShift debug environment variables +export JAVA_DEBUG="${JAVA_DEBUG:-${DEBUG}}" +if [ "x${JAVA_DEBUG}" != x ]; then + export JAVA_DEBUG_PORT="${JAVA_DEBUG_PORT:-${DEBUG_PORT}}" +fi + # set debug option if [ -f "${DEPLOYMENTS_DIR}/debug-options" ]; then debug_opts=$($DEPLOYMENTS_DIR/debug-options) diff --git a/karaf/images/rhel/Dockerfile b/karaf/images/rhel/Dockerfile index 8f579296..1e4b2d98 100644 --- a/karaf/images/rhel/Dockerfile +++ b/karaf/images/rhel/Dockerfile @@ -17,7 +17,7 @@ LABEL io.fabric8.s2i.version.maven="3.3.3-1.el7" \ io.openshift.s2i.scripts-url="image:///usr/local/s2i" \ io.openshift.s2i.destination="/tmp" \ io.openshift.tags="builder,karaf" \ - org.jboss.deployments-dir="/deployments" + org.jboss.deployments-dir="/deployments/karaf" # Temporary switch to root USER root diff --git a/karaf/images/rhel/s2i/run b/karaf/images/rhel/s2i/run index da41850c..a6a9f718 100644 --- a/karaf/images/rhel/s2i/run +++ b/karaf/images/rhel/s2i/run @@ -13,6 +13,12 @@ if [ -f "${DEPLOYMENTS_DIR}/java-default-options" ]; then source "${DEPLOYMENTS_DIR}/java-default-options" fi +# support JBoss Tools OpenShift debug environment variables +export JAVA_DEBUG="${JAVA_DEBUG:-${DEBUG}}" +if [ "x${JAVA_DEBUG}" != x ]; then + export JAVA_DEBUG_PORT="${JAVA_DEBUG_PORT:-${DEBUG_PORT}}" +fi + # set debug option if [ -f "${DEPLOYMENTS_DIR}/debug-options" ]; then debug_opts=$($DEPLOYMENTS_DIR/debug-options)