Skip to content

Commit

Permalink
Test dev version
Browse files Browse the repository at this point in the history
  • Loading branch information
pvannierop committed Jul 26, 2024
1 parent 8905e6e commit 74f67cf
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@ apiVersion: k3d.io/v1alpha5
kind: Simple
registries:
create:
image: ligfx/k3d-registry-dockerd:v0.3
image: ligfx/k3d-registry-dockerd:dev
proxy:
remoteURL: "*"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
options:
k3s:
extraArgs:
- arg: --disable=helm-controller
nodeFilters:
- server:*
- arg: --disable=traefik
nodeFilters:
- server:*
34 changes: 18 additions & 16 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
name: Install applications on Kubernets
name: Install applications on Kubernetes

on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
workflow_dispatch:
inputs:
debug_enabled:
Expand Down Expand Up @@ -49,8 +56,15 @@ jobs:
run: |
helmfile template
delete-old-clusters:
runs-on: self-hosted
steps:
- name: Delete old clusters
run: |
k3d cluster delete --all || true
test-k8s-versions:
needs: test-helmfile-template
needs: delete-old-clusters
runs-on: self-hosted
strategy:
matrix:
Expand All @@ -68,10 +82,11 @@ jobs:
- uses: nolar/setup-k3d-k3s@v1
with:
version: ${{ matrix.K3S_VERSION }}
k3d-args: --k3s-arg --disable=traefik@server:0 --k3s-arg --disable-helm-controller@server:0 --config .github/ci_config/k3d-local-image-repo.yaml
k3d-args: --config .github/ci_config/k3d-config.yaml
# Note: k3d adds a 'k3d-' prefix to this name
k3d-name: ${{ matrix.KUBECTL_VERSION }}

# TODO would be better to do this with a command line parameter. I have been unable to get this to work.
- name: Set kubeContext
run: |
sed -i "s/kubeContext: .*/kubeContext: k3d-${{ matrix.KUBECTL_VERSION }}/" etc/production.yaml
Expand All @@ -83,26 +98,13 @@ jobs:
kubectl get pods --all-namespaces --context k3d-${{ matrix.KUBECTL_VERSION }}
helmfile sync --concurrency 1
- name: Destroy cluster
if: always()
run: |
k3d cluster delete ${{ matrix.KUBECTL_VERSION }}
k3d cluster delete k3d-${{ matrix.KUBECTL_VERSION }}
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: Manually triggered tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
with:
limit-access-to-actor: true

- name: Setup tmate session if jobs have failed
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
with:
limit-access-to-actor: true

- name: Report cluster state
if: always()
run: |
Expand Down

0 comments on commit 74f67cf

Please sign in to comment.