Uploaded image for project: 'WildFly WIP'
  1. WildFly WIP
  2. WFWIP-499

Difference between S2Iv2 legacy and plugin mode in handling deployments in ARTIFACT_DIR

    XMLWordPrintable

Details

    Description

      During my attemps to workaround WFWIP-494 I noticed different behavior when trying to use ARTIFACT_DIR env var (or MAVEN_S2I_ARTIFACT_DIRS which is the new alias, IIUC).

      Given the same app (parent-module, child-module a producing a.war, child-module b producing b.war) I executed it in two ways:

      1) the legacy S2I mode
      MAVEN_S2I_ARTIFACT_DIRS=deployments
      GALLEON_PROVISION_* vars set

      INFO Copying deployments from deployments to /deployments...
      '/tmp/src/deployments/a.war' -> '/deployments/a.war'
      '/tmp/src/deployments/b.war' -> '/deployments/b.war'
      INFO Copying deployments from deployments to /deployments...
      '/tmp/src/deployments/a.war' -> '/deployments/a.war'
      '/tmp/src/deployments/b.war' -> '/deployments/b.war'
      INFO Cleaning up source directory (/tmp/src)
      INFO Copying /deployments to /opt/server/standalone/
      

      2) the new preferred way using plugin
      MAVEN_S2I_ARTIFACT_DIRS=deployments
      plugin configuration provisioningDir=${project.basedir}/deployments/server

      Installing server. S2I_SOURCE_DIR /tmp/src, ARTIFACT DIRS deployments
      /tmp/src content:
      a
      b
      deployments
      pom.xml
      /tmp/src/deployments content:
      total 8
      -rw-rw-r--. 1 jboss root 3715 Jul 15 23:19 a.war
      -rw-rw-r--. 1 jboss root 3792 Jul 15 23:19 b.war
      drwxrwxr-x. 8 jboss root  242 Jul 15 23:19 server
      INFO Copying server from /tmp/src/deployments/server to /opt/server...
      INFO Copying deployments from deployments to /deployments...
      '/tmp/src/deployments/a.war' -> '/deployments/a.war'
      '/tmp/src/deployments/b.war' -> '/deployments/b.war'
      INFO Cleaning up source directory (/tmp/src)
      

      As you can see the 'INFO Copying /deployments to /opt/server/standalone/' is missing in new way, yet it is the exact step that would make me deploy more deployments at the same time.

      Things get even more different, when the common dir isn't named 'deployments' (which is probably some magic value), then even 'INFO Copying deployments from shared-deployments to /deployments...' is not happening in new S2I approach.

      Could we unify the behavior?

      Attachments

        1. s2i-legacy.log
          89 kB
        2. s2i-legacy-shared-deployments.log
          89 kB
        3. s2i-new.log
          13 kB
        4. s2i-new-shared-deployments.log
          13 kB

        Issue Links

          Activity

            People

              jdenise@redhat.com Jean Francois Denise
              jbliznak@redhat.com Jan Blizňák
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: