Skip to content

Add Invoke-CtxAutodeployJob function#16

Open
tonysathre wants to merge 1 commit intov2from
v2-invoke-ctxautodeployjob
Open

Add Invoke-CtxAutodeployJob function#16
tonysathre wants to merge 1 commit intov2from
v2-invoke-ctxautodeployjob

Conversation

@tonysathre
Copy link
Copy Markdown
Owner

@tonysathre tonysathre commented Nov 7, 2024

Add Invoke-CtxAutodeployJob function and update citrix_autodeploy.ps1 to use it.

  • Add Invoke-CtxAutodeployJob function in module/CitrixAutodeploy/functions/public/Invoke-CtxAutodeployJob.ps1

    • Define parameters for FilePath, LogLevel, LogFile, MaxRecordCount, DryRun, and LogOutputTemplate
    • Move main job logic from citrix_autodeploy.ps1 to this function
    • Include environment initialization, configuration reading, and processing of each AutodeployMonitor
    • Add logging and error handling
  • Update citrix_autodeploy.ps1

    • Remove main job logic
    • Replace with a call to Invoke-CtxAutodeployJob function
    • Pass script parameters to the Invoke-CtxAutodeployJob function
  • Add Pester tests for Invoke-CtxAutodeployJob in tests/Invoke-CtxAutodeployJob.Tests.ps1

    • Test environment initialization, configuration reading, and processing of each AutodeployMonitor
    • Test logging and error handling

For more details, open the Copilot Workspace session.

Add `Invoke-CtxAutodeployJob` function and update `citrix_autodeploy.ps1` to use it.

* Add `Invoke-CtxAutodeployJob` function in `module/CitrixAutodeploy/functions/public/Invoke-CtxAutodeployJob.ps1`
  - Define parameters for `FilePath`, `LogLevel`, `LogFile`, `MaxRecordCount`, `DryRun`, and `LogOutputTemplate`
  - Move main job logic from `citrix_autodeploy.ps1` to this function
  - Include environment initialization, configuration reading, and processing of each `AutodeployMonitor`
  - Add logging and error handling

* Update `citrix_autodeploy.ps1`
  - Remove main job logic
  - Replace with a call to `Invoke-CtxAutodeployJob` function
  - Pass script parameters to the `Invoke-CtxAutodeployJob` function

* Add Pester tests for `Invoke-CtxAutodeployJob` in `tests/Invoke-CtxAutodeployJob.Tests.ps1`
  - Test environment initialization, configuration reading, and processing of each `AutodeployMonitor`
  - Test logging and error handling

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/tonysathre/CitrixAutodeploy?shareId=XXXX-XXXX-XXXX-XXXX).
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

Successfully merging this pull request may close these issues.

1 participant