Forge Home

githubreleases

Download release tarballs or artifacts from github releases

13,717 downloads

4,734 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 4.0.0 (latest)
  • 3.1.0
  • 3.0.1
  • 3.0.0
  • 2.0.1
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Jan 31st 2020
This version is compatible with:
  • Puppet Enterprise 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x
  • Puppet >= 5.0.0
  • , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'dodevops-githubreleases', '4.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add dodevops-githubreleases
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install dodevops-githubreleases --version 4.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

dodevops/githubreleases — version 4.0.0 Jan 31st 2020

dodevops/githubreleases

Build status

Table of Contents

  1. Description
  2. Usage - Configuration options and additional functionality
  3. Reference - An under-the-hood peek at what the module is doing and how
    1. Class githubreleases
    2. Type githubreleases::download

Description

This puppet module downloads tar-, zipballs or assets from Github releases.

Assets can be filtered by Content type and/or file name.

Usage

To download a release from Github, use the defined type githubreleases_download like this:

githubreleases_download {
  '/tmp/release.latest.head.tar.gz':
    author     => 'company',
    repository => 'example'
}

This will download the latest (HEAD) version of the project "company/example" as a tarball an place it in /tmp/release.latest.head.tar.gz.

If the repository uses the Github release feature, the tarball of the latest (non-pre-release) release will be downloaded.

If the repository uses assets to offer binary files with each release, these can also be downloaded:

githubreleases_download {
  '/tmp/release.0.0.2.asset.debian':
    author            => 'company',
    repository        => 'example',
    release           => '0.0.2',
    asset             => true,
    asset_contenttype => 'application\/x-deb'
}

This will download a debian package of release 0.0.2 of the repository.

File names can be filtered as well:

githubreleases_download {
  '/tmp/release.0.0.2.asset.exe':
    author            => 'company',
    repository        => 'example',
    release           => '0.0.2',
    asset             => true,
    asset_filepattern => 'example.*\.exe'
}

This will download the first file matching the given filepattern.

All patterns are Regular Expressions.

This module also supports hiera. Just include the githubreleases-class and use the type like this:

githubreleases_download:
  '/tmp/release.latest.head.fromhiera.tar.gz':
    author: 'company'
    repository: 'example'

Defaults for multiple resources can be set by configuring the githubreleases-class.

Using authentication

Github rate-limits access to its API. If you use this module in a test and massively download files using it, you better create a Github user and set the authentication parameters so that you will get a better rate.