Compare commits
6
Commits
552fe8c56e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ccea2082c3
|
||
|
|
4016c5396d
|
||
|
|
d35177ec71
|
||
|
|
e97f3b3bba
|
||
|
|
70a033d519
|
||
|
|
010256397a
|
@@ -0,0 +1,23 @@
|
||||
name: Bash
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [ "opened", "reopened", "synchronize" ]
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
tags-ignore:
|
||||
- '**'
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
bash-unittest:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||
with:
|
||||
submodules: true
|
||||
- env:
|
||||
TERM: xterm
|
||||
name: Run bash unittests
|
||||
run: make bash/unittest
|
||||
@@ -18,6 +18,8 @@ jobs:
|
||||
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
|
||||
with:
|
||||
version: v4.3.0 # renovate: datasource=github-releases depName=helm/helm
|
||||
- name: Update helm dependencies
|
||||
run: helm dependency update
|
||||
- name: Lint helm files
|
||||
run: |
|
||||
helm lint --values values.yaml .
|
||||
@@ -33,5 +35,7 @@ jobs:
|
||||
HELM_UNITTEST_VERSION: v1.0.0 #renovate: datasource=github-releases depName=helm-unittest/helm-unittest
|
||||
name: Install helm-unittest
|
||||
run: helm plugin install --verify=false --version "${HELM_UNITTEST_VERSION}" https://github.com/helm-unittest/helm-unittest
|
||||
- name: Update helm dependencies
|
||||
run: helm dependency update
|
||||
- name: Execute helm unittests
|
||||
run: helm unittest --strict --file 'unittests/**/*.yaml' .
|
||||
|
||||
+1
-1
@@ -36,6 +36,6 @@ unittests/
|
||||
.prettierignore
|
||||
.yamllint
|
||||
CODEOWNERS
|
||||
renovate.json5
|
||||
renovate.json
|
||||
.commitlintrc.json
|
||||
.gitsv/
|
||||
|
||||
Vendored
+1
-2
@@ -4,8 +4,7 @@
|
||||
"/unittests/**/*.yaml"
|
||||
],
|
||||
"https://docs.renovatebot.com/renovate-schema.json":[
|
||||
"renovate.json",
|
||||
"renovate.json5"
|
||||
"renovate.json"
|
||||
]
|
||||
},
|
||||
"yaml.schemaStore.enable": true,
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
SHELL := /usr/bin/env bash -O globstar
|
||||
|
||||
# CLEAN
|
||||
# ==============================================================================
|
||||
PHONY+=clean
|
||||
clean:
|
||||
-rm -rf charts *.tar.gz *.tar.gz.sig node_modules
|
||||
|
||||
# MISSING DOT
|
||||
# ==============================================================================
|
||||
PHONY+=missing-dot
|
||||
@@ -35,6 +41,13 @@ PHONY+=helm/unittest
|
||||
helm/unittest:
|
||||
helm unittest --strict --file 'unittests/helm/**/*.yaml' --file 'unittests/helm/values-conflicting-checks.yaml' ./
|
||||
|
||||
# BASH PREPARE
|
||||
# ==============================================================================
|
||||
PHONY+=bash/prepare
|
||||
bash/prepare:
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
# BASH UNITTESTS
|
||||
# ==============================================================================
|
||||
PHONY+=bash/unittest
|
||||
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"gitea>gitea/renovate-config",
|
||||
"helpers:pinGitHubActionDigests",
|
||||
":automergeMinor",
|
||||
"schedule:automergeDaily",
|
||||
"schedule:weekends"
|
||||
],
|
||||
"labels": [
|
||||
"kind/dependency"
|
||||
],
|
||||
"digest": {
|
||||
"automerge": true
|
||||
},
|
||||
"automergeStrategy": "squash",
|
||||
"git-submodules": {
|
||||
"enabled": true
|
||||
},
|
||||
"customManagers": [
|
||||
{
|
||||
"description": "Gitea-version of https://docs.renovatebot.com/presets-regexManagers/#regexmanagersgithubactionsversions",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": [
|
||||
"/.gitea/workflows/.+\\.ya?ml$/"
|
||||
],
|
||||
"matchStrings": [
|
||||
"# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[a-z-0-9]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:\\s*[\"']?(?<currentValue>.+?)[\"']?\\s"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Detect helm-unittest yaml schema file",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": [
|
||||
"/.vscode/settings\\.json$/"
|
||||
],
|
||||
"matchStrings": [
|
||||
"https:\\/\\/raw\\.githubusercontent\\.com\\/(?<depName>[^\\s]+?)\\/(?<currentValue>v[0-9.]+?)\\/schema\\/helm-testsuite\\.json"
|
||||
],
|
||||
"datasourceTemplate": "github-releases"
|
||||
},
|
||||
{
|
||||
"description": "Automatically detect new Gitea releases",
|
||||
"customType": "regex",
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "gitea/gitea",
|
||||
"extractVersionTemplate": "^v(?<version>.*)$",
|
||||
"managerFilePatterns": [
|
||||
"/(^|/)Chart\\.ya?ml$/"
|
||||
],
|
||||
"matchStrings": [
|
||||
"^appVersion:\\s+[\"']?(?<currentVersion>\\S+)[\"']?$"
|
||||
]
|
||||
}
|
||||
],
|
||||
"lockFileMaintenance": {
|
||||
"enabled": true,
|
||||
"commitMessageAction": "update",
|
||||
"commitMessageTopic": "lockfiles",
|
||||
"schedule": [
|
||||
"at any time"
|
||||
]
|
||||
},
|
||||
"packageRules": [
|
||||
{
|
||||
"groupName": "subcharts (minor & patch)",
|
||||
"matchManagers": [
|
||||
"helmv3"
|
||||
],
|
||||
"matchUpdateTypes": [
|
||||
"minor",
|
||||
"patch",
|
||||
"digest"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupName": "bats testing framework",
|
||||
"matchManagers": [
|
||||
"git-submodules"
|
||||
],
|
||||
"matchUpdateTypes": [
|
||||
"minor",
|
||||
"patch",
|
||||
"digest"
|
||||
]
|
||||
},
|
||||
{
|
||||
"groupName": "workflow dependencies (minor & patch)",
|
||||
"matchManagers": [
|
||||
"github-actions",
|
||||
"npm",
|
||||
"custom.regex"
|
||||
],
|
||||
"matchUpdateTypes": [
|
||||
"minor",
|
||||
"patch",
|
||||
"digest"
|
||||
],
|
||||
"matchFileNames": [
|
||||
"!Chart.yaml"
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Update README.md on changes in values.yaml",
|
||||
"matchManagers": [
|
||||
"helm-values"
|
||||
],
|
||||
"postUpgradeTasks": {
|
||||
"commands": [
|
||||
"install-tool node",
|
||||
"make readme"
|
||||
],
|
||||
"fileFilters": [
|
||||
"README.md"
|
||||
],
|
||||
"executionMode": "update"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Override changelog url for Helm image, to have release notes in our PRs",
|
||||
"matchDepNames": [
|
||||
"alpine/helm"
|
||||
],
|
||||
"changelogUrl": "https://github.com/helm/helm"
|
||||
},
|
||||
{
|
||||
"description": "Bump Gitea as fast as possible - not only on weekends",
|
||||
"matchDepNames": [
|
||||
"go-gitea/gitea"
|
||||
],
|
||||
"schedule": [
|
||||
"at any time"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
-136
@@ -1,136 +0,0 @@
|
||||
{
|
||||
$schema: "https://docs.renovatebot.com/renovate-schema.json",
|
||||
extends: [
|
||||
"gitea>gitea/renovate-config",
|
||||
"helpers:pinGitHubActionDigests",
|
||||
":automergeMinor",
|
||||
"schedule:automergeDaily",
|
||||
"schedule:weekends",
|
||||
],
|
||||
labels: [
|
||||
"kind/dependency",
|
||||
],
|
||||
digest: {
|
||||
automerge: true,
|
||||
},
|
||||
automergeStrategy: "squash",
|
||||
"git-submodules": {
|
||||
enabled: true,
|
||||
},
|
||||
customManagers: [
|
||||
{
|
||||
description: "Gitea-version of https://docs.renovatebot.com/presets-regexManagers/#regexmanagersgithubactionsversions",
|
||||
customType: "regex",
|
||||
managerFilePatterns: [
|
||||
"/.gitea/workflows/.+\\.ya?ml$/",
|
||||
],
|
||||
matchStrings: [
|
||||
"# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[a-z-0-9]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:\\s*[\"']?(?<currentValue>.+?)[\"']?\\s",
|
||||
],
|
||||
},
|
||||
{
|
||||
description: "Detect helm-unittest yaml schema file",
|
||||
customType: "regex",
|
||||
managerFilePatterns: [
|
||||
"/.vscode/settings\\.json$/",
|
||||
],
|
||||
matchStrings: [
|
||||
"https:\\/\\/raw\\.githubusercontent\\.com\\/(?<depName>[^\\s]+?)\\/(?<currentValue>v[0-9.]+?)\\/schema\\/helm-testsuite\\.json",
|
||||
],
|
||||
datasourceTemplate: "github-releases",
|
||||
},
|
||||
{
|
||||
description: "Automatically detect new Gitea releases",
|
||||
customType: "regex",
|
||||
datasourceTemplate: "github-releases",
|
||||
depNameTemplate: "gitea/gitea",
|
||||
extractVersionTemplate: "^v(?<version>.*)$",
|
||||
managerFilePatterns: [
|
||||
"/(^|/)Chart\\.ya?ml$/",
|
||||
],
|
||||
matchStrings: [
|
||||
"^appVersion:\\s+[\"']?(?<currentVersion>\\S+)[\"']?$",
|
||||
],
|
||||
},
|
||||
],
|
||||
lockFileMaintenance: {
|
||||
"enabled": true,
|
||||
"commitMessageAction": "update",
|
||||
"commitMessageTopic": "lockfiles",
|
||||
schedule: [
|
||||
"at any time",
|
||||
]
|
||||
},
|
||||
packageRules: [
|
||||
{
|
||||
groupName: "subcharts (minor & patch)",
|
||||
matchManagers: [
|
||||
"helmv3",
|
||||
],
|
||||
matchUpdateTypes: [
|
||||
"minor",
|
||||
"patch",
|
||||
"digest",
|
||||
],
|
||||
},
|
||||
{
|
||||
groupName: "bats testing framework",
|
||||
matchManagers: [
|
||||
"git-submodules",
|
||||
],
|
||||
matchUpdateTypes: [
|
||||
"minor",
|
||||
"patch",
|
||||
"digest",
|
||||
],
|
||||
},
|
||||
{
|
||||
groupName: "workflow dependencies (minor & patch)",
|
||||
matchManagers: [
|
||||
"github-actions",
|
||||
"npm",
|
||||
"custom.regex",
|
||||
],
|
||||
matchUpdateTypes: [
|
||||
"minor",
|
||||
"patch",
|
||||
"digest",
|
||||
],
|
||||
matchFileNames: [
|
||||
"!Chart.yaml",
|
||||
],
|
||||
},
|
||||
{
|
||||
description: "Update README.md on changes in values.yaml",
|
||||
matchManagers: [
|
||||
"helm-values",
|
||||
],
|
||||
postUpgradeTasks: {
|
||||
commands: [
|
||||
"install-tool node",
|
||||
"make readme",
|
||||
],
|
||||
fileFilters: [
|
||||
"README.md",
|
||||
],
|
||||
executionMode: "update",
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "Override changelog url for Helm image, to have release notes in our PRs",
|
||||
matchDepNames: [
|
||||
"alpine/helm",
|
||||
],
|
||||
changelogUrl: "https://github.com/helm/helm",
|
||||
},
|
||||
{
|
||||
description: "Bump Gitea as fast as possible - not only on weekends",
|
||||
matchDepNames: [
|
||||
"go-gitea/gitea",
|
||||
],
|
||||
schedule: [
|
||||
"at any time",
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
suite: test connection template
|
||||
release:
|
||||
name: gitea-unittests
|
||||
namespace: testing
|
||||
templates:
|
||||
- templates/tests/test-http-connection.yaml
|
||||
tests:
|
||||
- it: renders openshift-compatible defaults for the test pod
|
||||
set:
|
||||
openshift.enabled: true
|
||||
asserts:
|
||||
- notExists:
|
||||
path: spec.hostUsers
|
||||
- equal:
|
||||
path: spec.containers[0].securityContext
|
||||
value:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
runAsNonRoot: true
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
|
||||
- it: renders an explicit hostUsers=false override for the test pod
|
||||
set:
|
||||
openshift:
|
||||
enabled: true
|
||||
deployment:
|
||||
hostUsers: false
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.hostUsers
|
||||
value: false
|
||||
Reference in New Issue
Block a user