{"id":21493373,"url":"https://github.com/microdevops-com/gitlab-server-job","last_synced_at":"2026-05-20T09:11:38.082Z","repository":{"id":107364947,"uuid":"207002349","full_name":"microdevops-com/gitlab-server-job","owner":"microdevops-com","description":"Run commands on servers via Salt or Salt-SSH inside GitLab pipelines","archived":false,"fork":false,"pushed_at":"2023-08-06T13:19:38.000Z","size":55,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T11:50:43.811Z","etag":null,"topics":["gitlab-ci","saltstack"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microdevops-com.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-07T17:26:44.000Z","updated_at":"2024-09-13T17:58:16.000Z","dependencies_parsed_at":"2023-08-31T07:36:01.130Z","dependency_job_id":null,"html_url":"https://github.com/microdevops-com/gitlab-server-job","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/microdevops-com/gitlab-server-job","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microdevops-com%2Fgitlab-server-job","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microdevops-com%2Fgitlab-server-job/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microdevops-com%2Fgitlab-server-job/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microdevops-com%2Fgitlab-server-job/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microdevops-com","download_url":"https://codeload.github.com/microdevops-com/gitlab-server-job/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microdevops-com%2Fgitlab-server-job/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33253230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T04:48:54.280Z","status":"ssl_error","status_checked_at":"2026-05-20T04:48:10.851Z","response_time":356,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gitlab-ci","saltstack"],"created_at":"2024-11-23T15:42:16.632Z","updated_at":"2026-05-20T09:11:38.077Z","avatar_url":"https://github.com/microdevops-com.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitlab-server-job\nRun salt states or commands on servers via Salt or SSH inside GitLab pipeline jobs, multiple Salt Masters with failover supported.\n\n# Usage\n\n## Inside Pipelines\nShould be added as git submodule for Salt Master repo with .gitlab-ci.yml pipeline e.g. https://github.com/sysadmws/salt-project-template .\n```\ngit submodule add --name .gitlab-server-job -b master -- https://github.com/sysadmws/gitlab-server-job .gitlab-server-job\n```\nSalt Masters should be gitlab-runners for Gitlab Project with Salt Master git repo.\n\n[ci_sudo scripts](https://github.com/sysadmws/sysadmws-formula/tree/master/scripts/ci_sudo) from sysadmws-formula needed.\n\n## Creating Pipelines\n```\npipeline_salt_cmd.sh wait/nowait SALT_PROJECT TIMEOUT TARGET CMD [SEVERITY_OVERRIDE=critical|...] [SALT_SSH_IN_SALT=true]\npipeline_rsnapshot_backup.sh wait/nowait SALT_PROJECT TIMEOUT TARGET SSH/SALT [SSH_HOST=...] [SSH_PORT=...] [SSH_JUMP=...] [SALT_SSH_IN_SALT=true]\n```\n\nTo run salt command `state.apply app.deploy` with salt timeout `300` for minion `srv1.xyz.tld` inside project `sysadmws/xyz-salt`:\n```\npipeline_salt_cmd.sh wait sysadmws/xyz-salt 300 srv1.xyz.tld \"state.apply app.deploy\"\n```\n\nRunning rsnapshot_backup examples (via salt, via ssh, via ssh with nonstd port):\n```\npipeline_rsnapshot_backup.sh wait sysadmws/xyz-salt 300 srv1.xyz.tld SALT\npipeline_rsnapshot_backup.sh wait sysadmws/xyz-salt 300 srv1.xyz.tld SSH\npipeline_rsnapshot_backup.sh wait sysadmws/xyz-salt 300 srv1.xyz.tld SSH SSH_HOST=1.2.3.4\npipeline_rsnapshot_backup.sh wait sysadmws/xyz-salt 300 srv1.xyz.tld SSH SSH_HOST=1.2.3.4 SSH_PORT=2222\n```\n\nEnv vars used:\n- GL_URL - e.g. https://gitlab.xyz.tld\n- GL_USER_PRIVATE_TOKEN - full access token of GitLab user with permissions to create git tags and pipelines\n\nCustom Git Tag created before runnning pipeline to customize pipeline info about what is runnning - so errors and emails will contain info which command on which minion failed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrodevops-com%2Fgitlab-server-job","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrodevops-com%2Fgitlab-server-job","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrodevops-com%2Fgitlab-server-job/lists"}