Compare commits
2 commits
c8bbd4f260
...
bbea68443f
Author | SHA1 | Date | |
---|---|---|---|
bbea68443f | |||
5e9884ccad |
3 changed files with 26 additions and 47 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -23,3 +23,5 @@ go.work
|
|||
|
||||
# Go build file
|
||||
**/build/
|
||||
|
||||
.vscode
|
|
@ -1,23 +1,5 @@
|
|||
---
|
||||
# Test building the code and docker image
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: test-build
|
||||
|
||||
steps:
|
||||
- name: go-test
|
||||
image: golang
|
||||
commands:
|
||||
- make -C polyculeconnect test
|
||||
depends_on:
|
||||
|
||||
- name: go-build
|
||||
image: golang
|
||||
commands:
|
||||
- make -C polyculeconnect build
|
||||
depends_on:
|
||||
|
||||
- name: docker-build-only
|
||||
docker-build-only:
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
privileged: true
|
||||
settings:
|
||||
|
@ -27,13 +9,14 @@ steps:
|
|||
platforms:
|
||||
- linux/amd64
|
||||
# - linux/arm64
|
||||
depends_on:
|
||||
when:
|
||||
- event: pull_request
|
||||
repo: polyculeconnect/polyculeconnect
|
||||
- event: push
|
||||
branch:
|
||||
exclude:
|
||||
- main
|
||||
exclude: [main]
|
||||
|
||||
- name: docker-build-push
|
||||
docker-build-push:
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
privileged: true
|
||||
settings:
|
||||
|
@ -47,28 +30,11 @@ steps:
|
|||
platforms:
|
||||
- linux/amd64
|
||||
# - linux/arm64
|
||||
depends_on:
|
||||
- go-test
|
||||
- go-build
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
- event: push
|
||||
branch: main
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
|
||||
---
|
||||
# On a tag, only build the related docker image
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: tag-release
|
||||
depends_on:
|
||||
- test-build
|
||||
|
||||
steps:
|
||||
- name: docker-push-tag
|
||||
docker-push-tag:
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
privileged: true
|
||||
settings:
|
||||
|
@ -82,7 +48,8 @@ steps:
|
|||
from_secret: git_username
|
||||
password:
|
||||
from_secret: git_password
|
||||
when:
|
||||
- event: tag
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
depends_on:
|
||||
- test
|
10
.woodpecker/test.yml
Normal file
10
.woodpecker/test.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
steps:
|
||||
go-test:
|
||||
image: golang
|
||||
commands:
|
||||
- make -C polyculeconnect test
|
||||
|
||||
go-build:
|
||||
image: golang
|
||||
commands:
|
||||
- make -C polyculeconnect build
|
Loading…
Reference in a new issue