Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn committed Oct 17, 2024
1 parent c769b17 commit 25c7f33
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/helm-community.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
helm repo add elastic https://helm.elastic.co/
- name: Helm install
id: helm_install
run: |
helm dep build .
helm install ${{ matrix.name }} . \
Expand Down Expand Up @@ -128,3 +129,18 @@ jobs:
helm ls --all-namespaces
kubectl get all --all-namespaces
kubectl describe pod
- name: Collect logs from all containers
if: always() && steps.helm_install.outcome != 'skipped'
run: |
mkdir -p logs
for pod in $(kubectl get pods -n default -o jsonpath='{.items[*].metadata.name}'); do
kubectl logs $pod -n default > logs/${pod}.log
done
- name: Upload logs as artifact
if: always() && steps.helm_install.outcome != 'skipped'
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0
with:
name: k8s-logs-${{ matrix.name }}-${{ matrix.values }}
path: logs
16 changes: 16 additions & 0 deletions .github/workflows/helm-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ jobs:
helm repo add elastic https://helm.elastic.co/
- name: Helm install
id: helm_install
run: >-
helm dep build ./helm/alfresco-content-services &&
helm install acs ./helm/alfresco-content-services
Expand Down Expand Up @@ -217,3 +218,18 @@ jobs:
kubectl get all --all-namespaces
kubectl describe pod
kubectl events --for deployment/acs-alfresco-repository
- name: Collect logs from all containers
if: always() && steps.helm_install.outcome != 'skipped'
run: |
mkdir -p logs
for pod in $(kubectl get pods -n default -o jsonpath='{.items[*].metadata.name}'); do
kubectl logs $pod -n default > logs/${pod}.log
done
- name: Upload logs as artifact
if: always() && steps.helm_install.outcome != 'skipped'
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0
with:
name: k8s-logs-${{ matrix.name }}-${{ matrix.values }}
path: logs

0 comments on commit 25c7f33

Please sign in to comment.