83 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			83 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| kind: pipeline
 | |
| type: docker
 | |
| name: default
 | |
| 
 | |
| workspace:
 | |
|   path: /app
 | |
| 
 | |
| clone:
 | |
|   disable: true
 | |
| 
 | |
| steps:
 | |
|   - name: clone
 | |
|     image: alpine/git
 | |
|     network_mode: host
 | |
|     commands:
 | |
|       - git clone --branch ${DRONE_TAG} --depth 1 http://192.168.110.199:3000/fengsen/4.0.git .
 | |
| 
 | |
|   - name: build-linux
 | |
|     image: docker.1ms.run/node:18.20.5
 | |
|     volumes:
 | |
|       - name: node_modules-linux
 | |
|         path: /app/node_modules
 | |
| 
 | |
|       - name: electron-builder-cache-linux
 | |
|         path: /root/.cache/
 | |
| 
 | |
|       - name: bin
 | |
|         path: /app/bin
 | |
| 
 | |
|     commands:
 | |
|       - npm config set registry https://registry.npmmirror.com/
 | |
|       - npm install
 | |
|       - umask 0000
 | |
|       - npm run build:linux64
 | |
|       - export DRONE_TAG=${DRONE_TAG:-$(cat /proc/sys/kernel/random/uuid)}
 | |
|       - /app/bin/cpl "$(find build/ -name "*.deb")" ${DRONE_TAG}
 | |
| 
 | |
|   - name: build-windows-wine
 | |
|     image: docker.1ms.run/electronuserland/builder:wine
 | |
|     volumes:
 | |
|       - name: node_modules-windows
 | |
|         path: /app/node_modulesw
 | |
| 
 | |
|       - name: electron-builder-cache-windows
 | |
|         path: /root/.cache/
 | |
| 
 | |
|       - name: bin
 | |
|         path: /app/bin
 | |
| 
 | |
|     commands:
 | |
|       - npm config set registry https://registry.npmmirror.com/
 | |
|       - npm install
 | |
|       - npm run build:win64
 | |
|       - export DRONE_TAG=${DRONE_TAG:-$(cat /proc/sys/kernel/random/uuid)}
 | |
|       - /app/bin/cpl "$(find build/ -maxdepth 1 -name "*.exe")" ${DRONE_TAG}
 | |
| 
 | |
| trigger:
 | |
|   event:
 | |
|     - tag
 | |
|   ref:
 | |
|     - refs/tags/**
 | |
| 
 | |
| volumes:
 | |
|   # linux
 | |
|   - name: node_modules-linux
 | |
|     host:
 | |
|       path: /home/abc/drone/yj/ci-cache/linux/node_modules
 | |
|   - name: electron-builder-cache-linux
 | |
|     host:
 | |
|       path: /home/abc/drone/yj/ci-cache/linux/cache
 | |
| 
 | |
|   # windows
 | |
|   - name: node_modules-windows
 | |
|     host:
 | |
|       path: /home/abc/drone/yj/ci-cache/windows/node_modules
 | |
|   - name: electron-builder-cache-windows
 | |
|     host:
 | |
|       path: /home/abc/drone/yj/ci-cache/windows/cache
 | |
| 
 | |
|   - name: bin
 | |
|     host:
 | |
|       path: /home/abc/drone/bin
 |