Skip to content

A place to dump the various (and often rough) utils that folks have come up with over time to assist with RELENG-related activities

License

Notifications You must be signed in to change notification settings

simp/releng-misc

Repository files navigation

releng-misc

Overview

This project collects the various tools (script, config, notes, etc.) we've been using to assist with RELENG-related activities. The purpose is to establish awareness of these tools, and give everyone a change to inspect/improve/use them.

WARNING Things collected here may be broken, full of bugs, hard to use, and out of date. Don't assume that anything here is suitable to use in production without inspecting and testing it first.

Bolt Project

This repository includes the releng:: Bolt project, including plans to help us inspect and administer our GitHub organization and GitLab group.

Setup

What the releng:: project affects

For Github Organizations

  • Clone all repos into a single directory (github_inventory::clone_git_repos)
  • Report the highest SemVer tag in each repo (github_inventory::latest_semver_tags)
  • List and/or set which PR checks are required on each repo (github_inventory::required_checks)
  • Report repos with GitHub Actions workflows (github_inventory::workflows)

For GitLab Groups

  • Mirror all projects from their corresponding GitHub repo, using a dedicated API token/account. (releng::gitlab_project_repo_mirror)
  • Identify/erase all Gitlab CI job logs between two dates (releng::gitlab_project_ci_logs)

Setup Requirements

  • Puppet Bolt 3.0+, installed from an OS package (don't run from a RubyGem or use rvm)
  • GitHub + GitLab API auth tokens with sufficient scope
  • Environment variables:
    • GITHUB_API_TOKEN
    • GITLAB_API_PRIVATE_TOKEN - usually needs api read+write scope for updating mirrors
  • The octokit & gitlab RubyGems

Beginning with the releng:: Bolt project

  1. If you are using rvm, you must disable it before running bolt (We need to use the puppet-bolt package's ruby interpreter):

    rvm use system
  2. Install the RubyGem dependencies using Bolt's gem command:

    On most platforms:

    /opt/puppetlabs/bolt/bin/gem install --user-install -g gem.deps.rb

    On Windows:

    "C:/Program Files/Puppet Labs/Bolt/bin/gem.bat" install --user-install -g gem.deps.rb
  3. Install the Puppet modules:

    bolt module install
  4. Set the environment variables GITHUB_API_TOKEN and GITLAB_API_PRIVATE_TOKEN, as required.

  5. Verify that you can see the project's Bolt plans:

    bolt plan show

Usage

This repo contains RELENG-related Puppet Bolt orchestration (in the Boltdir/ directory). For information on the available tasks and plans, run:

bolt plan show [plan_name]

bolt task show [task_name]

Contributing

  • If you'd like to contribute something that you've been using, drop it in a new folder (preferably with a small README.md to let others know what it is). Don't let polishing things hold you up from contributing!

About

A place to dump the various (and often rough) utils that folks have come up with over time to assist with RELENG-related activities

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published