Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Configure repository for ParadeDB #15

Merged
merged 43 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e6b7856
Add blocks from the paradedb/helm-charts repository
philippemnoel Sep 7, 2024
9bbfcb5
All workflows
philippemnoel Sep 7, 2024
7cd2565
Configure more
philippemnoel Sep 7, 2024
442f603
Revert "Configure more"
philippemnoel Sep 7, 2024
f9ceb76
Readd files, but without prettier
philippemnoel Sep 7, 2024
9b3ceff
Rm
philippemnoel Sep 9, 2024
7aaffc3
Update ignore
philippemnoel Sep 9, 2024
4b72b23
Prettier
philippemnoel Sep 9, 2024
cd3def1
Rm unnecessary files
philippemnoel Sep 9, 2024
9d62e86
Properly handle PGP key
philippemnoel Sep 9, 2024
d09a701
pre-commit
philippemnoel Sep 9, 2024
7b1339c
Rm these
philippemnoel Sep 9, 2024
bf6c075
Rm these files
philippemnoel Sep 9, 2024
f76a195
Rm rebase added files by accident
philippemnoel Sep 9, 2024
97d7195
Fix part of rebase
philippemnoel Sep 9, 2024
f22330d
Fix rebase
philippemnoel Sep 10, 2024
01948e3
Add part of previous README
philippemnoel Sep 10, 2024
8c2cd75
Cleanup
philippemnoel Sep 10, 2024
c91d2f4
Fix the workflow file
philippemnoel Sep 10, 2024
28eec6d
More cleanup, only READMEs and Chart.yaml logo left
philippemnoel Sep 10, 2024
054ee4b
More
philippemnoel Sep 10, 2024
3c672ae
Snapshot
philippemnoel Sep 10, 2024
9aa1f76
Add test
philippemnoel Sep 10, 2024
380b536
Fix path
philippemnoel Sep 10, 2024
a92d813
Better logs
philippemnoel Sep 10, 2024
9adadcb
Add this
philippemnoel Sep 10, 2024
3fa5bf5
try this
philippemnoel Sep 10, 2024
4eeb523
Done
philippemnoel Sep 10, 2024
c6af558
m
philippemnoel Sep 10, 2024
4158d5c
t
philippemnoel Sep 10, 2024
f758f31
this
philippemnoel Sep 10, 2024
7266815
try this
philippemnoel Sep 10, 2024
d37c0f1
add this
philippemnoel Sep 10, 2024
80f6e02
this
philippemnoel Sep 10, 2024
9ae9342
Works again, let's work backwards
philippemnoel Sep 10, 2024
0ec97ef
try this
philippemnoel Sep 11, 2024
2e02ae7
try this
philippemnoel Sep 11, 2024
9298f0c
Try this
philippemnoel Sep 11, 2024
fbb54b5
Explicitly specifying database type
itay-grudev Sep 11, 2024
afb0b2a
paradedb
philippemnoel Sep 11, 2024
5c33683
Back to cluster
philippemnoel Sep 11, 2024
24a2c69
Only Parade
philippemnoel Sep 11, 2024
8641c12
Revert "Only Parade"
philippemnoel Sep 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Order is important. The last matching pattern has the most precedence. In each subsection folders are ordered first by depth, then alphabetically

/.github/ @philippemnoel
/charts/ @philippemnoel
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [paradedb] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Bug Description**
Please describe the bug.

**How To Reproduce**
Please describe how to reproduce the bug.

**Proposed Fix**
Please describe how you think this bug could be fixed.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

**What**
Please describe the feature.

**Why**
Please describe why this feature is important.

**How**
Please describe how you'd implement this feature.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ticket(s) Closed

- Closes #

## What

## Why

## How

## Tests
12 changes: 12 additions & 0 deletions .github/config/cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Reference: https://github.com/helm/chart-releaser
index-path: "./index.yaml"

# PGP signing
sign: true
key: ParadeDB
# keyring: # Set via env variable CR_KEYRING
# passphrase-file: # Set via env variable CR_PASSPHRASE_FILE

# Enable automatic generation of release notes using GitHub's release notes generator.
# see: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes
generate-release-notes: true
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
groups:
github-actions-dependencies:
patterns:
- "*"
27 changes: 0 additions & 27 deletions .github/renovate.json5

This file was deleted.

108 changes: 108 additions & 0 deletions .github/workflows/paradedb-publish-chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# workflows/paradedb-publish-chart.yml
#
# ParadeDB Publish Chart
# Publish the ParadeDB Helm chart to paradedb.github.io via GitHub Pages. This workflow also
# triggers the creation of a GitHub Release. It only runs on pushes to `main` or when we trigger
# a workflow_dispatch event, either manually or via creating a release in `paradedb/paradedb`.

name: ParadeDB Publish Chart

on:
push:
branches:
- main
workflow_dispatch:
inputs:
appVersion:
description: "The ParadeDB version to publish in the Helm Chart (e.g. 0.1.0)"
required: true
default: ""

concurrency:
group: paradedb-publish-chart-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
paradedb-publish-chart:
name: Publish ParadeDB Helm Charts to GitHub Pages
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"

