ci: updated config for use with forks & PRs
ci/woodpecker/pr/docs Pipeline was successful Details
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/docker Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details

Jef Roosens 2022-05-05 10:19:22 +02:00
parent 9c3af34118
commit 73633a69b6
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
8 changed files with 39 additions and 57 deletions

View File

@ -25,6 +25,8 @@ pipeline:
# inside the repo # inside the repo
- curl -OL https://git.rustybever.be/Chewing_Bever/vieter/raw/branch/dev/PKGBUILD - curl -OL https://git.rustybever.be/Chewing_Bever/vieter/raw/branch/dev/PKGBUILD
- makepkg -s --noconfirm --needed - makepkg -s --noconfirm --needed
when:
event: push
publish: publish:
image: 'curlimages/curl' image: 'curlimages/curl'
@ -33,3 +35,5 @@ pipeline:
- 'for pkg in $(ls -1 *.pkg*); do curl -XPOST -T "$pkg" -H "X-API-KEY: $VIETER_API_KEY" https://arch.r8r.be/vieter/publish; done' - 'for pkg in $(ls -1 *.pkg*); do curl -XPOST -T "$pkg" -H "X-API-KEY: $VIETER_API_KEY" https://arch.r8r.be/vieter/publish; done'
secrets: secrets:
- vieter_api_key - vieter_api_key
when:
event: push

View File

@ -1,7 +1,7 @@
matrix: matrix:
PLATFORM: PLATFORM:
- linux/amd64 - 'linux/amd64'
- linux/arm64 - 'linux/arm64'
platform: ${PLATFORM} platform: ${PLATFORM}
@ -12,9 +12,9 @@ pipeline:
commands: commands:
- make - make
when: when:
event: push event: [push, pull_request]
branch: branch:
exclude: [main, dev] exclude: [main]
prod: prod:
image: 'chewingbever/vlang:latest' image: 'chewingbever/vlang:latest'
@ -32,7 +32,7 @@ pipeline:
- strip -s pvieter - strip -s pvieter
- du -h pvieter - du -h pvieter
when: when:
event: push event: [push, pull_request]
upload: upload:
image: 'chewingbever/vlang:latest' image: 'chewingbever/vlang:latest'
@ -57,4 +57,4 @@ pipeline:
-H "Authorization: AWS $S3_USERNAME:$SIGNATURE" -H "Authorization: AWS $S3_USERNAME:$SIGNATURE"
https://$URL$OBJ_PATH https://$URL$OBJ_PATH
when: when:
event: push event: [push, pull_request]

View File

@ -1,29 +0,0 @@
# These builds are not important for the project, but might be valuable for
# fixing bugs in the V compiler.
platform: linux/amd64
branches:
exclude: [master, dev]
pipeline:
autofree:
image: 'chewingbever/vlang:latest'
pull: true
group: 'build'
commands:
- make autofree
- readelf -d afvieter
- du -h afvieter
when:
event: push
skip-unused:
image: 'chewingbever/vlang:latest'
pull: true
group: 'build'
commands:
- make skip-unused
- readelf -d suvieter
- du -h suvieter
when:
event: push

View File

@ -1,4 +1,4 @@
branches: 'dev' branches: [ 'dev' ]
platform: 'linux/amd64' platform: 'linux/amd64'
depends_on: depends_on:
- 'docker' - 'docker'
@ -14,3 +14,5 @@ pipeline:
commands: commands:
- 'curl -XPOST -s --fail $WEBHOOK_APP' - 'curl -XPOST -s --fail $WEBHOOK_APP'
- 'curl -XPOST -s --fail $WEBHOOK_CRON' - 'curl -XPOST -s --fail $WEBHOOK_CRON'
when:
event: push

View File

@ -1,30 +1,34 @@
branches: [main, dev] branches: [main, dev]
platform: linux/amd64 platform: 'linux/amd64'
depends_on: depends_on:
- build - build
pipeline: pipeline:
dev: dev:
image: woodpeckerci/plugin-docker-buildx image: 'woodpeckerci/plugin-docker-buildx'
secrets: [ docker_username, docker_password ] secrets:
- 'docker_username'
- 'docker_password'
settings: settings:
repo: chewingbever/vieter repo: 'chewingbever/vieter'
tag: dev tag: 'dev'
platforms: [ linux/arm64/v8, linux/amd64 ] platforms: [ 'linux/arm64/v8', 'linux/amd64' ]
build_args_from_env: build_args_from_env:
- CI_COMMIT_SHA - 'CI_COMMIT_SHA'
when: when:
event: push event: push
branch: dev branch: dev
release: release:
image: woodpeckerci/plugin-docker-buildx image: 'woodpeckerci/plugin-docker-buildx'
secrets: [ docker_username, docker_password ] secrets:
- 'docker_username'
- 'docker_password'
settings: settings:
repo: chewingbever/vieter repo: 'chewingbever/vieter'
auto_tag: true auto_tag: true
platforms: [ linux/arm64/v8, linux/amd64 ] platforms: [ 'linux/arm64/v8', 'linux/amd64' ]
build_args_from_env: build_args_from_env:
- CI_COMMIT_SHA - 'CI_COMMIT_SHA'
when: when:
event: tag event: tag

View File

@ -1,6 +1,5 @@
# Yeah so this only works on tags so we'll worry about this later platform: 'linux/amd64'
platform: linux/amd64 branches: [ 'main' ]
branches: main
depends_on: depends_on:
- build - build

View File

@ -1,7 +1,7 @@
# These checks already get performed on the feature branches # These checks already get performed on the feature branches
branches: branches:
exclude: [ main, dev ] exclude: [ main ]
platform: linux/amd64 platform: 'linux/amd64'
pipeline: pipeline:
lint: lint:
@ -9,3 +9,5 @@ pipeline:
pull: true pull: true
commands: commands:
- make lint - make lint
when:
event: [ push, pull_request ]

View File

@ -1,10 +1,10 @@
matrix: matrix:
PLATFORM: PLATFORM:
- linux/amd64 - 'linux/amd64'
- linux/arm64 - 'linux/arm64'
branches: branches:
exclude: [main, dev] exclude: [ main ]
platform: ${PLATFORM} platform: ${PLATFORM}
pipeline: pipeline:
@ -14,4 +14,4 @@ pipeline:
commands: commands:
- make test - make test
when: when:
event: push event: [push, pull_request]