ci: update
This commit is contained in:
parent
9f44b4f323
commit
2e7f1554e6
3 changed files with 119 additions and 40 deletions
|
@ -51,31 +51,24 @@ jobs:
|
||||||
- name: install deps
|
- name: install deps
|
||||||
run: |
|
run: |
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
apt-get -q install -qq make python3 python3-pip
|
apt-get -q install -qq make python3
|
||||||
|
|
||||||
- run: pip3 install yamllint yamale
|
- name: install helm
|
||||||
|
uses: github.com/azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
|
||||||
- name: install helm ${{ env.HELM_VERSION }}
|
with:
|
||||||
run: |
|
version: v3.13.2 # renovate: datasource=github-releases depName=helm packageName=helm/helm
|
||||||
curl -LO "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz"
|
|
||||||
tar --strip 1 -C "/usr/local/bin" -xf "helm-${HELM_VERSION}-linux-amd64.tar.gz" linux-amd64/helm
|
|
||||||
rm "helm-${HELM_VERSION}-linux-amd64.tar.gz"
|
|
||||||
helm --version
|
|
||||||
|
|
||||||
- name: install chart-testing ${{ env.HELM_CHART_TESTING_VERSION }}
|
|
||||||
run: |
|
|
||||||
curl -LO "https://github.com/helm/chart-testing/releases/download/${HELM_CHART_TESTING_VERSION}/chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
|
||||||
tar -C "/usr/local/bin" -xf "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz" ct
|
|
||||||
mkdir /etc/ct
|
|
||||||
tar --strip 1 -C "/etc/ct" -xf "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz" etc/chart_schema.yaml etc/lintconf.yaml
|
|
||||||
rm "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
|
||||||
ct --version
|
|
||||||
|
|
||||||
- run: helm plugin install --version ${{ env.HELM_UNITTEST_VERSION }} https://github.com/helm-unittest/helm-unittest
|
- run: helm plugin install --version ${{ env.HELM_UNITTEST_VERSION }} https://github.com/helm-unittest/helm-unittest
|
||||||
|
|
||||||
|
- name: install chart-testing
|
||||||
|
uses: github.com/helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
||||||
|
with:
|
||||||
|
version: v3.10.1 # renovate: datasource=github-releases depName=chart-testing packageName=helm/chart-testing
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
show-progress: false
|
show-progress: false
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- run: helm dependency build
|
- run: helm dependency build
|
||||||
|
|
||||||
|
@ -87,38 +80,110 @@ jobs:
|
||||||
|
|
||||||
e2e:
|
e2e:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
k8s:
|
||||||
|
# from https://hub.docker.com/r/kindest/node/tags
|
||||||
|
# - v1.25.3 # renovate: kindest
|
||||||
|
- v1.28.0 # renovate: kindest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: cat /etc/os-release
|
- run: cat /etc/os-release
|
||||||
|
|
||||||
- name: install deps
|
- name: install deps
|
||||||
run: |
|
run: |
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
apt-get -q install -qq make python3 python3-pip
|
apt-get -q install -qq \
|
||||||
|
ca-certificates \
|
||||||
- run: pip3 install yamllint yamale
|
curl \
|
||||||
|
gnupg \
|
||||||
- name: install kind ${{ env.KIND_VERSION }}
|
make \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
;
|
||||||
|
- name: install docker
|
||||||
run: |
|
run: |
|
||||||
curl -Lo /usr/local/bin/kind "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64"
|
install -m 0755 -d /etc/apt/keyrings
|
||||||
chmod +x /usr/local/bin/kind
|
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
kind --version
|
chmod a+r /etc/apt/keyrings/docker.gpg
|
||||||
|
echo \
|
||||||
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
|
||||||
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||||
|
tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
apt-get update -qq
|
||||||
|
apt-get -q install -qq \
|
||||||
|
docker-ce \
|
||||||
|
docker-ce-cli \
|
||||||
|
containerd.io \
|
||||||
|
;
|
||||||
|
|
||||||
- name: install helm ${{ env.HELM_VERSION }}
|
# - run: pip3 install yamllint yamale
|
||||||
run: |
|
|
||||||
curl -LO "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz"
|
|
||||||
tar --strip 1 -C "/usr/local/bin" -xf "helm-${HELM_VERSION}-linux-amd64.tar.gz" linux-amd64/helm
|
|
||||||
rm "helm-${HELM_VERSION}-linux-amd64.tar.gz"
|
|
||||||
helm --version
|
|
||||||
|
|
||||||
- name: install chart-testing ${{ env.HELM_CHART_TESTING_VERSION }}
|
# - name: install kind ${{ env.KIND_VERSION }}
|
||||||
run: |
|
# run: |
|
||||||
curl -LO "https://github.com/helm/chart-testing/releases/download/${HELM_CHART_TESTING_VERSION}/chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
# curl -Lo /usr/local/bin/kind "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64"
|
||||||
tar -C "/usr/local/bin" -xf "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz" ct
|
# chmod +x /usr/local/bin/kind
|
||||||
mkdir /etc/ct
|
# kind --version
|
||||||
tar --strip 1 -C "/etc/ct" -xf "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz" etc
|
|
||||||
rm "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
# - name: install helm ${{ env.HELM_VERSION }}
|
||||||
ct --version
|
# run: |
|
||||||
|
# curl -LO "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz"
|
||||||
|
# tar --strip 1 -C "/usr/local/bin" -xf "helm-${HELM_VERSION}-linux-amd64.tar.gz" linux-amd64/helm
|
||||||
|
# rm "helm-${HELM_VERSION}-linux-amd64.tar.gz"
|
||||||
|
# helm --version
|
||||||
|
|
||||||
|
# - name: install chart-testing ${{ env.HELM_CHART_TESTING_VERSION }}
|
||||||
|
# run: |
|
||||||
|
# curl -LO "https://github.com/helm/chart-testing/releases/download/${HELM_CHART_TESTING_VERSION}/chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
||||||
|
# tar -C "/usr/local/bin" -xf "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz" ct
|
||||||
|
# mkdir /etc/ct
|
||||||
|
# tar --strip 1 -C "/etc/ct" -xf "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz" etc
|
||||||
|
# rm "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
||||||
|
# ct --version
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
show-progress: false
|
show-progress: false
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- run: docker info
|
||||||
|
|
||||||
|
- name: Create kind ${{ matrix.k8s }} cluster
|
||||||
|
uses: github.com/helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
|
||||||
|
with:
|
||||||
|
node_image: kindest/node:${{ matrix.k8s }}
|
||||||
|
version: v0.20.0 # renovate: datasource=github-releases depName=kind packageName=kubernetes-sigs/kind
|
||||||
|
|
||||||
|
- run: kubectl get no -o wide
|
||||||
|
|
||||||
|
- name: Install chart-testing
|
||||||
|
uses: github.com/helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
|
||||||
|
with:
|
||||||
|
version: v3.10.1 # renovate: datasource=github-releases depName=chart-testing packageName=helm/chart-testing
|
||||||
|
|
||||||
|
# Catch-all required check for test matrix
|
||||||
|
test-success:
|
||||||
|
needs:
|
||||||
|
- node-lint
|
||||||
|
- helm-lint
|
||||||
|
- e2e
|
||||||
|
runs-on: self-hosted
|
||||||
|
timeout-minutes: 1
|
||||||
|
if: always()
|
||||||
|
steps:
|
||||||
|
- name: Fail for failed or cancelled node-lint
|
||||||
|
if: |
|
||||||
|
needs.node-lint.result == 'failure' ||
|
||||||
|
needs.node-lint.result == 'cancelled'
|
||||||
|
run: exit 1
|
||||||
|
- name: Fail for failed or cancelled helm-lint
|
||||||
|
if: |
|
||||||
|
needs.helm-lint.result == 'failure' ||
|
||||||
|
needs.helm-lint.result == 'cancelled'
|
||||||
|
run: exit 1
|
||||||
|
- name: Fail for failed or cancelled e2e
|
||||||
|
if: |
|
||||||
|
needs.e2e.result == 'failure' ||
|
||||||
|
needs.e2e.result == 'cancelled'
|
||||||
|
run: exit 1
|
||||||
|
|
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
|
@ -1,5 +1,9 @@
|
||||||
{
|
{
|
||||||
"yaml.schemas": {
|
"yaml.schemas": {
|
||||||
|
"https://json.schemastore.org/github-workflow.json": [
|
||||||
|
".github/workflows/*",
|
||||||
|
".forgejo/workflows/*"
|
||||||
|
],
|
||||||
"https://raw.githubusercontent.com/helm-unittest/helm-unittest/v0.3.6/schema/helm-testsuite.json": [
|
"https://raw.githubusercontent.com/helm-unittest/helm-unittest/v0.3.6/schema/helm-testsuite.json": [
|
||||||
"/unittests/**/*.yaml"
|
"/unittests/**/*.yaml"
|
||||||
]
|
]
|
||||||
|
|
|
@ -69,6 +69,16 @@
|
||||||
"https:\\/\\/raw\\.githubusercontent\\.com\\/(?<depName>[^\\s]+?)\\/(?<currentValue>v[0-9.]+?)\\/schema\\/helm-testsuite\\.json"
|
"https:\\/\\/raw\\.githubusercontent\\.com\\/(?<depName>[^\\s]+?)\\/(?<currentValue>v[0-9.]+?)\\/schema\\/helm-testsuite\\.json"
|
||||||
],
|
],
|
||||||
"datasourceTemplate": "github-releases"
|
"datasourceTemplate": "github-releases"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"customType": "regex",
|
||||||
|
"description": "Update kindest kubernetes references",
|
||||||
|
"fileMatch": ["^\\.forgejo\\/workflows\\/[^/]+\\.ya?ml$"],
|
||||||
|
"matchStrings": [
|
||||||
|
" +- (?<currentValue>v\\d+\\.\\d+\\.\\d+) # renovate: kindest\\n"
|
||||||
|
],
|
||||||
|
"depNameTemplate": "kindest/node",
|
||||||
|
"datasourceTemplate": "docker"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue