Configure CI (#2)
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			Reviewed-on: #2 Co-authored-by: Pierre HUBERT <pierre.git@communiquons.org> Co-committed-by: Pierre HUBERT <pierre.git@communiquons.org>
This commit is contained in:
		
							
								
								
									
										52
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,52 @@
 | 
			
		||||
---
 | 
			
		||||
kind: pipeline
 | 
			
		||||
type: docker
 | 
			
		||||
name: default
 | 
			
		||||
 | 
			
		||||
steps:
 | 
			
		||||
- name: web_build
 | 
			
		||||
  image: node:20
 | 
			
		||||
  volumes:
 | 
			
		||||
    - name: web_app
 | 
			
		||||
      path: /tmp/web_build
 | 
			
		||||
  commands:
 | 
			
		||||
  - cd virtweb_frontend
 | 
			
		||||
  - npm install
 | 
			
		||||
  - npm run build
 | 
			
		||||
  - mv dist /tmp/web_build
 | 
			
		||||
 | 
			
		||||
- name: backend_check
 | 
			
		||||
  image: rust
 | 
			
		||||
  volumes:
 | 
			
		||||
  - name: rust_registry
 | 
			
		||||
    path: /usr/local/cargo/registry
 | 
			
		||||
  commands:
 | 
			
		||||
  - apt update && apt install -y libvirt-dev
 | 
			
		||||
  - rustup component add clippy
 | 
			
		||||
  - cd virtweb_backend
 | 
			
		||||
  - cargo clippy -- -D warnings
 | 
			
		||||
  - cargo test
 | 
			
		||||
 | 
			
		||||
- name: backend_compile
 | 
			
		||||
  image: rust
 | 
			
		||||
  volumes:
 | 
			
		||||
  - name: rust_registry
 | 
			
		||||
    path: /usr/local/cargo/registry
 | 
			
		||||
  - name: web_app
 | 
			
		||||
    path: /tmp/web_build
 | 
			
		||||
  depends_on:
 | 
			
		||||
  - backend_check
 | 
			
		||||
  - web_build
 | 
			
		||||
  commands:
 | 
			
		||||
  - apt update && apt install -y libvirt-dev
 | 
			
		||||
  - cd virtweb_backend
 | 
			
		||||
  - mv /tmp/web_build/dist static
 | 
			
		||||
  - cargo build --release
 | 
			
		||||
  - ls -lah target/release/virtweb_backend
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
volumes:
 | 
			
		||||
- name: rust_registry
 | 
			
		||||
  temp: {}
 | 
			
		||||
- name: web_app
 | 
			
		||||
  temp: {}
 | 
			
		||||
		Reference in New Issue
	
	Block a user