Skip to content

GitLabHelper

Description

PowerShell module for managing and automating tasks in GitLab CI/CD pipelines and related infrastructure.

GitLab Repository

Features

  • Automate deployment of PowerShell modules to NuGet repositories and servers.
  • Generate and publish project documentation using PlatyPS and MkDocs.
  • Manage scheduled tasks and code signing for GitLab projects.
  • Test PowerShell modules with Pester and PSScriptAnalyzer.
  • Send email notifications with GitLab pipeline details.

Functions

Deployment

  • Publish-GitLabModule: Publishes a PowerShell module to a NuGet repository.
  • Update-GitLabPSModuleAnsible: Deploys a PowerShell module to servers using Ansible.
  • Update-GitLabPSModuleVersion: Updates the version of a PowerShell module in GitLab and NuGet.

Documentation

  • Invoke-GitLabProjectDocumentation: Generates documentation for the GitLab project using PlatyPS.
  • Publish-GitLabProjectMkDocs: Publishes MkDocs-based documentation for the project.

Scheduled Tasks

  • Publish-GitlabScheduledTasks: Deploys scheduled tasks from a GitLab project to specified servers.

Testing

  • Test-GitLabModule: Tests a GitLab PowerShell module using Pester and PSScriptAnalyzer.

Code Signing

  • Invoke-GitLabProjectCodeSigning: Signs project files in a GitLab project using a code-signing certificate.

Notifications

  • Send-GitLabMailMessage: Sends an email message with GitLab pipeline details.

CI/CD Integration

This module integrates with GitLab CI/CD pipelines for automated testing, building, and deployment. The .gitlab-ci.yml file includes: - Pester and PSScriptAnalyzer tests. - Version updates and code signing. - Documentation generation and publishing.

Dependencies

  • PSScriptAnalyzer
  • Pester
  • PasswordStateHelper
  • Ansible Tower API
  • NuGet CLI