|  |  | @ -1,7 +1,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | --- |  |  |  | --- | 
			
		
	
		
		
			
				
					
					|  |  |  | kind: pipeline |  |  |  | kind: pipeline | 
			
		
	
		
		
			
				
					
					|  |  |  | type: docker |  |  |  | type: docker | 
			
		
	
		
		
			
				
					
					|  |  |  | name: Deploy Bot |  |  |  | name: Deploy Tox Bot | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | clone: |  |  |  | clone: | 
			
		
	
		
		
			
				
					
					|  |  |  |   disable: true |  |  |  |   disable: true | 
			
		
	
	
		
		
			
				
					|  |  | @ -29,6 +29,8 @@ steps: | 
			
		
	
		
		
			
				
					
					|  |  |  |       command_timeout: 2m |  |  |  |       command_timeout: 2m | 
			
		
	
		
		
			
				
					
					|  |  |  |       script: |  |  |  |       script: | 
			
		
	
		
		
			
				
					
					|  |  |  |         - if [ ! -d ~/tox_source ]; then mkdir ~/tox_source; fi |  |  |  |         - if [ ! -d ~/tox_source ]; then mkdir ~/tox_source; fi | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         - if [ ! -d ~/tox_bot ]; then mkdir ~/tox_bot; fi | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         - if [ -f ~/tox_bot/echo_bot ]; then rm ~/tox_bot/echo_bot; fi        | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   - name: copy files |  |  |  |   - name: copy files | 
			
		
	
		
		
			
				
					
					|  |  |  |     image: appleboy/drone-scp |  |  |  |     image: appleboy/drone-scp | 
			
		
	
	
		
		
			
				
					|  |  | @ -53,22 +55,14 @@ steps: | 
			
		
	
		
		
			
				
					
					|  |  |  |       port: 22 |  |  |  |       port: 22 | 
			
		
	
		
		
			
				
					
					|  |  |  |       command_timeout: 2m |  |  |  |       command_timeout: 2m | 
			
		
	
		
		
			
				
					
					|  |  |  |       script: |  |  |  |       script: | 
			
		
	
		
		
			
				
					
					|  |  |  |         - tar -xvzf dtox.tar.gz -C ~/tox_source |  |  |  |         - tar -xvzf tox.tar.gz -C ~/tox_source | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         - ls -la ~/tox_source |  |  |  |         - ls -la ~/tox_source | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         - cd ~/tox_source/src | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         - gcc -o echo_bot tox_bot.c commands.c misc.c -std=gnu99 -lsodium -I /usr/local/include/ -ltoxcore -lconfig | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         - cp echo_bot ~/tox_bot | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         - cp ../{bot.cfg,masterkeys.txt} ~/tox_bot | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         - ls -lta ~/tox_bot | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         - rm -rfd ~/tox_source | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         - rm ~/tox.tar.gz | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | # server: |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | #   host: 11.1.1.21 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | #   user: tox |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | #   ssh_key: |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | #     from_secret: rsa_key |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   # - name: build |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   #   commands: |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   #     - cd src/ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   #     - gcc -o echo_bot tox_bot.c commands.c misc.c -std=gnu99 -lsodium -I /usr/local/include/ -ltoxcore -lconfig |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   #     - mkdir ~/tox_bot  |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   #     - cp echo_bot ~/tox_bot |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   #     - cp ../{bot.cfg,masterkeys.txt} ~/tox_bot |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   #     - ls -lta ~/ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   #     - sleep 15 |  |  |  |  | 
			
		
	
	
		
		
			
				
					|  |  | 
 |