You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
405 B
28 lines
405 B
platform: linux
|
|
|
|
image_resource:
|
|
type: registry-image
|
|
source: { repository: golang }
|
|
|
|
inputs:
|
|
- name: repo
|
|
path: .
|
|
|
|
outputs:
|
|
- name: binary
|
|
|
|
params:
|
|
MODULE:
|
|
BINARY_NAME:
|
|
|
|
run:
|
|
path: sh
|
|
args:
|
|
- -ce
|
|
- |
|
|
root=$(pwd)
|
|
cd "$MODULE"
|
|
go build -o "/tmp/$BINARY_NAME"
|
|
|
|
timestamp=$(date '+%Y%m%d%H%M%S')
|
|
tar czf "$root/binary/$BINARY_NAME-$timestamp.tgz" -C /tmp "$BINARY_NAME"
|