Compare commits

...

1 Commits

Author SHA1 Message Date
Maurizio Porrato f92bf38c65 Add basic woodpecker pipeline
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/test Pipeline was successful Details
ci/woodpecker/push/build Pipeline was successful Details
2022-08-16 09:10:43 +01:00
3 changed files with 33 additions and 0 deletions

19
.woodpecker/build.yml Normal file
View File

@ -0,0 +1,19 @@
---
matrix:
include:
- GOOS: linux
GOARCH: amd64
pipeline:
build:
image: docker.io/library/golang:1.19
commands:
- go build -ldflags="-s -w" -trimpath -o bin/ubsserver-${GOOS}-${GOARCH} ./cmd/ubsserver
- curl -s --user "$GITEA_ARTIFACT_USERNAME:$GITEA_ARTIFACT_PASSWORD" --upload-file bin/ubsserver-${GOOS}-${GOARCH} https://git.worn.eu/api/packages/${CI_REPO_OWNER}/generic/${CI_REPO_NAME}/${CI_COMMIT_TAG}/ubsserver-${GOOS}-${GOARCH}
secrets:
- gitea_artifact_username
- gitea_artifact_password
when:
event: tag
depends_on:
- lint
- test

6
.woodpecker/lint.yml Normal file
View File

@ -0,0 +1,6 @@
---
pipeline:
lint:
image: docker.io/library/golang:1.19
commands:
- go vet $(go list ./... | grep -v /vendor/)

8
.woodpecker/test.yml Normal file
View File

@ -0,0 +1,8 @@
---
pipeline:
test:
image: docker.io/library/golang:1.19
commands:
- go test -race $(go list ./... | grep -v /vendor/)
depends_on:
- lint