- name: Set Helm Chart Release Versions
id: set_versions
working-directory: charts/charts/cluster/
env:
GH_TOKEN: ${{ secrets.GHA_CREATE_RELEASE_PAT }}
run: |
# If no appVersion is provided, we use the latest ParadeDB version
if [ -z "${{ github.event.inputs.appVersion }}" ]; then
LATEST_TAG=$(curl -s https://api.github.com/repos/paradedb/paradedb/tags | jq -r '.[0].name')
APP_VERSION=${LATEST_TAG#v}
else
APP_VERSION=${{ github.event.inputs.appVersion }}
fi
# Update appVersion to the GitHub Release version and version to the Helm Chart version
sed -i "s/^paradedb: .*/paradedb: $APP_VERSION/" values.yaml
sed -i "s/^version: .*/version: ${{ vars.CHART_VERSION_MAJOR }}.${{ vars.CHART_VERSION_MINOR }}.${{ vars.CHART_VERSION_PATCH }}/" Chart.yaml
echo "values.yaml:"
cat values.yaml
echo "Chart.yaml:"
cat Chart.yaml

# Set output to update post-release, increasing the Helm Chart version patch number by one to update in GitHub Actions Variables
echo "new_chart_version_patch=$(( ${{ vars.CHART_VERSION_PATCH }} + 1 ))" >> $GITHUB_OUTPUT

# The GitHub repository secret `PARADEDB_PGP_PRIVATE_KEY` contains the private key
# in ASCII-armored format. To export a (new) key, run this command:
# `gpg --armor --export-secret-key <my key>`
- name: Prepare ParadeDB PGP Key
env:
PGP_PRIVATE_KEY: "${{ secrets.PARADEDB_PGP_PRIVATE_KEY }}"
PGP_PASSPHRASE: "${{ secrets.PARADEDB_PGP_PASSPHRASE }}"
run: |
IFS=""
echo "$PGP_PRIVATE_KEY" | gpg --dearmor --verbose > /tmp/secring.gpg
echo "$PGP_PASSPHRASE" > /tmp/passphrase.txt

# Tell chart-releaser-action where to find the key and its passphrase
echo "CR_KEYRING=/tmp/secring.gpg" >> "$GITHUB_ENV"
echo "CR_PASSPHRASE_FILE=/tmp/passphrase.txt" >> "$GITHUB_ENV"

- name: Add Grafana Chart Dependencies
run: helm repo add cnpg-grafana-dashboard https://cloudnative-pg.github.io/grafana-dashboards

- name: Run chart-releaser
uses: helm/[email protected]
with:
config: "./.github/config/cr.yaml"
env:
CR_TOKEN: "${{ secrets.GHA_CREATE_RELEASE_PAT }}"

# We have a separate version for our Helm Chart, since it needs to always increment by
# one for every production release, independently of the ParadeDB version. Any non-patch
# version increment should be done manually in GitHub Actions Variables.
- name: Increment Helm Chart Version Number in GitHub Actions Variables
env:
GH_TOKEN: ${{ secrets.GHA_CREATE_RELEASE_PAT }}
run: |
gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/paradedb/charts/actions/variables/CHART_VERSION_PATCH \
-f name='CHART_VERSION_PATCH' \
-f value='${{ steps.set_versions.outputs.new_chart_version_patch }}'

- name: Securely Delete the PGP Key and Passphrase
if: always()
run: shred --remove=wipesync /tmp/secring.gpg /tmp/passphrase.txt
31 changes: 0 additions & 31 deletions .github/workflows/release-pr.yml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/release-publish.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ charts/**/charts/*.tgz
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# editor and IDE paraphernalia
# Editor and IDE paraphernalia
.idea
*.swp
*.swo
*~

# macOS
.DS_Store
4 changes: 4 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
MD013: false # Line length
MD026: false # Trailing punctuation in header
MD029: false # Ordered list item prefix
MD033: false # Inline HTML
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
default_language_version:
python: python3.11

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: no-commit-to-branch
args: ["--branch", "main", "--branch", "dev"]
- id: mixed-line-ending
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
- id: check-merge-conflict
- id: check-case-conflict
- id: check-docstring-first
- id: check-symlinks
- id: check-yaml
exclude: "charts/cluster/" # Exclude all files in the charts/cluster/ directory, which aren't standard YAML
- id: check-json
- id: check-xml
- id: check-ast
- id: check-toml
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-vcs-permalinks
- id: detect-private-key
- id: detect-aws-credentials
- id: debug-statements
- id: destroyed-symlinks
- id: fix-encoding-pragma
- id: fix-byte-order-marker
- id: requirements-txt-fixer

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
hooks:
- id: markdownlint

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
exclude: "charts/cluster/" # Exclude all files in the charts/cluster/ directory, which aren't standard YAML
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/.github/actions/
/.github/workflows/lint.yml
/.github/workflows/tests-*.yml
.github/workflows/tests-*.yaml
/charts/
7 changes: 0 additions & 7 deletions CODEOWNERS

This file was deleted.

Loading
Loading