Skip to content

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

@nickwesselman

Description

@nickwesselman

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions