mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-08-23 22:26:29 +00:00
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
name: e2e
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
|
|
jobs:
|
|
kind-helm:
|
|
strategy:
|
|
matrix:
|
|
helm-version:
|
|
- 2.16.12
|
|
- 3.3.4
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Setup Kubernetes
|
|
uses: engineerd/setup-kind@v0.4.0
|
|
- name: Build container image
|
|
run: |
|
|
GIT_COMMIT=$(git rev-list -1 HEAD) && \
|
|
docker build -t test/podinfo:latest --build-arg "REVISION=${GIT_COMMIT}" .
|
|
kind load docker-image test/podinfo:latest
|
|
- name: Setup Helm
|
|
uses: ./.github/actions/helm
|
|
with:
|
|
helm-version: ${{ matrix.helm-version }}
|
|
- name: Install Tiller
|
|
if: ${{ startsWith(matrix.helm-version, '2') }}
|
|
run: |
|
|
kubectl --namespace kube-system create sa tiller
|
|
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
|
|
helm init --service-account tiller --upgrade --wait
|
|
- name: Deploy
|
|
run: |
|
|
helm upgrade -i podinfo ./charts/podinfo \
|
|
--set image.repository=test/podinfo \
|
|
--set image.tag=latest \
|
|
--namespace=default
|
|
- name: Run integration tests
|
|
run: |
|
|
kubectl rollout status deployment/podinfo --timeout=1m
|
|
helm test podinfo
|
|
- name: Debug failure
|
|
if: failure()
|
|
run: |
|
|
kubectl logs -l app=podinfo || true
|