wttech / gradle-aem-plugin

Swiss army knife for Adobe Experience Manager related automation. Environment setup & incremental AEM application build which takes seconds, not minutes.
https://tech.cognifide.com/tag/gradle-aem-plugin
Apache License 2.0
158 stars 32 forks source link

Introduce DSL for controlling custom Docker containers #448

Closed pun-ky closed 4 years ago

pun-ky commented 5 years ago

right now, GAP is controlling HTTP container during environmentUp command, but the approach could be more generic. Let buildscript users to allow control other services during making environment up and restarting during environmentClean

pun-ky commented 5 years ago

e.g Knot.x (custom container) may be controlled using this DSL / if required https://github.com/Cognifide/gradle-aem-multi/pull/65

pun-ky commented 5 years ago

DSL proposal

aem {
    environment {
        containers {
            httpd { // or 'override("httpd")'
                up {
                    // override default behavior
                }
                clean {
                    // override default behavior
                }
            }
            "knotx" { // or 'define("knotx")'
                up {
                    // exec any init commands needed
                }
                clean {
                    exec("sudo service knotx restart") // sth like that
                }
            }
        }
    }
}

up callbacks will be called during environmentUp task and clean callbacks accordingly when environmentClesn task is running

pun-ky commented 4 years ago

final dsl image