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