Forge Home

gitea

A module to manage Gitea, a painless self-hosted Git service

1,891 downloads

23 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

  • 3.3.0 (latest)
  • 3.2.0
  • 3.1.3
  • 3.1.2
  • 3.1.1
  • 3.1.0
  • 3.0.0
  • 2.0.0
  • 1.3.0
  • 1.2.0
  • 1.1.0
  • 1.0.0
released Nov 29th 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'h0tw1r3-gitea', '3.3.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add h0tw1r3-gitea
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install h0tw1r3-gitea --version 3.3.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

h0tw1r3/gitea — version 3.3.0 Nov 29th 2024

puppet-gitea

Build Status Puppet Forge Puppet Forge - downloads Puppet Forge - scores License

Setup

This module downloads a pre-built binary from the Gitea project releases page. No external package repositories are required. You can choose to install Gitea with default settings, or customize them using the custom_configuration class parameter.

Examples

The simplest use case is to rely on defaults, which will install the latest tested version in /opt/gitea.

include gitea

To install a version that has not been tested with this module, you must provide the release sha256 checksum:

class { 'gitea':
  version  => '1.17.0',
  checksum => 'bc4a8e1f5d5f64d4be2e50c387de08d07c062aecdba2f742c2f61c20accfcc46',
}

To customize the Gitea configuration, use the custom_configuration parameter (merged with defaults in common.yaml).

Refer to Gitea's Config Cheat Sheet for most settings and defaults. Each section in the cheat sheet is labeled by a human name and the config section in parentheses. The config section is a top level key of the custom_configuration hash, except DEFAULT which is an empty string.

class { 'gitea':
  custom_configuration => {
    ''        => {
      'APP_NAME' => 'Internal Code Projects',
    },
    'server'  => {
      'ROOT_URL' => 'https://example.com/git/',
    },
    'ui'      => {
      'SHOW_USER_EMAIL'       => 'false',
      'MAX_DISPLAY_FILE_SIZE' => '4194304',
    },
    'ui.meta' => {
      'DESCRIPTION' => 'My self-hosted code project service',
      'KEYWORDS'    => 'git,self-hosted',
    },
    'indexer' => {
      'REPO_INDEXER_ENABLED' => true,
    },
    'cache'   => {
      'ADAPTER' => 'redis',
      'HOST'    => 'network=tcp,addr=127.0.0.1:6379,db=0,pool_size=100,idle_timeout=180',
    },
    'session' => {
      'PROVIDER'        => 'redis',
      'PROVIDER_CONFIG' => 'network=tcp,addr=127.0.0.1:6379,db=0,pool_size=100,idle_timeout=180',
    },
  }
}

Custom files allow you to add themes, override built-in templates, or serve additional files.

Use the gitea::custom::file resource to manage files in Gitea's custom directory. Subdirectories are automatically created for you.

gitea::custom::file { 'public/assets/css/custom.css':
  content => file('profile/gitea/custom.css'),
}
gitea::custom::file { 'public/assets/img/logo.svg':
  source => 'puppet:///modules/profile/gitea/logo.svg',
}

Tests

When submitting pull requests, please make sure that the module documentation, test cases, and syntax checks pass.

Use the PDK to validate and execute unit tests:

pdk validate
pdk test unit

Use the PDK to execute acceptance tests (requires docker):

pdk bundle exec rake acceptance

Use the PDK to update the reference documentation.

pdk bundle exec rake strings:generate:reference

Acknowledgements

This module was forked from kogitoapp/gitea and is NOT compatible.