Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
max_line_length = 110
quote_type = single

[*.{yaml,md,tpl,json5}]
indent_size = 2

[Makefile]
indent_style = tab
3 changes: 3 additions & 0 deletions .github/ghci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# yaml-language-server: $schema=https://geoservices-int.camptocamp.com/github/schema.json

profile: helm
7 changes: 7 additions & 0 deletions .github/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/tag-publish/1.2.6/tag_publish/schema.json

helm:
packages:
- folder: .
dispatch:
- {}
12 changes: 12 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
extends: [
'github>camptocamp/gs-renovate-config-preset:base.json5#1.4.3',
'github>camptocamp/gs-renovate-config-preset:group.json5#1.4.3',
'github>camptocamp/gs-renovate-config-preset:ci.json5#1.4.3',
'github>camptocamp/gs-renovate-config-preset:preset.json5#1.4.3',
'github>camptocamp/gs-renovate-config-preset:pre-commit.json5#1.4.3',
'github>camptocamp/gs-renovate-config-preset:shellcheck.json5#1.4.3',
'github>camptocamp/gs-renovate-config-preset:own.json5#1.4.3',
],
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
}
3 changes: 3 additions & 0 deletions .github/spell-ignore-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fmeflow
FMeflow
FMEflow
129 changes: 129 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: Continuous integration

on:
push:
branches:
- master
tags:
- '*'
pull_request:

permissions:
actions: write
contents: write
id-token: write
packages: write

env:
HAS_SECRETS: ${{ secrets.HAS_SECRETS }}

jobs:
main:
name: Continuous integration
runs-on: ubuntu-24.04
timeout-minutes: 20
if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"

strategy:
fail-fast: true
matrix:
helm:
- latest
- 3.12.0

steps:
- run: docker system prune --all --force
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.14'
- run: python3 -m pip install --requirement=ci/requirements.txt

# Pre-commit regenerates the checked-in fixtures, so keep it on one
# stable Helm version instead of the runner's preinstalled one, and
# run it on a single matrix leg only.
- name: Install helm (early, for pre-commit hooks)
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
with:
version: 3.21.4
if: matrix.helm == 'latest'

# The helm-template-gen hooks package the parent chart from file:// for
# the examples, the parent dependencies must already be present in the
# root charts/ directory to be embedded in the package.
- run: helm dependency update .
if: matrix.helm == 'latest'
- run: helm dependency update examples/basic
if: matrix.helm == 'latest'
- run: helm dependency update examples/external-db-traefik
if: matrix.helm == 'latest'

- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: "pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}\npre-commit-"
if: matrix.helm == 'latest'
- run: pre-commit run --all-files --color=always
if: matrix.helm == 'latest'
- run: git diff --exit-code --patch > /tmp/pre-commit.patch; git diff --color; git reset --hard || true
if: failure()
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: Apply pre-commit fix.patch
path: /tmp/pre-commit.patch
retention-days: 1
if: failure()
- name: Print environment information
run: c2cciutils-env
env:
GITHUB_EVENT: ${{ toJson(github) }}

- name: Install helm
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
with:
version: ${{ matrix.helm }}
- run: helm dependency update .
- run: helm lint .
if: matrix.helm == 'latest'

- run: helm dependency update examples/basic
- run: helm lint examples/basic
if: matrix.helm == 'latest'

- run: helm dependency update examples/external-db-traefik
- run: helm lint examples/external-db-traefik
if: matrix.helm == 'latest'

# The golden files are generated and checked by the helm-template-gen
# pre-commit hook with the pinned Helm version above, rendering them
# again with the matrix Helm versions is not reproducible (Helm 4 does
# not render the exact same output as Helm 3), they are applied as is
# on k3s to validate them against the Kubernetes API.
- name: Setup k3s/k3d
run: c2cciutils-k8s-install

- name: Install external-secret CRD
run: |
curl https://raw.githubusercontent.com/external-secrets/external-secrets/v0.16.1/deploy/crds/bundle.yaml --output /tmp/external-secrets-crd.yaml
kubectl apply --server-side -f /tmp/external-secrets-crd.yaml

- name: Apply
run: kubectl apply --filename=tests/expected-basic.yaml --filename=tests/expected-external-db-traefik.yaml

- name: Publish
run: tag-publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: matrix.helm == 'latest' && env.HAS_SECRETS == 'HAS_SECRETS'
- run: git diff --exit-code --patch > /tmp/dpkg-versions.patch; git diff --color; git reset --hard || true
if: failure()
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: Update dpkg versions list.patch
path: /tmp/dpkg-versions.patch
retention-days: 1
if: failure()
52 changes: 52 additions & 0 deletions .github/workflows/pull-request-automation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Auto reviews, merge and close pull requests

on:
pull_request:
types:
- opened
- reopened
jobs:
auto-merge:
name: Auto reviews pull requests from bots
runs-on: ubuntu-24.04
timeout-minutes: 5

steps:
- name: Print event
run: echo "${GITHUB}" | jq
env:
GITHUB: ${{ toJson(github) }}
- name: Print context
uses: actions/github-script@v7
with:
script: |-
console.log(context);
- name: Auto reviews GHCI updates
uses: actions/github-script@v7
with:
script: |-
github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
event: 'APPROVE',
})
if: |-
startsWith(github.head_ref, 'ghci/audit/')
&& (github.event.pull_request.user.login == 'geo-ghci-test[bot]'
|| github.event.pull_request.user.login == 'geo-ghci-int[bot]'
|| github.event.pull_request.user.login == 'geo-ghci[bot]')
- name: Auto reviews Renovate updates
uses: actions/github-script@v7
with:
script: |-
github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
event: 'APPROVE',
})
if: |-
github.event.pull_request.user.login == 'renovate[bot]'
permissions:
pull-requests: write
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.tar.gz
*.tgz
**/Chart.lock
/charts/
/examples/*/charts/
/tests/*actual.yaml
*/__pycache__/*
.venv/
/.github/changelog-generator-cache/
.project
44 changes: 44 additions & 0 deletions .helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

tests/
ci/
# And other stuff as well
poetry.lock
.editorconfig
.github/
.mypy_cache/
.pre-commit-config.yaml
.pre-commit-hooks.yaml
.prettierignore
.prospector.yaml
.venv
__pycache__/
*/__pycache__/

/examples/
/.helmignore
/.secretignore
Makefile

.git
Loading
Loading