mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
Collecting logs in script
This commit is contained in:
parent
00bde59356
commit
01e164914b
3 changed files with 21 additions and 4 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,4 +1,4 @@
|
|||
.DS_Store
|
||||
.gobuild
|
||||
bin
|
||||
|
||||
logs
|
||||
|
|
|
@ -101,9 +101,7 @@ def buildCleanupSteps(Map myParams, String kubeConfigRoot, String kubeconfig) {
|
|||
"DOCKERNAMESPACE=${myParams.DOCKERNAMESPACE}",
|
||||
"KUBECONFIG=${kubeConfigRoot}/${kubeconfig}",
|
||||
]) {
|
||||
sh "mkdir -p logs"
|
||||
sh returnStatus: true, script:"kubectl logs -n ${env.DEPLOYMENTNAMESPACE} --selector=name=arango-deployment-operator > ./logs/deployment-${kubeconfig}.log"
|
||||
sh returnStatus: true, script:"kubectl logs -n kube-system --selector=name=arango-storage-operator > ./logs/storage-${kubeconfig}.log"
|
||||
sh "./scripts/collect_logs.sh ${env.DEPLOYMENTNAMESPACE} ${kubeconfig}"
|
||||
archive includes: 'logs/*'
|
||||
sh "make cleanup-tests"
|
||||
}
|
||||
|
|
19
scripts/collect_logs.sh
Executable file
19
scripts/collect_logs.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Collect logs from kube-arangodb operators
|
||||
|
||||
NS=$1
|
||||
POSTFIX=$2
|
||||
|
||||
if [ -z $NS ]; then
|
||||
echo "Specify a namespace argument"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z $POSTFIX ]; then
|
||||
echo "Specify a postfix argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p ./logs
|
||||
kubectl logs -n ${NS} --selector=name=arango-deployment-operator &> ./logs/deployment-${POSTFIX}.log
|
||||
kubectl logs -n kube-system --selector=name=arango-storage-operator &> ./logs/storage-${POSTFIX}.log
|
Loading…
Reference in a new issue