1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-24 08:02:18 +02:00

Release deb, rpm bundles (#405)

This commit is contained in:
Anbraten 2021-10-20 21:55:09 +02:00 committed by GitHub
parent 0812a29163
commit 7725058f03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 67 additions and 13 deletions

View File

@ -62,8 +62,17 @@ pipeline:
commands: commands:
- make release-cli - make release-cli
build-deb-rpm:
group: bundle
image: golang:1.16
commands:
- make bundle
when:
event: [push, tag]
branch: master
publish-server: publish-server:
group: docker group: bundle
image: plugins/docker image: plugins/docker
repo: woodpeckerci/woodpecker-server repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server dockerfile: docker/Dockerfile.server
@ -75,7 +84,7 @@ pipeline:
event: push event: push
publish-server-alpine: publish-server-alpine:
group: docker group: bundle
image: plugins/docker image: plugins/docker
repo: woodpeckerci/woodpecker-server repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server.alpine dockerfile: docker/Dockerfile.server.alpine
@ -87,7 +96,7 @@ pipeline:
event: push event: push
publish-agent: publish-agent:
group: docker group: bundle
image: plugins/docker image: plugins/docker
repo: woodpeckerci/woodpecker-agent repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent dockerfile: docker/Dockerfile.agent
@ -99,7 +108,7 @@ pipeline:
event: push event: push
publish-agent-alpine: publish-agent-alpine:
group: docker group: bundle
image: plugins/docker image: plugins/docker
repo: woodpeckerci/woodpecker-agent repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent.alpine dockerfile: docker/Dockerfile.agent.alpine
@ -133,7 +142,7 @@ pipeline:
event: push event: push
release-server: release-server:
group: docker group: bundle
image: plugins/docker image: plugins/docker
repo: woodpeckerci/woodpecker-server repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server dockerfile: docker/Dockerfile.server
@ -143,7 +152,7 @@ pipeline:
event: tag event: tag
release-server-alpine: release-server-alpine:
group: docker group: bundle
image: plugins/docker image: plugins/docker
repo: woodpeckerci/woodpecker-server repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server.alpine dockerfile: docker/Dockerfile.server.alpine
@ -153,7 +162,7 @@ pipeline:
event: tag event: tag
release-agent: release-agent:
group: docker group: bundle
image: plugins/docker image: plugins/docker
repo: woodpeckerci/woodpecker-agent repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent dockerfile: docker/Dockerfile.agent
@ -163,7 +172,7 @@ pipeline:
event: tag event: tag
release-agent-alpine: release-agent-alpine:
group: docker group: bundle
image: plugins/docker image: plugins/docker
repo: woodpeckerci/woodpecker-agent repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent.alpine dockerfile: docker/Dockerfile.agent.alpine
@ -205,6 +214,8 @@ pipeline:
image: plugins/github-release image: plugins/github-release
files: files:
- dist/*.tar.gz - dist/*.tar.gz
- dist/*.deb
- dist/*.rpm
- dist/checksums.txt - dist/checksums.txt
title: ${DRONE_TAG##v} title: ${DRONE_TAG##v}
secrets: secrets:

View File

@ -122,6 +122,23 @@ release-checksums:
release: release-frontend release-server release-agent release-cli release: release-frontend release-server release-agent release-cli
bundle-prepare:
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v1.10.3
bundle-agent: bundle-prepare
nfpm package --config ./nfpm/nfpm-agent.yml --target ./dist --packager deb
nfpm package --config ./nfpm/nfpm-agent.yml --target ./dist --packager rpm
bundle-server: bundle-prepare
nfpm package --config ./nfpm/nfpm-server.yml --target ./dist --packager deb
nfpm package --config ./nfpm/nfpm-server.yml --target ./dist --packager rpm
bundle-cli: bundle-prepare
nfpm package --config ./nfpm/nfpm-cli.yml --target ./dist --packager deb
nfpm package --config ./nfpm/nfpm-cli.yml --target ./dist --packager rpm
bundle: bundle-agent bundle-server bundle-cli
.PHONY: version .PHONY: version
version: version:
@echo ${VERSION} @echo ${VERSION}

View File

@ -1,6 +1,6 @@
# Downloads # Downloads
## Binaries ## Binaries & DEB, RPM
[Latest release](https://github.com/woodpecker-ci/woodpecker/releases/latest) [Latest release](https://github.com/woodpecker-ci/woodpecker/releases/latest)
@ -24,7 +24,3 @@ docker pull woodpeckerci/woodpecker-agent:latest-alpine
docker pull woodpeckerci/woodpecker-cli:latest docker pull woodpeckerci/woodpecker-cli:latest
docker pull woodpeckerci/woodpecker-cli:latest-alpine docker pull woodpeckerci/woodpecker-cli:latest-alpine
``` ```
## APK, DEB, RPM
TODO

10
nfpm/nfpm-agent.yml Normal file
View File

@ -0,0 +1,10 @@
name: woodpecker-agent
arch: amd64
platform: linux
version: v${WOODPECKER_VERSION}
description: Woodpecker Agent
homepage: https://github.com/woodpecker-ci/woodpecker
license: Apache 2.0
contents:
- src: ./dist/agent/linux_amd64/woodpecker-agent
dst: /usr/local/bin/woodpecker-agent

10
nfpm/nfpm-cli.yml Normal file
View File

@ -0,0 +1,10 @@
name: woodpecker-cli
arch: amd64
platform: linux
version: v${WOODPECKER_VERSION}
description: Woodpecker CLI
homepage: https://github.com/woodpecker-ci/woodpecker
license: Apache 2.0
contents:
- src: ./dist/cli/linux_amd64/woodpecker-cli
dst: /usr/local/bin/woodpecker

10
nfpm/nfpm-server.yml Normal file
View File

@ -0,0 +1,10 @@
name: woodpecker-server
arch: amd64
platform: linux
version: v${WOODPECKER_VERSION}
description: Woodpecker Server
homepage: https://github.com/woodpecker-ci/woodpecker
license: Apache 2.0
contents:
- src: ./dist/server/linux_amd64/woodpecker-server
dst: /usr/local/bin/woodpecker-server