{"id":20865441,"url":"https://github.com/clayoster/salt-cicd","last_synced_at":"2026-04-20T23:31:46.684Z","repository":{"id":262733391,"uuid":"884585860","full_name":"clayoster/salt-cicd","owner":"clayoster","description":"Container Image for Linting and Deploying Salt States/Pillar Files in CI/CD Workflows","archived":false,"fork":false,"pushed_at":"2026-04-14T03:21:23.000Z","size":72,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-14T04:23:29.648Z","etag":null,"topics":["cicd","cicd-tools","container-image","salt","salt-pillars","salt-states","saltproject","saltstack"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clayoster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-07T02:42:59.000Z","updated_at":"2026-04-14T03:21:30.000Z","dependencies_parsed_at":"2024-11-14T01:27:54.682Z","dependency_job_id":"f093a9e2-3c51-4ba4-a725-17a6138cb716","html_url":"https://github.com/clayoster/salt-cicd","commit_stats":null,"previous_names":["clayoster/salt-cicd"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/clayoster/salt-cicd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayoster%2Fsalt-cicd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayoster%2Fsalt-cicd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayoster%2Fsalt-cicd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayoster%2Fsalt-cicd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clayoster","download_url":"https://codeload.github.com/clayoster/salt-cicd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayoster%2Fsalt-cicd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32070604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T21:26:33.338Z","status":"ssl_error","status_checked_at":"2026-04-20T21:26:22.081Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["cicd","cicd-tools","container-image","salt","salt-pillars","salt-states","saltproject","saltstack"],"created_at":"2024-11-18T05:49:08.549Z","updated_at":"2026-04-20T23:31:46.673Z","avatar_url":"https://github.com/clayoster.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Salt CICD\n\n***(The true source for this repository is located [here](https://github.com/clayoster/salt-cicd))***\n\nThis is collection of tools for linting [Salt](https://github.com/saltstack/salt) states and pillar files and triggering GitFS updates via the Salt API. It is intended to be used as the container image in relevant CI/CD workflows.\n\nContainer images are based on Alpine Linux and include the following tools:\n\n- A deploy script for triggering fileserver updates via the Salt API\n- A linting script that leverages these projects to check for problems in sls files\n  - [j2lint](https://github.com/aristanetworks/j2lint)\n  - [yamllint](https://github.com/adrienverge/yamllint)\n  - [salt-lint](https://github.com/warpnet/salt-lint)\n\n## Example CI/CD Configurations\nExample configurations for Gitlab CI/CD, Github Actions and yamllint/salt-lint configs can be found in the `example-configs` directory.\n\nI have primarily used this project to only lint the files that are included in merge or pull requests. However, it can certainly be set up to evaluate all sls files in a repository upon any commit to the repository.\n\n## Disabling yamllint for individual files\nSome files will not play nice with yamllint due to how Jinja templating is used with them. To disable yammlint for the entire file, add this line as the first line of the file\n\n```yaml\n# yamllint disable\n```\n\nYou can also use the following configuration in the `.yamllint` configuration file to ignore files or folders\n\n```yaml\nignore: |\n  path/to/*/ignored/folder/\n  path/to/ignored-file.sls\n```\n\nMore Documentation on how to disable yammllint checks within files:\nhttps://yamllint.readthedocs.io/en/stable/disable_with_comments.html\n\n## CLI Examples\n\n### Linting Script\n\nScript Arguments:\n - `-f` takes a single argument of a path to a .sls file (only used with a linting scope of \"single\")\n - `-t` takes a single argument of \"jinja\", \"salt\", or \"yaml\"\n - `-s` takes a single argument of \"merge\", \"single\" or \"all\"\n   - `merge` will only test the .sls files modified in the merge/pull request\n   - `single` will test a single file (supplied by the -f option)\n   - `all` will test all .sls files within the repository\n\nExamples:\n```bash\n# Lint only the .sls files included in a merge request with salt-lint\nlinting -t salt -s merge\n\n# Lint all .sls files in the repository with yamllint\nlinting -t yaml -s all\n```\nConsiderations:\n- It is suggested to run each linting type in a separate CI/CD job for several reasons:\n  - This makes it easier to find what type of code fixes are needed\n  - It allows for parallel execution of linting jobs to speed up workflows\n  - YAML linting will introduce comment characters in front of jinja templating lines in the sls files being evaluated so it is best to keep it in a separate job. This is necessary as yamllint will throw errors about the templating lines. Comment characters are used instead of deleting the lines to preserve the line numbers of the code. \n\n### Deploy Script (Triggers gitfs updates via the Salt API)\nThe deploy script requires the setup of the Salt API (see example below) to allow access to the following runner modules\n  - fileserver.update\n  - git_pillar.update\n\nExamples:\n```bash\n# Update the Salt Fileserver (salt-run fileserver.update) via API\ndeploy -u \"$saltapi_user\" -p \"$saltapi_pass\" -e \"$saltapi_eauth\" -s \"$saltapi_server\" -t states\n\n# Update Salt Pillar (salt-run git_pillar.update) via API\ndeploy -u \"$saltapi_user\" -p \"$saltapi_pass\" -e \"$saltapi_eauth\" -s \"$saltapi_server\" -t pillar\n```\n\n## Example Salt API Configuration for the Deploy Script\n*Ensure the salt-api package is installed on the Salt Master*\n\nThis will configure the Salt API to receive connections on the Salt Master's IP on port 8443. It assumes that LDAP is already configured for the Master and the `saltapi_gitlab` user exists in the directory. The configuration only allows two Gitlab runner servers (10.0.0.80 and 10.0.0.81) to access the API.\n\n```yaml\n# /etc/salt/master.d/master.conf\n\n# External Authentication\nexternal_auth:\n  ldap:\n    'saltapi_gitlab':\n      - '@runner':\n        - 'fileserver.update'\n        - 'git_pillar.update'\n\n# Enable the netapi client interfaces\nnetapi_enable_clients:\n  - runner\n\n# Salt API Configuration\nrest_cherrypy:\n  host: 0.0.0.0\n  port: 8443\n  ssl_crt: /etc/ssl/certs/certificate.crt\n  ssl_key: /etc/ssl/private/certificate.key\n  api_acl:\n    users:\n      saltapi_gitlab:\n        - '10.0.0.80' # git-runner1.example.com\n        - '10.0.0.81' # git-runner2.example.com\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclayoster%2Fsalt-cicd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclayoster%2Fsalt-cicd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclayoster%2Fsalt-cicd/lists"}