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
|
||||
run: |
|
||||
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 ${{ env.HELM_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/chart_schema.yaml etc/lintconf.yaml
|
||||
rm "chart-testing_${HELM_CHART_TESTING_VERSION#v}_linux_amd64.tar.gz"
|
||||
ct --version
|
||||
- name: install helm
|
||||
uses: github.com/azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
|
||||
with:
|
||||
version: v3.13.2 # renovate: datasource=github-releases depName=helm packageName=helm/helm
|
||||
|
||||
- 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
|
||||
with:
|
||||
show-progress: false
|
||||
fetch-depth: 0
|
||||
|
||||
- run: helm dependency build
|
||||
|
||||
|
@ -87,38 +80,110 @@ jobs:
|
|||
|
||||
e2e:
|
||||
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:
|
||||
- run: cat /etc/os-release
|
||||
|
||||
- name: install deps
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get -q install -qq make python3 python3-pip
|
||||
|
||||
- run: pip3 install yamllint yamale
|
||||
|
||||
- name: install kind ${{ env.KIND_VERSION }}
|
||||
apt-get -q install -qq \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
make \
|
||||
python3 \
|
||||
python3-pip \
|
||||
;
|
||||
- name: install docker
|
||||
run: |
|
||||
curl -Lo /usr/local/bin/kind "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64"
|
||||
chmod +x /usr/local/bin/kind
|
||||
kind --version
|
||||
install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
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: |
|
||||
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
|
||||
# - run: pip3 install yamllint yamale
|
||||
|
||||
- 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
|
||||
# - name: install kind ${{ env.KIND_VERSION }}
|
||||
# run: |
|
||||
# curl -Lo /usr/local/bin/kind "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64"
|
||||
# chmod +x /usr/local/bin/kind
|
||||
# kind --version
|
||||
|
||||
# - name: install helm ${{ env.HELM_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
|
||||
with:
|
||||
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": {
|
||||
"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": [
|
||||
"/unittests/**/*.yaml"
|
||||
]
|
||||
|
|
|
@ -69,6 +69,16 @@
|
|||
"https:\\/\\/raw\\.githubusercontent\\.com\\/(?<depName>[^\\s]+?)\\/(?<currentValue>v[0-9.]+?)\\/schema\\/helm-testsuite\\.json"
|
||||
],
|
||||
"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