Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task runner or pipeline-style configuration of the development entrypoint #6

Open
nickwesselman opened this issue Jan 26, 2021 · 0 comments

Comments

@nickwesselman
Copy link
Contributor

As a developer, I'd like to configure and customize startup activities in my development container, so that I can affect container content and behavior without impacting the delivered images.

Currently the development entrypoint includes the watch script, and soon development patch application. Rather than continue to build out this script monolithically, it would be good to have a central configuration file for the entrypoint, that allows specifying and configuring tasks.

Proposal from @pbering:

{
    "tasks": [
        { "powershell": {  "path": "C:\\tools\\transform.ps1", "args": "-Source 'C:\\sitecore-dev-patches\\Web.config.CustomErrorsOff.xdt' -Target 'C:\\inetpub\\wwwroot\\Web.config' " } },
        { "powershell": {  "path": "C:\\tools\\transform.ps1", "args": "-Source 'C:\\sitecore-dev-patches\\Web.config.InitMessagesOff.xdt' -Target 'C:\\inetpub\\wwwroot\\Web.config' " } },
        { "powershell": {  "path": "C:\\tools\\transform.ps1", "args": "-Source 'C:\\sitecore-dev-patches\\Web.config.OptimizeCompilationsOn.xdt' -Target 'C:\\inetpub\\wwwroot\\Web.config'" } },
        { "powershell": {  "path": "C:\\tools\\transform.ps1", "args": "-Source 'C:\\inetpub\\wwwroot\\Web.config.MyCustomDevStuff.xdt' -Target 'C:\\inetpub\\wwwroot\\Web.config'" } },
        { "powershell": {  "path": "C:\\tools\\sync.ps1", "args": "-Source 'C:\\src' -Target 'C:\\inetpub\\wwwroot' -Sleep '200'", "runAsJob": true  } },
        { "powershell": {  "path": "C:\\tools\\streamlogs.ps1", "args": "-IncludeIISLogs -IncludeSitecoreLogs -IncludeHttpSysLogs" } }
    ]
}

Or we could do something less verbose and more PowerShell-specific, similar to SIF:

{
    "tasks": [
        {
            "script": "Watch-Directory",
            "args": {

            }
        },
        {
            "script": "Development-Patches",
            "args": {
                "Include": [
                    "CustomErrorsOff",
                    "DebugOn",
                    "InitMessagesOff",
                    "DiagnosticsOff",
                    "RobotDetectionOff",
                    "OptimizeCompilationsOn",
                    "XdbOff"
                ]
            }
        }
    ]
}

Would it even be worth extracting the task runner pieces of SIF to do this? Or is there an existing PowerShell task runner we could use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant