-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathci.gocd.yml
93 lines (93 loc) · 2.72 KB
/
ci.gocd.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
format_version: 5
environments:
internal:
pipelines:
- gocd-cli
pipelines:
gocd-cli:
group: go-cd-contrib
display_order: -10
materials:
github:
git: https://github.com/gocd-contrib/gocd-cli
destination: cli
codesigning:
git: https://github.com/gocd/codesigning
destination: codesigning
signing-keys:
git: https://git.gocd.io/git/gocd/signing-keys
destination: signing-keys
stages:
- build:
elastic_profile_id: ecs-golang-build
artifacts:
- build:
source: dist/**/*
destination: dist/
tasks:
- exec:
command: /bin/bash
arguments:
- build.sh
- --verbose
- --prod
- --release=1.0.0
working_directory: cli
- exec:
command: mv
arguments:
- dist
- ..
working_directory: cli
- code-signing:
clean_workspace: yes
secure_variables:
GOCD_GPG_PASSPHRASE: "AES:7lAutKoRKMuSnh3Sbg9DeQ==:8fhND9w/8AWw6dJhmWpTcCdKSsEcOzriQNiKFZD6XtN+sJvZ65NH/QFXRNiy192+SSTKsbhOrFmw+kAKt5+MH1Erd6H54zJjpSgvJUmsJaQ="
jobs:
win:
elastic_profile_id: ecs-gocd-dev-build
artifacts:
- build:
source: win-cli.zip
tasks:
- fetch:
stage: build
job: build
source: dist/
- exec:
command: rake
arguments:
- win:metadata_single_binary[../dist/windows/amd64/gocd.exe,../win-cli.zip]
working_directory: codesigning
- bundle:
elastic_profile_id: ecs-golang-build
artifacts:
- build:
source: clis.zip
tasks:
- fetch:
stage: build
job: build
source: dist/
- fetch:
stage: code-signing
job: win
source: win-cli.zip
is_file: yes
- exec:
command: /bin/bash
arguments:
- -c
- |
echo "Collating codesigned binaries..."
(cd dist/windows/amd64 && unzip -o ../../../win-cli.zip)
sha256sum dist/darwin/amd64/gocd
sha256sum dist/linux/amd64/gocd
sha256sum dist/windows/amd64/gocd.exe
- exec:
command: zip
arguments:
- -r
- clis.zip
- dist