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
|
# Go build file
|
||||||
**/build/
|
**/build/
|
||||||
|
|
||||||
|
.vscode
|
|
@ -1,23 +1,5 @@
|
||||||
---
|
|
||||||
# Test building the code and docker image
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: test-build
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: go-test
|
docker-build-only:
|
||||||
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
|
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
privileged: true
|
privileged: true
|
||||||
settings:
|
settings:
|
||||||
|
@ -27,13 +9,14 @@ steps:
|
||||||
platforms:
|
platforms:
|
||||||
- linux/amd64
|
- linux/amd64
|
||||||
# - linux/arm64
|
# - linux/arm64
|
||||||
depends_on:
|
|
||||||
when:
|
when:
|
||||||
|
- event: pull_request
|
||||||
|
repo: polyculeconnect/polyculeconnect
|
||||||
|
- event: push
|
||||||
branch:
|
branch:
|
||||||
exclude:
|
exclude: [main]
|
||||||
- main
|
|
||||||
|
|
||||||
- name: docker-build-push
|
docker-build-push:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
privileged: true
|
privileged: true
|
||||||
settings:
|
settings:
|
||||||
|
@ -47,28 +30,11 @@ steps:
|
||||||
platforms:
|
platforms:
|
||||||
- linux/amd64
|
- linux/amd64
|
||||||
# - linux/arm64
|
# - linux/arm64
|
||||||
depends_on:
|
|
||||||
- go-test
|
|
||||||
- go-build
|
|
||||||
when:
|
when:
|
||||||
branch:
|
- event: push
|
||||||
- main
|
branch: main
|
||||||
|
|
||||||
trigger:
|
docker-push-tag:
|
||||||
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
|
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
privileged: true
|
privileged: true
|
||||||
settings:
|
settings:
|
||||||
|
@ -82,7 +48,8 @@ steps:
|
||||||
from_secret: git_username
|
from_secret: git_username
|
||||||
password:
|
password:
|
||||||
from_secret: git_password
|
from_secret: git_password
|
||||||
|
when:
|
||||||
|
- event: tag
|
||||||
|
|
||||||
trigger:
|
depends_on:
|
||||||
event:
|
- test
|
||||||
- tag
|
|
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