Skip to content

Commit

Permalink
Revert "Merge branch 'trinodb:main' into automatically-roll-deployments"
Browse files Browse the repository at this point in the history
This reverts commit f9cd9f6, reversing
changes made to b2ad39c.
  • Loading branch information
DinGo4DEV committed May 23, 2024
1 parent f9cd9f6 commit 2ddd97e
Show file tree
Hide file tree
Showing 25 changed files with 448 additions and 1,463 deletions.
6 changes: 0 additions & 6 deletions .github/dependabot.yml

This file was deleted.

65 changes: 38 additions & 27 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,45 +22,56 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
uses: helm/chart-testing-action@v2.0.1
- name: Lint charts
run: ct lint --charts=charts/trino --validate-maintainers=false

test:
runs-on: ubuntu-latest
name: test ${{ matrix.label }}
strategy:
fail-fast: false
matrix:
include:
- { label: default, args: '' }
# last Trino version that requires JDK 21
- { label: 446, args: '--set image.tag=446' }
# last Trino version that requires JDK 17
- { label: 435, args: '--set image.tag=435' }
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- name: Set up Helm
uses: azure/setup-helm@v4
uses: azure/setup-helm@v1
with:
version: v3.14.4
version: v3.4.0
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
uses: helm/chart-testing-action@v2.0.1
- name: Create kind cluster
uses: helm/kind-action@v1.10.0
- name: Run tests
run: ./test.sh -a "${{ matrix.args }}"
uses: helm/kind-action@v1.2.0
- name: Install charts
run: ct install --charts=charts/trino

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- uses: pre-commit/action@v3.0.1
- name: Install Frigate
run: pip install frigate
- name: Check if chart README is in-sync
run: |
frigate gen charts/trino > charts/trino/README.md
if ! git diff --exit-code --quiet; then
cat << 'EOF'
charts/trino/README.md is not in sync with chart
Please update charts/trino/README.md by running:
python3 -m venv .venv && . .venv/bin/activate
pip install frigate
frigate gen charts/trino > charts/trino/README.md
Here's a diff of what's changed:
EOF
git diff
# fail the job
exit 1
else
echo "charts/trino/README.md is in-sync with chart"
fi
# Everything above is CI, everything here and below is for releases and runs only on non-pull-request events
sync-readme:
Expand All @@ -69,11 +80,11 @@ jobs:
if: github.event_name != 'pull_request'
steps:
- name: Checkout main
uses: actions/checkout@v4
uses: actions/checkout@v2
with:
path: main
- name: Checkout gh-pages
uses: actions/checkout@v4
uses: actions/checkout@v2
with:
ref: gh-pages
path: gh-pages
Expand All @@ -97,7 +108,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
with:
# history is required to generate changelog
fetch-depth: 0
Expand All @@ -107,7 +118,7 @@ jobs:
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Build release changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v4
uses: mikepenz/release-changelog-builder-action@v2.9.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -116,7 +127,7 @@ jobs:
- name: Inspect changelog
run: cat ${{ runner.temp }}/CHANGELOG.md
- name: Release charts
uses: helm/chart-releaser-action@v1.6.0
uses: helm/chart-releaser-action@v1.3.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_RELEASE_NOTES_FILE: ${{ runner.temp }}/CHANGELOG.md
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
.idea/*
cert.key
cert.crt
2 changes: 0 additions & 2 deletions .helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@
.project
.idea/
*.tmproj
# helm-doc template
README.md.gotmpl
16 changes: 0 additions & 16 deletions .pre-commit-config.yaml

This file was deleted.

45 changes: 1 addition & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,52 +22,9 @@ You can then run `helm search repo trino` to see the charts.
Then you can install chart using:

```console
helm install my-trino trino/trino --version 0.21.0
```

Also, you can check the manifests using:

```console
helm template my-trino trino/trino --namespace <YOUR_NAMESPACE>
helm install my-trino trino/trino --version 0.17.0
```

## Documentation

You can find documentation about the chart [here](./charts/trino/README.md).

## Development

To test the chart, install it into a Kubernetes cluster. Use `kind` to create a
Kubernetes cluster running in a container, and `chart-testing` to install the
chart and run [tests](charts/trino/templates/tests).

```console
brew install helm kind chart-testing
kind create cluster
ct install
```

To run tests with specific values:
```console
ct install --helm-extra-set-args "--set image.tag=448"
```

Use the `test.sh` script to run a suite of tests, with different chart values.
If some of the tests fail, use the `-s` flag to skip cleanup and inspect the
resources installed in the Kubernetes cluster. Use `-n` to use a specific
namespace, not a randomly generated one. Use `-t` to run only selected tests.
See the command help (`-h`) for a list of available tests.

Example:
```console
./test.sh -n trino -s -t default
```

The documentation is automatically generated from the chart files. Install a
git hook to have it automatically updated when committing changes. Make sure
you [install the pre-commit binary](https://pre-commit.com/#install), then run:

```console
pre-commit install
pre-commit install-hooks
```
4 changes: 2 additions & 2 deletions charts/trino/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.21.0
version: 0.17.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# Same value as in values.yml#image.tag
appVersion: "448"
appVersion: "432"

icon: https://trino.io/assets/trino.png

Expand Down
Loading

0 comments on commit 2ddd97e

Please sign in to comment.