Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,15 @@ jobs:
echo "List all 'HelmCharts' in all namespaces"
helm list --all-namespaces
echo "List all 'Scans' in all namespaces"
kubectl -n integration-tests get scan -o wide --all-namespaces
kubectl get scans -o wide --all-namespaces
echo "List all 'Jobs' in all namespaces"
kubectl -n integration-tests get jobs -o wide --all-namespaces
kubectl get jobs -o wide --all-namespaces
echo "List all 'Pods' in all namespaces"
kubectl -n integration-tests get pods -o wide --all-namespaces
kubectl get pods -o wide --all-namespaces
echo "List all 'Services' in all namespaces"
kubectl -n integration-tests get services -o wide --all-namespaces
kubectl get services -o wide --all-namespaces
echo "Describe Pods in 'integration-tests' namespace"
kubectl describe pod -n integration-tests

- name: "Inspect Operator"
if: failure()
Expand Down Expand Up @@ -398,13 +400,15 @@ jobs:
echo "List all 'HelmCharts' in all namespaces"
helm list --all-namespaces
echo "List all 'Scans' in all namespaces"
kubectl -n integration-tests get scan -o wide --all-namespaces
kubectl get scans -o wide --all-namespaces
echo "List all 'Jobs' in all namespaces"
kubectl -n integration-tests get jobs -o wide --all-namespaces
kubectl get jobs -o wide --all-namespaces
echo "List all 'Pods' in all namespaces"
kubectl -n integration-tests get pods -o wide --all-namespaces
kubectl get pods -o wide --all-namespaces
echo "List all 'Services' in all namespaces"
kubectl -n integration-tests get services -o wide --all-namespaces
kubectl get services -o wide --all-namespaces
echo "Describe Pods in 'integration-tests' namespace"
kubectl describe pod -n integration-tests

- name: "Inspect Operator"
if: failure()
Expand Down Expand Up @@ -434,7 +438,7 @@ jobs:
- cascading-scans
- generic-webhook
- persistence-azure-monitor
#- persistence-elastic Deployment step is successful locally, but fails on the CI
#- persistence-elastic # Fails on the CI due to insufficient cpu as mentioned in issue #1165
- update-field
- finding-post-processing
- notification
Expand Down Expand Up @@ -576,13 +580,15 @@ jobs:
echo "List all 'HelmCharts' in all namespaces"
helm list --all-namespaces
echo "List all 'Scans' in all namespaces"
kubectl -n integration-tests get scan -o wide --all-namespaces
kubectl get scans -o wide --all-namespaces
echo "List all 'Jobs' in all namespaces"
kubectl -n integration-tests get jobs -o wide --all-namespaces
kubectl get jobs -o wide --all-namespaces
echo "List all 'Pods' in all namespaces"
kubectl -n integration-tests get pods -o wide --all-namespaces
kubectl get pods -o wide --all-namespaces
echo "List all 'Services' in all namespaces"
kubectl -n integration-tests get services -o wide --all-namespaces
kubectl get services -o wide --all-namespaces
echo "Describe Pods in 'integration-tests' namespace"
kubectl describe pod -n integration-tests

- name: "Inspect Operator"
if: failure()
Expand Down
32 changes: 32 additions & 0 deletions hooks/persistence-elastic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,35 @@ include_guard = set
hook = persistence-elastic

include ../../hooks.mk

docker-build: dashboard-importer-docker-build
docker-export: dashboard-importer-docker-export
kind-import: dashboard-importer-kind-import

.PHONY: dashboard-importer-docker-build
dashboard-importer-docker-build:
@echo ".: ⚙️ Build '$(name)' dashboard-importer with BASE_IMG_TAG: '$(BASE_IMG_TAG)'."
docker build \
--build-arg=scannerVersion=$(shell yq e .appVersion ./Chart.yaml) \
--build-arg=baseImageTag=$(BASE_IMG_TAG) \
--build-arg=namespace=$(IMG_NS) \
-t $(IMG_NS)/$(name)-dashboard-importer:$(IMG_TAG) \
-f ./dashboard-importer/Dockerfile \
./dashboard-importer

.PHONY: dashboard-importer-docker-export
dashboard-importer-docker-export:
@echo ".: ⚙️ Saving new docker image archive to '$(name)-dashboard-importer.tar'."
docker save $(IMG_NS)/$(name)-dashboard-importer:$(IMG_TAG) -o $(name)-dashboard-importer.tar

.PHONY: dashboard-importer-kind-import
dashboard-importer-kind-import:
@echo ".: 💾 Importing the image archive '$(name)-dashboard-importer.tar' to local kind cluster."
kind load image-archive ./$(name)-dashboard-importer.tar --name $(KIND_CLUSTER_NAME)

deploy: ## 💾 Deploy this module via HelmChart into namespace "integration-tests"
@echo ".: 💾 Deploying '$(name)' $(hook-prefix) HelmChart with the docker tag '$(IMG_TAG)' into kind namespace 'integration-tests'."
helm -n integration-tests upgrade --install $(name) . --debug --timeout 5m --wait \
--set="hook.image.repository=docker.io/$(IMG_NS)/$(hook-prefix)-$(name)" \
--set="hook.image.tag=$(IMG_TAG)" \
--set="dashboardImporter.image.tag=$(IMG_TAG)"