Skip to content

Latest commit

 

History

History
83 lines (55 loc) · 2.73 KB

CONTRIBUTING.md

File metadata and controls

83 lines (55 loc) · 2.73 KB

Contributing Guidelines

Contributions are welcome via GitHub pull requests. This document outlines the process to help get your contribution accepted.

How to Contribute

  1. Fork this repository, develop, and test your changes
  2. Remember to sign off your commits as described above
  3. Submit a pull request

NOTE: In order to make testing and merging of PRs easier, please submit changes to multiple charts in separate PRs.

Local Development

Prerequisites

Setup

CHART=jenkins-jobs
cd charts

# Validate the chart with Helm
helm lint "$CHART"

# Execute unit tests from ./tests (default) if any
helm unittest --helm3 "$CHART"

Technical Requirements

Once changes have been merged, the release job will automatically run to package and release changed charts.

Unit Tests

It's encouraged to add unit tests. This project uses helm-unittest plugin. Tests can be executed like this:

# install the unittest plugin
$ helm plugin install https://github.com/quintush/helm-unittest

CHART=jenkins-jobs

# run the unittests
$ helm unittest --helm3 --strict -f 'tests/*.yaml' charts/"$CHART"

### Chart [ jenkins-jobs ] charts/jenkins-jobs

 PASS  default tests    charts/jenkins-jobs/tests/credentials_test.yaml
 PASS  default tests    charts/jenkins-jobs/tests/defaults_test.yaml
 PASS  default tests    charts/jenkins-jobs/tests/folders_test.yaml
 PASS  default tests    charts/jenkins-jobs/tests/multibranch_job_test.yaml

Charts:      1 passed, 1 total
Test Suites: 4 passed, 4 total
Tests:       13 passed, 13 total
Snapshot:    0 passed, 0 total
Time:        47.296375ms

Immutability

Chart releases must be immutable. Any change to a chart warrants a chart version bump even if it is only a change to the documentation.

Versioning

The chart version should follow semver.

Charts should start at 1.0.0. Any breaking (backwards incompatible) changes to a chart should:

  1. Bump the MAJOR version
  2. In the README, under a section called "Upgrading", describe the manual steps necessary to upgrade to the new (specified) MAJOR version