More hacking towards user/port/host combinations
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							
								
								
									
										14
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								README.md
									
									
									
									
									
								
							| @ -8,11 +8,17 @@ This is meant to be used as a [Drone plugin](http://plugins.drone.io/). | |||||||
|  |  | ||||||
| ## Settings | ## Settings | ||||||
|  |  | ||||||
| - **stack**: Name of the stack to be deployed | ### With defaults | ||||||
|  |  | ||||||
| - **compose** (default: `compose.yml`): compose file to use for deploying | - **compose** (default: `compose.yml`): compose file to use for deploying | ||||||
| - **host**: SSH-based docker daemon context to deploy against (don't include `ssh://`) | - **host** (default: `swarm.autonomic.zone`): Host to deploy to (don't include `ssh://`) | ||||||
| - **port** (default: `22`): SSH port to connect to | - **port** (default: `222`): SSH port to connect to | ||||||
|  | - **user** (default: `drone`): System user to connect via SSH with | ||||||
|  |  | ||||||
|  | ### Without defaults | ||||||
|  |  | ||||||
| - **deploy_key**: SSH private key part for ssh public key authentication | - **deploy_key**: SSH private key part for ssh public key authentication | ||||||
|  | - **stack**: Name of the stack to be deployed | ||||||
|  |  | ||||||
| ## Example | ## Example | ||||||
|  |  | ||||||
| @ -25,8 +31,6 @@ steps: | |||||||
|     image: decentral1se/stack-ssh-deploy:0.0.1 |     image: decentral1se/stack-ssh-deploy:0.0.1 | ||||||
|     settings: |     settings: | ||||||
|       stack: mystack |       stack: mystack | ||||||
|       host: "drone@swarm.autonomic.zone" |  | ||||||
|       port: 222 |  | ||||||
|       deploy_key: |       deploy_key: | ||||||
|         from_secret: drone_deploy_key |         from_secret: drone_deploy_key | ||||||
| ``` | ``` | ||||||
|  | |||||||
| @ -1,7 +1,9 @@ | |||||||
| #!/bin/sh | #!/bin/sh | ||||||
|  |  | ||||||
| PLUGIN_PORT=${PLUGIN_PORT:-22} |  | ||||||
| PLUGIN_COMPOSE=${PLUGIN_COMPOSE:-compose.yml} | PLUGIN_COMPOSE=${PLUGIN_COMPOSE:-compose.yml} | ||||||
|  | PLUGIN_HOST=${PLUGIN_HOST:-swarm.autonomic.zone} | ||||||
|  | PLUGIN_PORT=${PLUGIN_PORT:-222} | ||||||
|  | PLUGIN_USER=${PLUGIN_USER:-drone} | ||||||
|  |  | ||||||
| load_deploy_key() { | load_deploy_key() { | ||||||
|   mkdir -p "$HOME/.ssh/" |   mkdir -p "$HOME/.ssh/" | ||||||
| @ -17,7 +19,7 @@ run_stack_deploy() { | |||||||
|   echo "--- end docker info ---" |   echo "--- end docker info ---" | ||||||
|  |  | ||||||
|   docker \ |   docker \ | ||||||
|     -H "ssh://$PLUGIN_HOST:$PLUGIN_PORT" \ |     -H "ssh://$PLUGIN_USER@$PLUGIN_HOST:$PLUGIN_PORT" \ | ||||||
|     stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK" |     stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK" | ||||||
| } | } | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user