Skip to content

Latest commit

 

History

History
97 lines (70 loc) · 4.61 KB

CONTRIBUTING.md

File metadata and controls

97 lines (70 loc) · 4.61 KB

Table of Contents generated with DocToc

Contributing guidelines

Developer Certificate of Origin

This repository built with probot that enforces the Developer Certificate of Origin (DCO) on Pull Requests. It requires all commit messages to contain the Signed-off-by line with an email address that matches the commit author.

Contributing A Patch

  1. Submit an issue describing your proposed change to the repo in question.
  2. The repo owners will respond to your issue promptly.
  3. Fork the desired repo, develop and test your code changes.
  4. Commit your changes with DCO
  5. Submit a pull request.

Issue and Pull Request Management

Anyone may comment on issues and submit reviews for pull requests. However, in order to be assigned an issue or pull request, you must be a member of the IBM GitHub organization.

Repo maintainers can assign you an issue or pull request by leaving a /assign <your Github ID> comment on the issue or pull request.

Linting prerequisite

  • git

  • go version v1.17+

  • some tools below requires python with pip (tested on python3), and ruby with gem and bundler to install

  • Linting Tools

    linting tool version instructions
    hadolint v1.17.2 download binary from version link, make executable with chmod +x and add to bin directory
    shellcheck v0.7.0 download binary from version link, make executable with chmod +x and add to bin directory
    yamllint v1.17.0 download zip from version link, unzip and enter directory, then use python pip to install e.g. with this command sudo pip3 install .
    golangci-lint v1.44.0 go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.44.0
    mdl v0.5.0 download using git clone https://github.com/markdownlint/markdownlint.git -b v0.5.0 and install using rake install
    awesome_bot 1.19.1 download using git clone https://github.com/dkhamsing/awesome_bot.git -b 1.19.1 and install using rake install
    goimports 3792095 go get golang.org/x/tools/cmd/goimports@3792095
  • if you have an error during make check, for example:

goboringcrypto.h fatal error: openssl/ossl_typ.h: no such file or directory

Then try downloading newer golang version from golang.org and:

  • make sure $GOROOT will be set to the newer one

It was tested to work with these environment variables and setup:

  • go version go1.17 linux/amd64
  • Red Hat Enterprise Linux 8
  • GOROOT=/usr/local/go
  • GOPATH=$HOME/go
  • GO111MODULE=on

Pre-check before submitting a PR

After your PR is ready to commit, please run following commands to check your code.

make check
make test

Build images

Make sure your code build passed.

make

Now, you can follow the README to work with the ibm-licensing-operator.

Version bump

Run script common/scripts/next_csv.sh in project root directory with parameters: a current version, new version, old version.. Example to bump operator from 1.9.0 to 1.10.0:

common/scripts/next_csv.sh 1.9.0 1.10.0 1.8.0