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