feat(ci)!: Switch to woodpecker
This commit is contained in:
		
							
								
								
									
										62
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										62
									
								
								.drone.yml
									
									
									
									
									
								
							| @@ -1,62 +0,0 @@ | ||||
| --- | ||||
| kind: secret | ||||
| name: gitea_token | ||||
| get: | ||||
|   path: odit-git-bot | ||||
|   name: apikey | ||||
|  | ||||
| --- | ||||
| kind: secret | ||||
| name: ci_token | ||||
| get: | ||||
|   path: odit-ci-bot | ||||
|   name: apikey | ||||
|  | ||||
| --- | ||||
| kind: secret | ||||
| name: npm_url | ||||
| get: | ||||
|   path: odit-npm-cache | ||||
|   name: url | ||||
|  | ||||
| --- | ||||
| kind: pipeline | ||||
| type: kubernetes | ||||
| name: build:tag | ||||
| steps: | ||||
|   - name: run build | ||||
|     image: registry.odit.services/hub/library/node:19.5.0-alpine3.16 | ||||
|     commands: | ||||
|       - apk add git zip -f | ||||
|       - npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8 | ||||
|       - pnpm i | ||||
|       - pnpm build | ||||
|       - mkdir out | ||||
|       - zip -r out/dist.zip dist | ||||
|     environment: | ||||
|       NPM_REGISTRY_URL: | ||||
|         from_secret: npm_url | ||||
|   - name: gitea add packages to build | ||||
|     image: plugins/gitea-release | ||||
|     settings: | ||||
|       api_key: | ||||
|         from_secret: gitea_token | ||||
|       base_url: https://git.odit.services | ||||
|       files: out/* | ||||
|       title: Release ${DRONE_TAG} | ||||
|       checksum: | ||||
|         - md5 | ||||
|         - sha1 | ||||
|         - sha256 | ||||
|         - sha512 | ||||
|         - adler32 | ||||
|         - crc32 | ||||
|   - name: trigger electron build | ||||
|     image: idcooldi/drone-webhook | ||||
|     settings: | ||||
|       urls: https://ci.odit.services/api/repos/lfk/scanclient-electron/builds?SOURCE_TAG=${DRONE_TAG} | ||||
|       bearer: | ||||
|         from_secret: ci_token | ||||
| trigger: | ||||
|   event: | ||||
|     - tag | ||||
							
								
								
									
										40
									
								
								.woodpecker/release.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								.woodpecker/release.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | ||||
| steps: | ||||
|   - name: run build | ||||
|     image: registry.odit.services/hub/library/node:19.5.0-alpine3.16 | ||||
|     commands: | ||||
|       - apk add git zip -f | ||||
|       - npm config set registry $NPM_REGISTRY_URL && npm i -g pnpm@8 | ||||
|       - pnpm i | ||||
|       - pnpm build | ||||
|       - mkdir out | ||||
|       - zip -r out/dist.zip dist | ||||
|     secrets: | ||||
|       - source: odit-npm-cache-url | ||||
|         target: NPM_REGISTRY_URL | ||||
|   - name: gitea add packages to build | ||||
|     image: woodpeckerci/plugin-gitea-release | ||||
|     settings: | ||||
|       api_key: | ||||
|         from_secret: odit-git-bot-apikey | ||||
|       base_url: https://git.odit.services | ||||
|       files: out/* | ||||
|       title: Release ${DRONE_TAG} | ||||
|       checksum: | ||||
|         - md5 | ||||
|         - sha1 | ||||
|         - sha256 | ||||
|         - sha512 | ||||
|         - adler32 | ||||
|         - crc32 | ||||
|   - name: trigger electron build | ||||
|     image: woodpeckerci/plugin-trigger | ||||
|     settings: | ||||
|       repositories: | ||||
|       - lfk/scanclient-electron | ||||
|       params: | ||||
|         - "SOURCE_TAG=${DRONE_TAG}" | ||||
|       token: | ||||
|         from_secret: odit-ci-bot-apikey | ||||
|  | ||||
| when: | ||||
|   event: tag | ||||
		Reference in New Issue
	
	Block a user