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

Add Invoke-CtxAutodeployJob function #16

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

tonysathre
Copy link
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