ci: add woodpecker
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Marvin Preuss 2023-03-30 07:36:08 +00:00
parent a134755fab
commit e44e13756b
3 changed files with 36 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
report.xml report.xml
coverage.out coverage.out
*.xlsx *.xlsx
dist/

24
.woodpecker.yml Normal file
View File

@ -0,0 +1,24 @@
pipeline:
earthly:
image: earthly/earthly:v0.6.30
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- FORCE_COLOR=1
- EARTHLY_EXEC_CMD="/bin/sh"
commands:
- earthly bootstrap
- earthly --ci +ci
when:
event: tag
earthly-release:
image: earthly/earthly:v0.6.30
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- FORCE_COLOR=1
- EARTHLY_EXEC_CMD="/bin/sh"
secrets: [GITEA_TOKEN]
commands:
- earthly bootstrap
- earthly --ci --secret GITEA_TOKEN=$GITEA_TOKEN +ci +release

View File

@ -15,7 +15,7 @@ SAVE_CODE:
ci: ci:
BUILD +lint BUILD +lint
BUILD +test BUILD +test
# BUILD +release-dev BUILD +build
code: code:
COPY go.mod go.sum ./ COPY go.mod go.sum ./
@ -38,7 +38,6 @@ install-deps:
SAVE ARTIFACT /go/bin gobin SAVE ARTIFACT /go/bin gobin
SAVE ARTIFACT /lib lib SAVE ARTIFACT /lib lib
SAVE ARTIFACT /usr usr SAVE ARTIFACT /usr usr
SAVE IMAGE --push git.wobcom.de:5050/smartmetering/mbuslight:cache-deps
deps: deps:
COPY +install-deps/gobin /go/bin COPY +install-deps/gobin /go/bin
@ -79,3 +78,13 @@ tidy:
SAVE ARTIFACT go.mod AS LOCAL go.mod SAVE ARTIFACT go.mod AS LOCAL go.mod
SAVE ARTIFACT go.sum AS LOCAL go.sum SAVE ARTIFACT go.sum AS LOCAL go.sum
SAVE ARTIFACT vendor AS LOCAL vendor SAVE ARTIFACT vendor AS LOCAL vendor
build:
FROM +deps
COPY . .
RUN goreleaser build --snapshot --clean
release:
FROM +deps
COPY . .
RUN --secret GITEA_TOKEN goreleaser release