Skip to content

Commit

Permalink
Partial-Backport of pipeline from current master (#1167)
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 authored Sep 4, 2022
1 parent 98dae07 commit bffdc0a
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 183 deletions.
114 changes: 44 additions & 70 deletions .woodpecker/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,120 +2,94 @@ depends_on:
- test
- web

variables:
- &golang_image 'golang:1.18'
- &node_image 'node:16-alpine'
- &when_path
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"
# go source code
- "**/*.go"
- "go.*"
# web source code
- "web/**"

pipeline:
build-web:
image: node:16-alpine
group: prepare
image: *node_image
commands:
- cd web/
- yarn install --frozen-lockfile
- yarn build
when:
path:
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"
# go source code
- "**/*.go"
- "go.*"
# web source code
- "web/**"
path: *when_path

vendor:
group: prepare
image: *golang_image
commands:
- go mod vendor
when:
path: *when_path

build-server:
group: build
image: golang:1.18
image: *golang_image
commands:
- make release-server
when:
path:
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"
# go source code
- "**/*.go"
- "go.*"
# web source code
- "web/**"
path: *when_path

build-agent:
group: build
image: golang:1.18
image: *golang_image
commands:
- make release-agent
when:
path:
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"
# go source code
- "**/*.go"
- "go.*"
# web source code
- "web/**"
path: *when_path

build-cli:
group: build
image: golang:1.18
image: *golang_image
commands:
- make release-cli
when:
path:
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"
# go source code
- "**/*.go"
- "go.*"
# web source code
- "web/**"
path: *when_path

build-deb-rpm:
group: bundle
image: golang:1.18
image: *golang_image
commands:
- make bundle
when:
path:
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"
# go source code
- "**/*.go"
- "go.*"
# web source code
- "web/**"
path: *when_path

build-tarball:
group: bundle
image: *golang_image
commands:
- make release-tarball
when:
path: *when_path

checksums:
image: golang:1.18
image: *golang_image
commands:
- make release-checksums
when:
path:
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"
# go source code
- "**/*.go"
- "go.*"
# web source code
- "web/**"
path: *when_path

# TODO: upload build artifacts for pushes to ${CI_REPO_DEFAULT_BRANCH}

release-dryrun:
image: golang:1.18
image: *golang_image
commands:
- ls -la dist/*.*
- cat dist/checksums.txt
when:
path:
# related config files
- ".woodpecker/binaries.yml"
- "nfpm/*.yml"
# go source code
- "**/*.go"
- "go.*"
# web source code
- "web/**"
path: *when_path

release:
image: plugins/github-release
Expand Down
Loading

0 comments on commit bffdc0a

Please sign in to comment.