File tree Expand file tree Collapse file tree 4 files changed +14
-10
lines changed
deployment/kubernetes/script Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 18181919 - name : Build and push CCNP images
2020 run : |
21- sudo ./container/build.sh -r gar-registry.caas.intel.com/cpio -g latest -c ccnp-server ccnp-example ccnp-device-plugin
21+ sudo ./container/build.sh -r gar-registry.caas.intel.com/cpio -g latest
2222 - name : Deploy CCNP server
2323 run : |
2424 sudo ./deployment/kubernetes/script/deploy-ccnp.sh -r gar-registry.caas.intel.com/cpio -g latest -d
Original file line number Diff line number Diff line change @@ -165,7 +165,9 @@ function publish_images {
165165 if [[ " $container " == " all" ]]; then
166166 for item in " ${all_containers[@]} "
167167 do
168+ if [[ ${item} != " pccs" && ${item} != " qgs" ]] || [[ ${item} == " pccs" && ${pccs} == true ]] || [[ ${item} == " qgs" && ${qgs} == true ]] ; then
168169 publish_a_image " $item "
170+ fi
169171 done
170172 else
171173 publish_a_image " $container "
Original file line number Diff line number Diff line change @@ -34,15 +34,17 @@ if [[ -n "$tag" ]];then
3434 sed -i " s#${DEFAULT_TAG} #${tag} #g" $TEMP_MANIFEST_FILE
3535fi
3636
37- if [ $DELETE_DEPLOYMENT == true ]
38- then
37+ # Delete old pod if it exists
38+ OLD_POD_NAME=$( kubectl get po -n ccnp | grep ccnp-example | grep Running | awk ' { print $1 }' )
39+
40+ if [[ $DELETE_DEPLOYMENT == true ]] && [[ -n " $OLD_POD_NAME " ]]; then
3941 echo " ==> Cleaning up ccnp-example deployment"
40- kubectl delete -f $TEMP_MANIFEST_FILE
42+ kubectl delete deployment ccnp-example -n ccnp
4143fi
4244
4345echo " ==> Creating ccnp-example deployment"
4446kubectl apply -f $TEMP_MANIFEST_FILE
45- for i in {1..5 }
47+ for i in {1..10 }
4648do
4749 POD_NAME=$( kubectl get po -n ccnp | grep ccnp-example | grep Running | awk ' { print $1 }' )
4850 if [[ -z " $POD_NAME " ]]
Original file line number Diff line number Diff line change 55
66set -o errexit
77
8- PY_WORK_DIR=' test /ci-test/py-test'
8+ PY_WORK_DIR=' /run/ccnp /ci-test/py-test'
99
1010for i in {1..3}
1111do
12- POD_NAME=$( kubectl get po | grep ccnp-example | grep Running | awk ' { print $1 }' )
12+ POD_NAME=$( kubectl get po -n ccnp | grep ccnp-example | grep Running | awk ' { print $1 }' )
1313 if [[ -z " $POD_NAME " ]]
1414 then
1515 sleep 2
2727
2828# Run python tests
2929echo " --------> Run python test........."
30- kubectl exec -it " $POD_NAME " -- pytest -v ${PY_WORK_DIR}
30+ kubectl exec -it " $POD_NAME " -n ccnp - - pytest -v ${PY_WORK_DIR}
3131
3232# Run go tests
3333echo " --------> Run go test........."
34- kubectl exec -it " $POD_NAME " -- ./go-sdk-example
34+ kubectl exec -it " $POD_NAME " -n ccnp - - ./go-sdk-example
3535
3636# Run rust tests
3737echo " --------> Run rust test........."
38- kubectl exec -it " $POD_NAME " -- ./rust-sdk-example
38+ kubectl exec -it " $POD_NAME " -n ccnp - - ./rust-sdk-example
You can’t perform that action at this time.
0 commit comments