Skip to content

Commit

Permalink
Update docs, add GH workflows, fix drone stuff, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvind Iyengar committed May 3, 2022
1 parent 917edda commit 147cae8
Show file tree
Hide file tree
Showing 29 changed files with 650 additions and 112 deletions.
73 changes: 5 additions & 68 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ steps:
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "aiyengar2/prometheus-federator"
repo: "rancher/prometheus-federator"
tag: "${DRONE_TAG}-amd64"
username:
from_secret: docker_username
Expand Down Expand Up @@ -104,7 +104,7 @@ steps:
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "aiyengar2/prometheus-federator"
repo: "rancher/prometheus-federator"
tag: "${DRONE_TAG}-arm64"
username:
from_secret: docker_username
Expand All @@ -122,68 +122,6 @@ volumes:
host:
path: /var/run/docker.sock

---
kind: pipeline
name: arm

platform:
os: linux
arch: arm

steps:
- name: build
image: rancher/dapper:v0.4.1
commands:
- dapper ci
volumes:
- name: docker
path: /var/run/docker.sock

- name: github_binary_release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
prerelease: true
checksum:
- sha256
checksum_file: CHECKSUMsum-arm.txt
checksum_flatten: true
files:
- "dist/artifacts/*"
when:
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

- name: docker-publish
image: plugins/docker
settings:
dockerfile: package/Dockerfile
password:
from_secret: docker_password
repo: "aiyengar2/prometheus-federator"
tag: "${DRONE_TAG}-arm"
username:
from_secret: docker_username
when:
instance:
- drone-publish.rancher.io
ref:
- refs/head/master
- refs/tags/*
event:
- tag

volumes:
- name: docker
host:
path: /var/run/docker.sock

---
kind: pipeline
name: manifest
Expand All @@ -203,9 +141,8 @@ steps:
platforms:
- linux/amd64
- linux/arm64
- linux/arm
target: "aiyengar2/prometheus-federator:${DRONE_TAG}"
template: "aiyengar2/prometheus-federator:${DRONE_TAG}-ARCH"
target: "rancher/prometheus-federator:${DRONE_TAG}"
template: "rancher/prometheus-federator:${DRONE_TAG}-ARCH"
when:
instance:
- drone-publish.rancher.io
Expand All @@ -218,4 +155,4 @@ steps:
depends_on:
- amd64
- arm64
- arm

35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Cluster Setup**
- Kubernetes version:
- Type of Cluster (RKE1, RKE2, k3s, EKS, GKE, AKS, OKE, etc):
- CRD Installation option (Helm Chart / Custom Installation):
- If Helm Chart, did you supply any non-default values? If so, what values did you supply:
- If Custom Installation, how did you install it (kustomize, k8s manifest, etc.):
- Installation option (Helm Chart / Custom Installation):
- If Helm Chart, did you supply any non-default values? If so, what values did you supply:
- If Custom Installation, how did you install it (kustomize, k8s manifest, etc.):

**Describe the bug**
<!--A clear and concise description of what the bug is.-->

**To Reproduce**
<!--Steps to reproduce the behavior-->

**Result**

**Expected Result**
<!--A clear and concise description of what you expected to happen.-->

**Screenshots**
<!-- If applicable, add screenshots to help explain your problem.-->

**Additional context**
<!--Add any other context about the problem here.-->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
48 changes: 48 additions & 0 deletions .github/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 60

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 14

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- internal
- kind/bug
- kind/bug-qa
- kind/task
- kind/feature
- kind/design
- kind/ci-improvements
- kind/performance
- kind/flaky-test

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: true

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: true

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: true

# Label to use when marking as stale
staleLabel: status/stale

# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label)
for 60 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the
issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the
latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

# Limit to only `issues`
only: issues
22 changes: 22 additions & 0 deletions .github/workflows/label-all-new-issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Label issues
on:
issues:
types:
- opened
- reopened
jobs:
label_issues:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Label issues
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
with:
add-labels: "team/area3"
repo-token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 13 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: CI-pullrequest

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
container:
image: rancher/dapper:v0.5.4
steps:
- uses: actions/checkout@v1
- name: Run CI
run: dapper ci
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
*.swp
.idea
/prometheus-federator
/.charts-build-scripts
/.charts-build-scripts
*.DS_Store
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @aiyengar2
35 changes: 35 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of fostering
an open and welcoming community, we pledge to respect all people who contribute
through reporting issues, posting feature requests, updating documentation,
submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for
everyone, regardless of level of experience, gender, gender identity and expression,
sexual orientation, disability, personal appearance, body size, race, ethnicity, age,
religion, or nationality.

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic addresses,
without explicit permission
* Other unethical or unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are not
aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers
commit themselves to fairly and consistently applying these principles to every aspect
of managing this project.

This code of conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
contacting a Rancher administrator on [Slack](https://slack.rancher.io), or <[email protected]>.

This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org).
65 changes: 65 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Contributing to rancher/helm-project-operator

Thank you for investing your time in contributing to our project!

In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.

## New contributor guide

To get an overview of the project, read the [README](README.md). Here are some resources to help you get started with open source contributions:

- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)
- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git)
- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow)
- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests)


## Getting started

### Issues

#### Create a new issue

If you spot a problem with the docs, [search if an issue already exists](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments). If a related issue doesn't exist, you can open a new [issue](https://github.com/rancher/helm-project-operator/issues/new).

#### Solve an issue

Scan through our [existing issues](https://github.com/rancher/helm-project-operator/issues) to find one that interests you. If you find an issue to work on, you are welcome to open a PR with a fix.

### Make Changes

#### Make changes locally

1. Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) or [GitHub Desktop](https://desktop.github.com/)

2. Fork the repository.
- Using GitHub Desktop:
- [Getting started with GitHub Desktop](https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/getting-started-with-github-desktop) will guide you through setting up Desktop.
- Once Desktop is set up, you can use it to [fork the repo](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop)!

- Using the command line:
- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.

3. Install or update to **Go 1.17**. For more information, see [the development guide](docs/developing.md).

4. Create a working branch and start with your changes!

### Commit your update

Commit the changes once you are happy with them. See [Atom's contributing guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md#git-commit-messages) to know how to use emoji for commit messages.

### Pull Request

When you're finished with the changes, create a pull request, also known as a PR.
- Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one.
- Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge.
Once you submit your PR, a Rancher team member will review your proposal. We may ask questions or request for additional information.
- We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch.
- As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations).
- If you run into any merge issues, checkout this [git tutorial](https://lab.github.com/githubtraining/managing-merge-conflicts) to help you resolve merge conflicts and other issues.

### Your PR is merged!

Congratulations :tada::tada: The Rancher team thanks you :sparkles:.

Once your PR is merged, your contributions will be publicly visible on the [`rancher/helm-project-operator`](https://github.com/rancher/helm-project-operator).
2 changes: 1 addition & 1 deletion Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN if [ "${ARCH}" == "amd64" ]; then \
COPY --from=helm ./helm/bin/helm /usr/local/bin/

ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS
ENV DAPPER_SOURCE /go/src/github.com/aiyengar2/prometheus-federator/
ENV DAPPER_SOURCE /go/src/github.com/rancher/prometheus-federator/
ENV DAPPER_OUTPUT ./bin ./dist
ENV DAPPER_DOCKER_SOCKET true
ENV GOPATH /go
Expand Down
Loading

0 comments on commit 147cae8

Please sign in to comment.