Uploaded image for project: 'Cloud Enablement'
  1. Cloud Enablement
  2. CLOUD-3847

Galleon prosvisioning should ignore MAVEN_ARGS_APPEND meant for S2I app build

    XMLWordPrintable

Details

    • False
    • False
    • Undefined
    • Workaround Exists
    • Hide

      Use context dir where possible

      # Use eap-s2i-build template to create an application image stream
      oc new-app eap-s2i-build \
      -p APPLICATION_IMAGE=helloworld \
      -p EAP_IMAGE=jboss-eap73-openshift:latest \
      -p EAP_RUNTIME_IMAGE=jboss-eap73-runtime-openshift:latest \
      -p EAP_IMAGESTREAM_NAMESPACE=`oc project -q` \
      -p SOURCE_REPOSITORY_URL=https://github.com/jboss-developer/jboss-eap-quickstarts.git \
      -p SOURCE_REPOSITORY_REF=7.3.x-openshift \
      -p CONTEXT_DIR=helloworld
      

      Use MAVEN_ARGS build env

      # Use eap-s2i-build template to create an application image stream
      oc new-app eap-s2i-build \
      -p APPLICATION_IMAGE=helloworld \
      -p EAP_IMAGE=jboss-eap73-openshift:latest \
      -p EAP_RUNTIME_IMAGE=jboss-eap73-runtime-openshift:latest \
      -p EAP_IMAGESTREAM_NAMESPACE=`oc project -q` \
      -p SOURCE_REPOSITORY_URL=https://github.com/jboss-developer/jboss-eap-quickstarts.git \
      -p SOURCE_REPOSITORY_REF=7.3.x-openshift \
      -p ARTIFACT_DIR='helloworld/target' \
      --build-env MAVEN_ARGS='-f helloworld'
      
      Show
      Use context dir where possible # Use eap-s2i-build template to create an application image stream oc new -app eap-s2i-build \ -p APPLICATION_IMAGE=helloworld \ -p EAP_IMAGE=jboss-eap73-openshift:latest \ -p EAP_RUNTIME_IMAGE=jboss-eap73-runtime-openshift:latest \ -p EAP_IMAGESTREAM_NAMESPACE=`oc project -q` \ -p SOURCE_REPOSITORY_URL=https: //github.com/jboss-developer/jboss-eap-quickstarts.git \ -p SOURCE_REPOSITORY_REF=7.3.x-openshift \ -p CONTEXT_DIR=helloworld Use MAVEN_ARGS build env # Use eap-s2i-build template to create an application image stream oc new -app eap-s2i-build \ -p APPLICATION_IMAGE=helloworld \ -p EAP_IMAGE=jboss-eap73-openshift:latest \ -p EAP_RUNTIME_IMAGE=jboss-eap73-runtime-openshift:latest \ -p EAP_IMAGESTREAM_NAMESPACE=`oc project -q` \ -p SOURCE_REPOSITORY_URL=https: //github.com/jboss-developer/jboss-eap-quickstarts.git \ -p SOURCE_REPOSITORY_REF=7.3.x-openshift \ -p ARTIFACT_DIR= 'helloworld/target' \ --build-env MAVEN_ARGS= '-f helloworld'

    Description

      Using the MAVEN_ARGS_APPEND can cause Provisioning WildFly server step to fail.

      - name: MAVEN_ARGS_APPEND
        displayName: Maven Additional Arguments
        description: Maven additional arguments to use for S2I builds
      

      The same problem existed for MAVEN_ARGS, see:

      Reproduce

      # Import EAP image streams
      oc replace --force -f https://raw.githubusercontent.com/jboss-container-images/jboss-eap-7-openshift-image/7.3.x/templates/eap73-image-stream.json
      # Import eap-s2i-build template
      oc replace --force -f https://raw.githubusercontent.com/jboss-container-images/jboss-eap-openshift-templates/master/eap-s2i-build.yaml
      
      # Use eap-s2i-build template to create an application image stream
      oc new-app eap-s2i-build \
      -p APPLICATION_IMAGE=helloworld \
      -p EAP_IMAGE=jboss-eap73-openshift:latest \
      -p EAP_RUNTIME_IMAGE=jboss-eap73-runtime-openshift:latest \
      -p EAP_IMAGESTREAM_NAMESPACE=`oc project -q` \
      -p SOURCE_REPOSITORY_URL=https://github.com/jboss-developer/jboss-eap-quickstarts.git \
      -p SOURCE_REPOSITORY_REF=7.3.x-openshift \
      -p MAVEN_ARGS_APPEND='-f helloworld' \
      -p ARTIFACT_DIR='helloworld/target' 
      

      This one fails in STEP 8: RUN /usr/local/s2i/assemble Provisioning WildFly server...,  because MAVEN_ARGS_APPEND is appended to a maven command which is used to run "[INFO] Building Provision a provisioning.xml file 1.0.0.Final" project - "java.io.FileNotFoundException: /opt/jboss/container/wildfly/s2i/galleon/provisioning/generic_provisioning/helloworld (No such file or directory)" appears (application sources are cloned to /tmp).

      Attachments

        Issue Links

          Activity

            People

              jdenise@redhat.com Jean Francois Denise
              jdenise@redhat.com Jean Francois Denise
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: