Skip to content

Add minikube testing #308

Add minikube testing

Add minikube testing #308

Workflow file for this run

name: Release Charts
on:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
env:
HELM_EXPERIMENTAL_OCI: 1
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: v3.13.3
- name: Install python
uses: actions/setup-python@v5
with:
python-version: 3
- name: Set up chart-testing
uses: helm/[email protected]
- name: Extract tag
id: extract_tag
run: |
version=$(grep '^version:' Chart.yaml | sed 's/"//g' | awk '{print $2}')
echo "Chart version is $version"
echo "CHART_VERSION=$version" >> $GITHUB_ENV
echo "CHART_VERSION=$version" >> $GITHUB_OUTPUT
working-directory: charts/vaas
- name: Run chart-testing (lint)
run: ct lint --validate-maintainers=false --charts charts/vaas
- name: Install Minikube
uses: manusa/[email protected]
with:
minikube version: v1.34.0
kubernetes version: v1.30.0
driver: docker
start args: --cpus 4 --memory 8192
- name: Set up kubectl
uses: azure/setup-kubectl@v3
with:
version: 'latest'
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: v3.13.3
- name: Enable ingress
run: |
minikube addons enable ingress
minikube kubectl -- wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=120s
- name: Deploy Helm Chart
run: |
cat <<EOF > values-local.yaml
global:
secret:
dockerconfigjson: "${{ secrets.DOCKER_CONFIG_JSON }}"
cloud:
hashLookup:
enabled: false
allowlistLookup:
enabled: false
EOF
helm dep up charts/vaas
helm upgrade --install vaas charts/vaas -f values-local.yaml -n vaas --create-namespace --debug
- name: Verify Pods
run: |
sleep 10
minikube kubectl -- get pods --namespace vaas || true
minikube kubectl -- wait --for=condition=ready pods --namespace vaas --timeout=300s --all
- name: Set up vaas host
run: |
sudo echo "vaas $(minikube ip)" | sudo tee -a /etc/hosts
- name: Checkout Vaas Java SDK
uses: actions/checkout@v4
with:
repository: GDATASoftwareAG/vaas
- name: Run Java SDK Example
run: |
cd ./java
export SCAN_PATH=$(pwd)/build.gradle
export CLIENT_ID=vaas
export CLIENT_SECRET=$(minikube kubectl -- get secret -n vaas vaas-client-secret -o jsonpath="{.data.secret}" | base64 -d)
export VAAS_URL=ws://vaas/ws
export TOKEN_URL=http://vaas/auth/protocol/openid-connect/token
gradle testWithoutErrorLogProducer
cd examples/VaasExample/
gradle fileScan
- name: Push chart
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: appany/[email protected]
with:
name: vaas
repository: gdatasoftwareag/charts
tag: $CHART_VERSION
path: charts/vaas
registry: ghcr.io
registry_username: ${{ secrets.REGISTRY_USERNAME }}
registry_password: ${{ secrets.CR_TOKEN }}
update_dependencies: "true"
- name: create zipfile
run: zip -r vaas-helm.zip charts/vaas/
- name: Github Release
uses: softprops/action-gh-release@v2
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
with:
tag_name: ${{steps.extract_tag.outputs.CHART_VERSION}}
generate_release_notes: true
make_latest: true
files: |
vaas-helm.zip