https://github.com/lifailon/pipeline-service-manager
Jenkins pipeline for service manage
https://github.com/lifailon/pipeline-service-manager
ansible-playbook devops groovy jenkins-pipeline job pipeline powershell service service-manager systemctl windows windows-service
Last synced: 2 months ago
JSON representation
Jenkins pipeline for service manage
- Host: GitHub
- URL: https://github.com/lifailon/pipeline-service-manager
- Owner: Lifailon
- Created: 2023-07-18T06:36:43.000Z (almost 2 years ago)
- Default Branch: rsa
- Last Pushed: 2023-08-02T20:56:24.000Z (almost 2 years ago)
- Last Synced: 2025-03-09T21:02:33.267Z (2 months ago)
- Topics: ansible-playbook, devops, groovy, jenkins-pipeline, job, pipeline, powershell, service, service-manager, systemctl, windows, windows-service
- Language: Groovy
- Homepage:
- Size: 4.62 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Pipeline Service Manager
Jenkins pipeline for service management to Windows and Linux system.
**Stack:**
- **Jenkins** (tested v2.416).
- Service Control Manager (use **GitHub**).
- **Ansible** (tested v2.10.8). Use module win_shell (from the collection ansible.windows) and shell.
- Executable code: **PowerShell/systemctl**.## Scheme of work
```mermaid
flowchart TD
classDef class_color fill:#68F1F7, stroke:#000, stroke-width:1px
1[Jenkins Pipeline]:::class_color
2[SCM: GitHub]:::class_color
3[Jenkinsfile.Groovy passes parameters]:::class_color
4[Playbook takes variables]:::class_color
5[PowerShell/systemctl]:::class_color
1--Connect-->2--Read-->3--Run Ansible-->4--Use module win_shell/shell-->5
5--Output to Job-->1
```## Job stages

## Parameters
- **ServiceName**. For Windows systems the default is Fildcard format. For Linux use formate *name* (not supported for StartType mode).
- **System**: Windows/Linux.
- **State**: Start/Stop/Restart.
- **StartType**: Enabled mode - for system Linux. Automatic/Manual mode - for system Windows. Delayed Start mode - supported only to PowerShell 7.
## Output
### Settings Git
Use the current **public repository** for your pipeline. Hosts list and variables for playbook are used on the local Ansible server.
