mirror of
https://github.com/steinhobelgruen/netatmo-exporter.git
synced 2024-11-24 10:13:56 +00:00
Add concourse pipeline.
This commit is contained in:
parent
bdf741afed
commit
9e03d3c934
17
_ci/build.sh
Executable file
17
_ci/build.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e -u -x
|
||||
|
||||
readonly NAME=netatmo-exporter
|
||||
readonly PACKAGE=github.com/xperimental/netatmo-exporter
|
||||
readonly BUILDS=(linux/amd64 linux/arm darwin/amd64 windows/amd64)
|
||||
|
||||
mkdir -p gopath/src/github.com/xperimental/
|
||||
ln -s "$PWD/source" "gopath/src/${PACKAGE}"
|
||||
export GOPATH=$PWD/gopath
|
||||
|
||||
for build in "${BUILDS[@]}"; do
|
||||
echo "Build: $build"
|
||||
IFS="/" read -a buildinfo <<< "$build"
|
||||
GOOS=${buildinfo[0]} GOARCH=${buildinfo[1]} go build -v -ldflags="-s -w" -o "binaries/${NAME}_${buildinfo[0]}_${buildinfo[1]}" "${PACKAGE}"
|
||||
done
|
12
_ci/build.yml
Normal file
12
_ci/build.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
platform: linux
|
||||
image_resource:
|
||||
type: docker-image
|
||||
source:
|
||||
repository: golang
|
||||
tag: 1.10.0
|
||||
inputs:
|
||||
- name: source
|
||||
outputs:
|
||||
- name: binaries
|
||||
run:
|
||||
path: source/_ci/build.sh
|
38
_ci/pipeline.yml
Normal file
38
_ci/pipeline.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
resource_types:
|
||||
- name: github-status
|
||||
type: docker-image
|
||||
source:
|
||||
repository: dpb587/github-status-resource
|
||||
tag: master
|
||||
resources:
|
||||
- name: netatmo-exporter
|
||||
type: git
|
||||
source:
|
||||
uri: git://github.com/xperimental/netatmo-exporter.git
|
||||
branch: master
|
||||
- name: status
|
||||
type: github-status
|
||||
source:
|
||||
repository: xperimental/netatmo-exporter
|
||||
access_token: ((repo_github_token))
|
||||
jobs:
|
||||
- name: build
|
||||
plan:
|
||||
- get: source
|
||||
resource: netatmo-exporter
|
||||
trigger: true
|
||||
- put: status
|
||||
params:
|
||||
state: pending
|
||||
commit: source
|
||||
- task: build
|
||||
file: source/_ci/build.yml
|
||||
on_failure:
|
||||
put: status
|
||||
params:
|
||||
state: failure
|
||||
commit: source
|
||||
- put: status
|
||||
params:
|
||||
state: success
|
||||
commit: source
|
Loading…
Reference in a new issue