ci(woodpecker): adding basic file
This commit is contained in:
parent
9a713fae0e
commit
4577695eff
2 changed files with 36 additions and 45 deletions
|
@ -1,45 +0,0 @@
|
|||
include:
|
||||
- template: Security/SAST.gitlab-ci.yml
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- release
|
||||
|
||||
default:
|
||||
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- nix develop --command scripts/build.sh
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- nix develop --command scripts/test.sh
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- ./**/*test-result.xml
|
||||
- ./coverage/Cobertura.xml
|
||||
- ./coverage/Summary.*
|
||||
- ./**/*.nupkg
|
||||
reports:
|
||||
junit:
|
||||
- ./**/*test-result.xml
|
||||
cobertura:
|
||||
- ./coverage/Cobertura.xml
|
||||
|
||||
publish:
|
||||
stage: release
|
||||
before_script:
|
||||
# Set it up so we can push the tag
|
||||
- project_url=$(echo $CI_PROJECT_URL | sed 's/https:\/\///')
|
||||
- git remote set-url origin https://oauth2:$GITLAB_TOKEN@$project_url
|
||||
script:
|
||||
- nix develop --command scripts/release.sh
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
36
.woodpecker.yml
Normal file
36
.woodpecker.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
clone:
|
||||
git:
|
||||
image: woodpeckerci/plugin-git
|
||||
settings:
|
||||
tags: true
|
||||
|
||||
pipeline:
|
||||
build:
|
||||
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
|
||||
commands:
|
||||
- nix develop --command scripts/build.sh
|
||||
when:
|
||||
event: [push, pull_request, tag]
|
||||
tag: v*
|
||||
|
||||
test:
|
||||
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
|
||||
commands:
|
||||
- nix develop --command scripts/test.sh
|
||||
when:
|
||||
event: [push, pull_request]
|
||||
#paths:
|
||||
# - ./**/*test-result.xml
|
||||
# - ./coverage/Cobertura.xml
|
||||
# - ./coverage/Summary.*
|
||||
# - ./**/*.nupkg
|
||||
|
||||
release-main:
|
||||
image: registry.gitlab.com/dmoonfire/nix-flake-docker:latest
|
||||
commands:
|
||||
- nix develop --command scripts/release.sh
|
||||
secrets:
|
||||
- gitea_token
|
||||
when:
|
||||
event: push
|
||||
branch: main
|
Reference in a new issue