project_name: golang-example
version: 8
ignore_files:
- .git
cache_files:
- go.work
variables:
cd-hello:
value:
type: plain
value: "cd hello && "
cd-helloserver:
value:
type: plain
value: "cd helloserver && "
cd-outyet:
value:
type: plain
value: "cd outyet && "
actions:
- info: golang-build@0.1.0
requirements:
- type: in_path
executable: go
desc: Install Go from https://go.dev/doc/install.
action:
type: staged
stage: build
cmd: "{cd-folder && }go build"
placeholders:
- "{cd-folder && }"
show_success_output: true
- info: golang-run@0.1.0
requirements:
- type: in_path
executable: go
desc: Install Go from https://go.dev/doc/install.
action:
type: observe
cmd: "{cd-folder && }go run ."
placeholders:
- "{cd-folder && }"
ignore_fails: true
show_success_output: true
show_cmd: false
only_when_fresh: false
- info: run-hello@0.1.0
action:
type: observe
cmd: ./hello/hello -g "Hello, Deployer folks! Hello"
pipelines:
- title: hello
info: golang-example-hello@0.1.0
tags:
- golang
actions:
- title: Build `./hello`
used: golang-build@0.1.0
with:
"{cd-folder && }": cd-hello
- title: Run `./hello`
used: run-hello@0.1.0
artifacts:
- from: hello/hello
to: hello
exclusive_exec_tag: hello
- title: helloserver
info: golang-example-helloserver@0.1.0
tags:
- golang
actions:
- title: Run `./helloserver`
used: golang-run@0.1.0
with:
"{cd-folder && }": cd-helloserver
exclusive_exec_tag: helloserver
- title: outyet
info: golang-example-outyet@0.1.0
tags:
- golang
actions:
- title: Run `./outyet`
used: golang-run@0.1.0
with:
"{cd-folder && }": cd-outyet
exclusive_exec_tag: outyet