mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-23 15:39:02 +00:00
[template] Move template chart to outer folder (#518)
* [template] Move template chart to outer folder * Revert workflow change
This commit is contained in:
parent
5e86ce93b7
commit
34bbd3e3da
6
.github/workflows/charts-lint-test.yaml
vendored
6
.github/workflows/charts-lint-test.yaml
vendored
@ -38,14 +38,14 @@ jobs:
|
||||
echo "::set-output name=changed::true"
|
||||
fi
|
||||
|
||||
changed_unfiltered=$(ct list-changed --config .github/ct.yaml --excluded-charts ".template")
|
||||
changed_unfiltered=$(ct list-changed --config .github/ct.yaml --excluded-charts "")
|
||||
if [[ $(grep -E "^charts/common(-test)?$" <<< "$changed_unfiltered") ]]; then
|
||||
echo "::set-output name=common::true"
|
||||
fi
|
||||
|
||||
- name: Run chart-testing (lint)
|
||||
id: lint
|
||||
run: ct lint --config .github/ct.yaml --excluded-charts ".template"
|
||||
run: ct lint --config .github/ct.yaml --excluded-charts ""
|
||||
if: steps.list-changed.outputs.changed == 'true' || steps.list-changed.outputs.common == 'true'
|
||||
|
||||
unittest:
|
||||
@ -105,7 +105,7 @@ jobs:
|
||||
if: needs.lint.outputs.changed == 'true' || needs.lint.outputs.common == 'true'
|
||||
|
||||
- name: Run chart-testing (install)
|
||||
run: ct install --config .github/ct.yaml --excluded-charts ".template"
|
||||
run: ct install --config .github/ct.yaml --excluded-charts ""
|
||||
if: needs.lint.outputs.changed == 'true'
|
||||
|
||||
- name: Run chart-testing (common-test)
|
||||
|
@ -6,7 +6,7 @@ tasks:
|
||||
create:
|
||||
desc: create new chart
|
||||
cmds:
|
||||
- cp -r {{.GIT_ROOT}}/charts/.template {{.GIT_ROOT}}/charts/{{.CHART}}
|
||||
- cp -r {{.GIT_ROOT}}/templates/chart {{.GIT_ROOT}}/charts/{{.CHART}}
|
||||
- ./.bin/go-replace -s '${CHARTNAME}' -r "{{.CHART}}" --path={{.GIT_ROOT}}/charts/{{.CHART}} --path-pattern='*.*'
|
||||
- task: dependency
|
||||
- echo "Congratulations, charts/{{.CHART}} successfully generated, you can now edit chart informations ( Chart.yaml and values.yaml )"
|
||||
@ -14,6 +14,7 @@ tasks:
|
||||
- test -d {{.GIT_ROOT}}/charts/{{.CHART}}
|
||||
deps:
|
||||
- check-chart
|
||||
silent: true
|
||||
|
||||
|
||||
dependency:
|
||||
|
@ -1,10 +1,41 @@
|
||||
---
|
||||
version: '3'
|
||||
|
||||
# Todo: add darwin requirements
|
||||
# Todo: add all darwin requirements
|
||||
|
||||
env:
|
||||
URL_GOREPLACE: https://github.com/webdevops/go-replace/releases/download/1.1.2/gr-64-osx
|
||||
|
||||
tasks:
|
||||
default:
|
||||
|
||||
install:
|
||||
desc: Install all developer dependencies
|
||||
deps:
|
||||
- distrib-requirements
|
||||
- go-replace
|
||||
|
||||
distrib-requirements:
|
||||
desc: Check needed distribution packages
|
||||
cmds:
|
||||
- task -l
|
||||
- task deps:need BIN=wget
|
||||
- task deps:need BIN=python3
|
||||
- task deps:need BIN=docker
|
||||
silent: true
|
||||
|
||||
need:
|
||||
desc: Check needed binary is present
|
||||
cmds:
|
||||
- type {{.BIN}} 2>&1 >/dev/null || (echo "Please install {{.BIN}}"; exit 1)
|
||||
silent: true
|
||||
|
||||
go-replace:
|
||||
desc: Install go-replace
|
||||
cmds:
|
||||
- echo "Installing go-replace"
|
||||
- mkdir -p ".bin"
|
||||
- wget -q "https://github.com/webdevops/go-replace/releases/download/1.1.2/gr-64-osx" -O .bin/go-replace && chmod +x .bin/go-replace
|
||||
status:
|
||||
- test -e .bin/go-replace
|
||||
deps:
|
||||
- distrib-requirements
|
||||
silent: true
|
||||
|
@ -32,36 +32,33 @@ tasks:
|
||||
helm:
|
||||
desc: Install helm client
|
||||
cmds:
|
||||
- echo "Installing helm"
|
||||
- wget -q -O - "$URL_HELM" | USE_SUDO=false HELM_INSTALL_DIR=.bin bash
|
||||
status:
|
||||
- test -e .bin/helm
|
||||
deps:
|
||||
- distrib-requirements
|
||||
silent: true
|
||||
|
||||
pre-commit:
|
||||
desc: Install a precommit pip package
|
||||
cmds:
|
||||
- echo "Installing pre-commit"
|
||||
- python3 -m pip install --user pre-commit
|
||||
status:
|
||||
- type pre-commit
|
||||
deps:
|
||||
- distrib-requirements
|
||||
|
||||
# env-replacer:
|
||||
# desc: Install env-replace binary
|
||||
# cmds:
|
||||
# - wget -q "$URL_ENVREPLACER" -O - | tar -xz -C .bin && chmod +x .bin/env-replacer
|
||||
# status:
|
||||
# - test -e .bin/env-replacer
|
||||
# deps:
|
||||
# - distrib-requirements
|
||||
silent: true
|
||||
|
||||
go-replace:
|
||||
desc: Install go-replace
|
||||
cmds:
|
||||
# - echo wget -q "$URL_GOREPLACE" -O - | tar -xz -C .bin/ && chmod +x .bin/go-replace
|
||||
- echo "Installing go-replace"
|
||||
- mkdir -p ".bin"
|
||||
- wget -q "$URL_GOREPLACE" -O .bin/go-replace && chmod +x .bin/go-replace
|
||||
status:
|
||||
- test -e .bin/go-replace
|
||||
deps:
|
||||
- distrib-requirements
|
||||
silent: true
|
||||
|
Loading…
Reference in New Issue
Block a user