-
Notifications
You must be signed in to change notification settings - Fork 130
/
bitrise.yml
129 lines (113 loc) · 3.12 KB
/
bitrise.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
format_version: "11"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: other
app:
envs:
- BIN_NAME: bitrise
workflows:
check:
steps:
- git::https://github.com/bitrise-steplib/steps-check.git:
inputs:
- workflow: lint
- skip_step_yml_validation: "yes"
- go-list: { }
- script:
title: Go test
inputs:
- content: go test -p 1 $BITRISE_GO_PACKAGES
test:
title: Runs tests
after_run:
- check
- integration-test
integration-test:
title: Runs integration tests
steps:
- script:
title: Run integration tests
inputs:
- content: |-
#!/usr/bin/env bash
set -ex
current_bitrise="$(pwd)/_tmp/test_bitrise"
export CGO_ENABLED=0
go build -o "$current_bitrise"
export PR="" PULL_REQUEST_ID=""
export INTEGRATION_TEST_BINARY_PATH="$current_bitrise"
$current_bitrise setup
go test -v ./_tests/integration/ --tags linux_and_mac
if [ "$(uname)" == "Linux" ]; then
go test -v ./_tests/integration/ --tags linux_only
fi
create-release:
description: Creates Linux and Darwin binaries, then publishes a GitHub release
envs:
- GITHUB_TOKEN: $GIT_BOT_USER_ACCESS_TOKEN # Goreleaser expects this env var
steps:
- script:
title: Fetch GCS bucket credentials
inputs:
- content: |-
#!/bin/bash
set -ex
echo "$GCS_BITRISE_CLI_BUCKET_CREDENTIALS" > /tmp/gcs_service_account.json
# Goreleaser expects this env var:
envman add --key GOOGLE_APPLICATION_CREDENTIALS --value /tmp/gcs_service_account.json
- script:
title: Goreleaser (create binaries + publish to GH)
deps:
brew:
- name: goreleaser
inputs:
- content: |
#!/usr/bin/env bash
set -ex
goreleaser release
test-binary-build:
description: Tests the release build process by creating a snapshot release (without publishing)
steps:
- script:
title: Goreleaser (create snapshot binaries)
deps:
brew:
- name: goreleaser
inputs:
- content: |
#!/usr/bin/env bash
set -ex
goreleaser release --snapshot --rm-dist
noop:
title: Noop
description: Empty workflow for quick testing
fail-test:
title: Fails
description: Workflow will fail
steps:
- script:
title: Success
inputs:
- content: |-
set -ex
exit 0
- script:
title: Fail wit exit code 2
inputs:
- content: |-
set -ex
exit 2
- script:
title: Skippable fail with exit code 2
is_always_run: true
is_skippable: true
inputs:
- content: |-
set -ex
exit 2
- script:
title: Skipping success
is_always_run: false
inputs:
- content: |-
set -ex
exit 0