-NEXUS_POD_NAME=$(kubectl get pod -n $NAMESPACE | grep nexus | grep ContainerCreating | awk '{print $1}')
-
-
-
-echo "Waiting Nexus to be ready."
-echo " "
-
-sleep 10
-
-IS_NEXUS_READY=$(kubectl logs -n $NAMESPACE $NEXUS_POD_NAME | grep "Started Sonatype Nexus OSS")
-
-COUNTER=1
-while [[ -z $IS_NEXUS_READY ]]; do
- echo -e "\033[2AWaiting Nexus to be ready."
- echo -e "\033[2K"
- PROGRESS=$(printf "%0.s-" $(seq 1 $COUNTER))
- echo -e "\033[1A$PROGRESS"
-
-
- COUNTER=$((COUNTER+1))
- if [ $COUNTER -gt 5 ]; then
- COUNTER=1
- fi
-
- IS_NEXUS_READY=$(kubectl logs -n $NAMESPACE $NEXUS_POD_NAME | grep "Started Sonatype Nexus OSS")
-
- sleep 5
-done
-
-echo $IS_NEXUS_READY
-
-
-DOCKERPORT=$(cat $DIR/../helm/templates/deployment.yaml | awk '/.*- name: docker.*/{getline; print $2}')
-
-
-DOCKERREPOSCRIPT="{\"name\":\"create_docker_repo\",\
- \"type\":\"groovy\",\
- \"content\":\"repository.createDockerHosted('docker.snapshot',\
- $DOCKERPORT, null, 'default', false, true)\"}"
-
-echo $DOCKERREPOSCRIPT
-
-# This line uses the default admin password
-curl -u admin:admin123 -X POST -H "Content-Type: application/json" --data "$DOCKERREPOSCRIPT" http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script
-
-curl -u admin:admin123 -X POST -H 'Content-Type: text/plain' -H 'Accept: application/json' http://nexus.$HOSTPOSTFIX:$INGRESS_PORT_NEXUS/service/rest/v1/script/create_docker_repo/run
-
-
-