Compare commits
1 commit
bbea68443f
...
c8bbd4f260
Author | SHA1 | Date | |
---|---|---|---|
c8bbd4f260 |
3 changed files with 47 additions and 26 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -23,5 +23,3 @@ go.work
|
|||
|
||||
# Go build file
|
||||
**/build/
|
||||
|
||||
.vscode
|
|
@ -1,5 +1,23 @@
|
|||
---
|
||||
# Test building the code and docker image
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: test-build
|
||||
|
||||
steps:
|
||||
docker-build-only:
|
||||
- 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
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
privileged: true
|
||||
settings:
|
||||
|
@ -9,14 +27,13 @@ steps:
|
|||
platforms:
|
||||
- linux/amd64
|
||||
# - linux/arm64
|
||||
depends_on:
|
||||
when:
|
||||
- event: pull_request
|
||||
repo: polyculeconnect/polyculeconnect
|
||||
- event: push
|
||||
branch:
|
||||
exclude: [main]
|
||||
branch:
|
||||
exclude:
|
||||
- main
|
||||
|
||||
docker-build-push:
|
||||
- name: docker-build-push
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
privileged: true
|
||||
settings:
|
||||
|
@ -30,11 +47,28 @@ steps:
|
|||
platforms:
|
||||
- linux/amd64
|
||||
# - linux/arm64
|
||||
depends_on:
|
||||
- go-test
|
||||
- go-build
|
||||
when:
|
||||
- event: push
|
||||
branch: main
|
||||
branch:
|
||||
- main
|
||||
|
||||
docker-push-tag:
|
||||
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
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
privileged: true
|
||||
settings:
|
||||
|
@ -48,8 +82,7 @@ steps:
|
|||
from_secret: git_username
|
||||
password:
|
||||
from_secret: git_password
|
||||
when:
|
||||
- event: tag
|
||||
|
||||
depends_on:
|
||||
- test
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
|
@ -1,10 +0,0 @@
|
|||
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