mirror of
				https://github.com/honestbee/drone-kubernetes.git
				synced 2025-11-04 03:08:04 +00:00 
			
		
		
		
	Add loop on containers
This commit is contained in:
		
							parent
							
								
									880302ffbe
								
							
						
					
					
						commit
						82c3b38c42
					
				
					 1 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -29,9 +29,12 @@ kubectl config set-context default --cluster=default --user=default
 | 
			
		|||
kubectl config use-context default
 | 
			
		||||
 | 
			
		||||
# kubectl version
 | 
			
		||||
IFS=',' read -r -a DEPLOYMENTS <<< "$PLUGIN_DEPLOYMENT"
 | 
			
		||||
IFS=',' read -r -a DEPLOYMENTS <<< "${PLUGIN_DEPLOYMENT}"
 | 
			
		||||
IFS=',' read -r -a CONTAINERS <<< "${PLUGIN_CONTAINER}"
 | 
			
		||||
for DEPLOY in ${DEPLOYMENTS[@]}; do
 | 
			
		||||
  echo Deploying to $KUBERNETES_SERVER
 | 
			
		||||
  kubectl -n ${PLUGIN_NAMESPACE} set image deployment/${DEPLOY} \
 | 
			
		||||
    ${PLUGIN_CONTAINER}=${PLUGIN_REPO}:${PLUGIN_TAG}
 | 
			
		||||
  for CONTAINER in ${CONTAINERS[@]}; do
 | 
			
		||||
    kubectl -n ${PLUGIN_NAMESPACE} set image deployment/${DEPLOY} \
 | 
			
		||||
      ${CONTAINER}=${PLUGIN_REPO}:${PLUGIN_TAG}
 | 
			
		||||
  done
 | 
			
		||||
done
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue