36 lines
		
	
	
		
			670 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			670 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| kind: pipeline
 | |
| type: docker
 | |
| name: "Backend"
 | |
| 
 | |
| steps:
 | |
| - name: test
 | |
|   image: mcr.microsoft.com/dotnet/sdk:8.0
 | |
|   commands:
 | |
|   - dotnet build
 | |
|   - dotnet test
 | |
| 
 | |
| - name: publish
 | |
|   image: plugins/docker
 | |
|   settings:
 | |
|     username: prtsie
 | |
|     password:
 | |
|       from_secret: docker_pass
 | |
|     dockerfile: ApplicationLayer/Dockerfile
 | |
|     context: ./
 | |
|     registry: git.prtsie.ru
 | |
|     repo: git.prtsie.ru/prtsie/schengen-visa-${DRONE_BRANCH}
 | |
|     tags:
 | |
|     - latest
 | |
| 
 | |
| - name: deploy
 | |
|   image: appleboy/drone-ssh
 | |
|   settings:
 | |
|     script_stop: true
 | |
|     host: prtsie.ru:1337
 | |
|     username: deploy
 | |
|     key:
 | |
|       from_secret: ssh_key
 | |
|     script:
 | |
|       - cd /deploy
 | |
|       - ./deploy.sh ${DRONE_BRANCH}
 |