Skip to content

Commit

Permalink
testproj
Browse files Browse the repository at this point in the history
  • Loading branch information
monteiro-renato committed Nov 22, 2024
1 parent 85eb9be commit 0494e7a
Showing 1 changed file with 15 additions and 34 deletions.
49 changes: 15 additions & 34 deletions .github/workflows/test-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,37 @@ jobs:
curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
- name: Verify kind installation
run: kind version

- name: Create kind cluster
run: kind create cluster

- name: Prepare project-v4-with-plugins
- name: Prepare test-project
run: |
cd testdata/project-v4-with-plugins/
go mod tidy
make docker-build IMG=project-v4-with-plugins:v0.1.0
kind load docker-image project-v4-with-plugins:v0.1.0
make docker-build IMG=test-project:v0.1.0
kind load docker-image test-project:v0.1.0
- name: Install Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- name: Verify Helm installation
run: helm version

- name: Lint Helm Chart
run: |
helm lint ./dist/chart
- name: Install cert-manager via Helm
run: |
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true
- name: Wait for cert-manager to be ready
run: |
kubectl wait --namespace cert-manager --for=condition=available --timeout=300s deployment/cert-manager
kubectl wait --namespace cert-manager --for=condition=available --timeout=300s deployment/cert-manager-cainjector
kubectl wait --namespace cert-manager --for=condition=available --timeout=300s deployment/cert-manager-webhook
# Needed when prometheus.enabled is set to true in the values.yaml because a ServiceMonitor will be generated.
# In order to avoid apply failures later on, we need to make sure the CRD exists beforehand.
- name: Install Prometheus Operator CRDs
Expand All @@ -55,34 +61,9 @@ jobs:
helm repo update
helm install prometheus-crds prometheus-community/prometheus-operator-crds -n monitoring --create-namespace
# TODO: Uncomment if cert-manager is enabled
# - name: Install cert-manager via Helm
# run: |
# helm repo add jetstack https://charts.jetstack.io
# helm repo update
# helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true
#
# - name: Wait for cert-manager to be ready
# run: |
# kubectl wait --namespace cert-manager --for=condition=available --timeout=300s deployment/cert-manager
# kubectl wait --namespace cert-manager --for=condition=available --timeout=300s deployment/cert-manager-cainjector
# kubectl wait --namespace cert-manager --for=condition=available --timeout=300s deployment/cert-manager-webhook

# TODO: Uncomment if Prometheus is enabled
# - name: Install Prometheus via Helm
# run: |
# helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
# helm repo update
# helm install prometheus prometheus-community/prometheus --namespace monitoring --create-namespace
#
# - name: Wait for Prometheus to be ready
# run: |
# kubectl wait --namespace monitoring --for=condition=available --timeout=300s deployment/prometheus-server

- name: Install Helm chart for project
run: |
helm install my-release ./dist/chart --create-namespace --namespace project-v4-with-plugins-system
helm install my-release ./dist/chart --create-namespace --namespace test-project-system
- name: Check Helm release status
run: |
helm status my-release --namespace project-v4-with-plugins-system
helm status my-release --namespace test-project-system

0 comments on commit 0494e7a

Please sign in to comment.