Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
valeraBr authored Nov 20, 2023
1 parent 7e375b4 commit 3337067
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pipeline {
stage('Open port forwarding to memphis service - Minikube') {
steps {
sh """
until kubectl get pods --selector=app.kubernetes.io/name=memphis -o=jsonpath="{.items[*].status.phase}" -n memphis-$unique_id | grep -q "Running" ; do sleep 1; done
until kubectl get pods --selector=app.kubernetes.io/name=memphis -o=jsonpath="{.items[*].status.containerStatuses[*].ready}" -n memphis-$unique_id | grep -v "false" ; do sleep 1; done
nohup kubectl port-forward service/memphis 6666:6666 9000:9000 7770:7770 --namespace memphis-$unique_id &
"""
}
Expand All @@ -173,8 +173,8 @@ pipeline {
steps {
sh """
helm uninstall memphis-tests -n memphis-$unique_id
kubectl delete ns memphis-$unique_id &
/usr/sbin/lsof -i :6666,9000 | grep kubectl | awk '{print \"kill -9 \"\$2}' | sh
kubectl delete ns memphis-$unique_id
lsof -i :6666,9000,7770 | grep kubectl | awk '{print \"kill -9 \"\$2}' | sh
"""
}
}
Expand Down Expand Up @@ -226,7 +226,8 @@ pipeline {
when { not {branch 'latest'}}
steps {
sh """
until kubectl get pods --selector=app.kubernetes.io/name=memphis -o=jsonpath="{.items[*].status.phase}" -n memphis | grep -q "Running" ; do sleep 1; done
until kubectl get pods --selector=app.kubernetes.io/name=memphis -o=jsonpath="{.items[*].status.containerStatuses[*].ready}" -n memphis | grep -v "false" ; do sleep 1; done
sleep 5
nohup kubectl port-forward service/memphis 6666:6666 9000:9000 7770:7770 --namespace memphis &
"""
}
Expand Down Expand Up @@ -258,7 +259,7 @@ pipeline {
sh """
mem connect -s localhost -u root -p \$(kubectl get secret memphis-creds -n memphis -o jsonpath="{.data.ROOT_PASSWORD}" | base64 --decode)
mem user add -u staging -p $staging_pass
/usr/sbin/lsof -i :6666,9000 | grep kubectl | awk '{print \"kill -9 \"\$2}' | sh
lsof -i :6666,9000 | grep kubectl | awk '{print \"kill -9 \"\$2}' | sh
"""
}
}
Expand Down

0 comments on commit 3337067

Please sign in to comment.