Update registry.k8s.io/external-dns/external-dns Docker tag to v0.15.0 #387
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint and test PR | |
on: | |
push: | |
branches: | |
- renovate/** | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
changelog-checks: | |
name: Test changelog correctness and get next-version | |
runs-on: ubuntu-latest | |
outputs: | |
is-empty: ${{ steps.empty.outputs.is-empty }} | |
is-held: ${{ steps.held.outputs.is-held }} | |
skip-release: ${{ steps.empty.outputs.is-empty == 'true' || steps.held.outputs.is-held == 'true' }} | |
next-version: ${{ steps.version.outputs.next-version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Validate that the markdown is correct | |
uses: newrelic/release-toolkit/validate-markdown@v1 | |
- name: Generate YAML | |
uses: newrelic/release-toolkit/generate-yaml@v1 | |
with: | |
excluded-dirs: .github | |
excluded-files: README.md | |
exit-code: "0" | |
- name: Check if the release is empty | |
id: empty | |
uses: newrelic/release-toolkit/is-empty@v1 | |
- name: Check if the release is held | |
id: held | |
uses: newrelic/release-toolkit/is-held@v1 | |
- name: Link dependencies | |
if: ${{ steps.empty.outputs.is-empty == 'false' && steps.held.outputs.is-held == 'false' }} | |
uses: newrelic/release-toolkit/link-dependencies@v1 | |
with: | |
dictionary: .github/rt-dictionary.yaml | |
- name: Calculate next version | |
id: version | |
uses: newrelic/release-toolkit/next-version@v1 | |
chart-unittest: | |
name: Unit test Helm charts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install helm-unittest plugin | |
run: helm plugin install https://github.com/helm-unittest/helm-unittest | |
- name: Run unit tests | |
run: | | |
for chart in charts/*; do | |
if [ -d "$chart/tests/" ]; then | |
helm unittest $chart -3 | |
else | |
echo "::warning file=$chart,title=Skipping unit test for $chart::$chart does not have a tests/ folder" | |
fi | |
done | |
chart-lint: | |
name: Lint Helm charts | |
runs-on: ubuntu-latest | |
needs: | |
# Lint charts using the next version. | |
- changelog-checks | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install helm/chart-testing | |
uses: helm/[email protected] | |
# Change version of the Helm chart to the next one so test upgrade path | |
- name: Set chart version to rt's next-version | |
run: | | |
yq -i '.version = "${{ needs.changelog-checks.outputs.next-version }}"' charts/stateless-dns/Chart.yaml | |
- name: Lint charts | |
run: ct --config .github/ct.yaml lint --all | |
chart-install: | |
name: Installation test for Helm charts | |
runs-on: ubuntu-latest | |
needs: | |
# This test is expensive so only run when cheap tests pass. | |
- chart-lint | |
- chart-unittest | |
# To test the upgrade path we need the previous and next version. | |
- changelog-checks | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Install Minikube to test chart installation | |
- name: Install Minikube | |
uses: manusa/[email protected] | |
with: | |
minikube version: v1.33.1 | |
kubernetes version: v1.30.2 | |
github token: ${{ secrets.GITHUB_TOKEN }} | |
driver: docker | |
start args: "--container-runtime=containerd" | |
# Change version of the Helm chart to the next one so test upgrade path | |
- name: Set chart version to rt's next-version | |
run: | | |
yq -i '.version = "${{ needs.changelog-checks.outputs.next-version }}"' charts/stateless-dns/Chart.yaml | |
# Test chart installation | |
- name: Install helm/chart-testing | |
uses: helm/[email protected] | |
- name: Test charts' installation path | |
run: | | |
ct install --all \ | |
--config .github/ct.yaml \ | |
--helm-extra-args "--timeout 1m" | |
# Install charts with the e2e values (tested also in lint-charts job) | |
- name: Installing charts being tested | |
run: | | |
for CHART in charts/*; do | |
if [ -f "$CHART/ci/e2e-values.yaml" ]; then | |
helm upgrade --install \ | |
"$(basename $CHART)" "$CHART" \ | |
--create-namespace --namespace e2e-staless-dns \ | |
--values "$CHART/ci/e2e-values.yaml" \ | |
--wait --timeout 60s | |
fi | |
done | |
- name: Configure testing scenarios | |
run: | | |
helm upgrade --install \ | |
test-chart "testing/chart" \ | |
--create-namespace --namespace e2e-staless-dns \ | |
--wait --timeout 60s | |
# In this first iteration, readineess probes may not be reliable. | |
- name: Wait 5 seconds for everything to settle | |
run: sleep 5 | |
# Begin e2e test. | |
- name: Testing e2e | |
run: | | |
IP=$(minikube ip) | |
errors=0 | |
for TEST in testing/*.sh; do | |
echo "Running tests for $(basename $TEST)" | |
bash "$TEST" $IP || ((errors++)) | |
done | |
exit $errors |