-
Notifications
You must be signed in to change notification settings - Fork 4
/
wercker.yml
72 lines (61 loc) · 2.1 KB
/
wercker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
box: groovex/go-app-builder:ubuntu-16.04
build:
steps:
- script:
name: setup environment
code: |-
export GOPATH=/
mkdir -p /src/$WERCKER_GIT_DOMAIN/$WERCKER_GIT_OWNER
cp -a $WERCKER_SOURCE_DIR /src/$WERCKER_GIT_DOMAIN/$WERCKER_GIT_OWNER/$WERCKER_GIT_REPOSITORY
export WERCKER_SOURCE_DIR=/src/$WERCKER_GIT_DOMAIN/$WERCKER_GIT_OWNER/$WERCKER_GIT_REPOSITORY
- script:
name: make
code: |-
make
deploy:
steps:
- script:
name: setup environment
code: |-
export GOPATH=/
mkdir -p /src/$WERCKER_GIT_DOMAIN/$WERCKER_GIT_OWNER
cp -a $WERCKER_SOURCE_DIR /src/$WERCKER_GIT_DOMAIN/$WERCKER_GIT_OWNER/$WERCKER_GIT_REPOSITORY
export WERCKER_SOURCE_DIR=/src/$WERCKER_GIT_DOMAIN/$WERCKER_GIT_OWNER/$WERCKER_GIT_REPOSITORY
export GITHUB_RELEASE_VERSION=$(cat deb.json | jq -r '.version')
- script:
name: build debian package
code: |-
make deb
- groove-x/push-package:
path: .
arch: amd64
repo_name: ${REPO_NAME}
- groove-x/push-package:
path: .
arch: arm64
repo_name: ${REPO_NAME}
- github-create-release:
token: $GITHUB_TOKEN
tag: v$GITHUB_RELEASE_VERSION
title: v$GITHUB_RELEASE_VERSION
draft: true
- github-upload-asset:
token: $GITHUB_TOKEN
content-type: binary/octet-stream
file: build/amd64/cgroup-exporter
filename: amd64/cgroup-exporter
- github-upload-asset:
token: $GITHUB_TOKEN
content-type: binary/octet-stream
file: build/arm64/cgroup-exporter
filename: arm64/cgroup-exporter
- github-upload-asset:
token: $GITHUB_TOKEN
content-type: application/vnd.debian.binary-package
file: prometheus-cgroup-exporter_${GITHUB_RELEASE_VERSION}_amd64.deb
filename: prometheus-cgroup-exporter-amd64.deb
- github-upload-asset:
token: $GITHUB_TOKEN
content-type: application/vnd.debian.binary-package
file: prometheus-cgroup-exporter_${GITHUB_RELEASE_VERSION}_arm64.deb
filename: prometheus-cgroup-exporter-arm64.deb