Mount the output folder instead of doing SCP transfers
This commit is contained in:
		
							
								
								
									
										54
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										54
									
								
								.drone.yml
									
									
									
									
									
								
							@@ -12,41 +12,29 @@ steps:
 | 
				
			|||||||
  image: corentinaltepe/doxygen
 | 
					  image: corentinaltepe/doxygen
 | 
				
			||||||
  commands:
 | 
					  commands:
 | 
				
			||||||
  - doxygen
 | 
					  - doxygen
 | 
				
			||||||
- name: prepare
 | 
					 | 
				
			||||||
  image: alpine
 | 
					 | 
				
			||||||
  commands:
 | 
					 | 
				
			||||||
  - mkdir output
 | 
					 | 
				
			||||||
  - mv .pio/build/max7456board/firmware.hex output/firmware.hex
 | 
					 | 
				
			||||||
  - mv docs/html output/docs/
 | 
					 | 
				
			||||||
  - mv StaticCodeAnalysisReport.txt output/
 | 
					 | 
				
			||||||
- name: release-dev
 | 
					- name: release-dev
 | 
				
			||||||
  image: appleboy/drone-scp
 | 
					  image: alpine
 | 
				
			||||||
  settings:
 | 
					  volumes:
 | 
				
			||||||
    host: jcktrue.dk
 | 
					  - name: output
 | 
				
			||||||
    username: 
 | 
					    path: /output
 | 
				
			||||||
      from_secret: DRONE_USERNAME_SCP
 | 
					  commands:
 | 
				
			||||||
    password:
 | 
					  - mkdir /output/dev/
 | 
				
			||||||
      from_secret: DRONE_PASSWORD_SCP
 | 
					  - cp .pio/build/max7456board/firmware.hex /output/dev/firmware.hex
 | 
				
			||||||
    source:
 | 
					  - cp -r docs/html /output/dev/
 | 
				
			||||||
      - output/**
 | 
					  - cp StaticCodeAnalysisReport.txt /output/dev/
 | 
				
			||||||
    strip_components: 1
 | 
					 | 
				
			||||||
    target:
 | 
					 | 
				
			||||||
      - /home/jct/apps/http/share.jcktrue.dk/${DRONE_REPO_NAME}/dev
 | 
					 | 
				
			||||||
    rm: true
 | 
					 | 
				
			||||||
- name: release-tag
 | 
					- name: release-tag
 | 
				
			||||||
  image: appleboy/drone-scp
 | 
					  image: alpine
 | 
				
			||||||
  settings:
 | 
					  volumes:
 | 
				
			||||||
    host: jcktrue.dk
 | 
					  - name: output
 | 
				
			||||||
    username: 
 | 
					    path: /output
 | 
				
			||||||
      from_secret: DRONE_USERNAME_SCP
 | 
					  commands:
 | 
				
			||||||
    password:
 | 
					  - cp -r /output/dev/ /output/${DRONE_SEMVER}/
 | 
				
			||||||
      from_secret: DRONE_PASSWORD_SCP
 | 
					 | 
				
			||||||
    source:
 | 
					 | 
				
			||||||
      - output/**
 | 
					 | 
				
			||||||
    strip_components: 1
 | 
					 | 
				
			||||||
    target:
 | 
					 | 
				
			||||||
      - /home/jct/apps/http/share.jcktrue.dk/${DRONE_REPO_NAME}/${DRONE_SEMVER}
 | 
					 | 
				
			||||||
    rm: true
 | 
					 | 
				
			||||||
  when:
 | 
					  when:
 | 
				
			||||||
    event:
 | 
					    event:
 | 
				
			||||||
    - tag
 | 
					    - tag
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					volumes:
 | 
				
			||||||
 | 
					- name: output
 | 
				
			||||||
 | 
					  host:
 | 
				
			||||||
 | 
					    path: /home/jct/apps/http/share.jcktrue.dk/${DRONE_REPO_NAME}/
 | 
				
			||||||
		Reference in New Issue
	
	Block a user