Skip to main content

clingwrap: wrap up CI artefacts and post them to Google Storage

Project description

Clingwrap

Clingwrap is a simple debugging tool which collects information about the state of a system and stores that information in a zip file for later analysis. It was originally implemented for the Shaken Fist (https://shakenfist.com) project, but is more generally useful than that.

Clingwrap takes a configuration file (see examples/shakenfist-ci-failure.cwd for an example), and processes the list of commands in that file to produce the zip file of debugging output. The commands are specified in a simple YAML format, where a configuration file looks like this:

--
commands:
  - name: Kernel version and architecture
    destination: _commands/uname
    shell: uname -a

  - name: Installed system OS packages and versions
    destination: _commands/dpkg
    shell: dpkg -l

Possible commands are:

file commands: which record the contents of a file. For example:

  - name: syslog
    destination: var/log/syslog
    file: /var/log/syslog

directory commands: which record all files in a given directory hierarchy, with a possible simple exclusion regexp. For example:

  - name: Shaken Fist instances
    destination: /srv/shakenfist/instances
    directory: /srv/shakenfist/instances
    exclude: "hd[ac-z]"

shell commands: which take a command line or script and execute them in a shell. A valid configuration is:

  - name: Kernel version and architecture
    destination: _commands/uname
    shell: uname -a

shell_emitter commands: which run a shell script which emits further commands to execute. This is useful for finding objects and then storing information about them. A valid example is:

  - name: Network namespaces
    shell_emitter: |
      for item in `find /var/run/netns -type f | sed 's/.*\///'`
      do
        echo "commands:
      - name: Network interfaces (namespace $item)
        destination: _commands/netns-$item/ip-link
        shell: ip netns exec $item ip link

      - name: Network addresses (namespace $item)
        destination: _commands/netns-$item/ip-link
        shell: ip netns exec $item ip addr

      - name: Network routes (namespace $item)
        destination: _commands/netns-$item/ip-link
        shell: ip netns exec $item ip route
      "
      done

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clingwrap-0.2.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clingwrap-0.2.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file clingwrap-0.2.0.tar.gz.

File metadata

  • Download URL: clingwrap-0.2.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/18.0.1 rfc3986/1.5.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for clingwrap-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f9ba346ef78dc897679d47476200112ee3c775481dcf24967e22c321a9918a10
MD5 0903e92847c9481e833f5178e931838b
BLAKE2b-256 8d3213988ab310d87f313c7373433017bd8e13737a2919ded51eab510e6c8d62

See more details on using hashes here.

File details

Details for the file clingwrap-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: clingwrap-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/18.0.1 rfc3986/1.5.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for clingwrap-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7a218fc00d08cfc9d5f86b67473f544881af65a5966d1b6a1450de62af8fb4b
MD5 ee43ad90038909a5d50a149a3c841029
BLAKE2b-256 37c1077ac08080cf92992388df5fa6849cb4635c38b7ac0f9a4ac2baa2ec4d56

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page