Search code examples
dockerjenkinssap-commerce-cloud

support of Dockerization in new version of SAP Hybris


I'm trying to build a job in Jenkins which will responsible for launching SAP Hybris in docker environment,

for the 1808.5 version, I can find a recipe for docker as b2c_acc_dockerized where i can generate dockerfiles to build images of SAP Hybris, but for new version like 1905 and new version there is no recipe for docker,

did they not support docker recipe anymore ? Please help

what do you propose for me to do the job


Solution

  • Docker is still supported after 1811. It's all described on the SAP Help

    You can either create your own recipe. Or make use of the ant command createPlatformImageStructure

    Recipe

    apply plugin: 'installer-platform-plugin'
    apply plugin: 'installer-platform-containerization-plugin'
     
    def pl = platform {
        extensions {
            extensionNames 'backoffice'
        }
         
        localProperties {
            property 'persistence.legacy.mode', 'false'
        }
    }
     
    def dpl = deployment('mySampleDeployment') {
        hsqlImage 'myHsql'
     
        solrImage 'mySolr'
         
        platformImage('myPlatform') {
            basedOn pl
             
            aspect('onlyBackoffice') {
                enabledWebApps 'backoffice'
            }
             
            aspect('onlyHac') {
                enabledWebApps 'hac'
                 
                localProperties {
                    property 'persistence.legacy.mode', 'true'
                }
            }
             
            aspect('allWebApps') {
                enableAllWebApps()
            }
             
            aspect('noneWebApps')
        }
    }   
             
    task createImagesStructure {
        doLast {
            dpl.createImagesStructure()
        }
    }  
    

    Ant command

    Alternativly, you can look into the ant command createPlatformImageStructure

    Before you run this command, you need to run

    ant clean all
    

    and

    ant production -Dproduction.include.tomcat=false -Dproduction.legacy.mode=false -Dtomcat.legacy.deployment=false -Dproduction.create.zip=false
    

    Finally you can run

    ant createPlatformImageStructure
    

    Resources

    For more detailed info, you can have a look in the SAP Help