1
- format_version : " 2 "
1
+ format_version : 5
2
2
default_step_lib_source : https://github.com/bitrise-io/bitrise-steplib.git
3
3
4
4
app :
5
5
envs :
6
- - RELEASE_VERSION : 1.3.12
7
-
6
+ - STEP_ID_IN_STEPLIB : deploy-to-bitrise-io
7
+
8
8
# define these in your .bitrise.secrets.yml
9
9
- BITRISE_BUILD_URL : $BITRISE_BUILD_URL
10
10
- BITRISE_BUILD_API_TOKEN : $BITRISE_BUILD_API_TOKEN
@@ -19,8 +19,12 @@ workflows:
19
19
# --- workflow to Step Test
20
20
ci :
21
21
before_run :
22
- - go-tests
22
+ - audit-this-step
23
23
steps :
24
+ - go-list :
25
+ - golint :
26
+ - errcheck :
27
+ - go-test :
24
28
- script :
25
29
inputs :
26
30
- content : |-
@@ -112,67 +116,6 @@ workflows:
112
116
echo "-> BITRISE_PUBLIC_INSTALL_PAGE_URL: ${BITRISE_PUBLIC_INSTALL_PAGE_URL}"
113
117
echo "-> BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP: ${BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP}"
114
118
115
- go-tests :
116
- before_run :
117
- - _install-test-tools
118
- steps :
119
- - script :
120
- title : Export go files to test
121
- inputs :
122
- - content : |-
123
- #!/bin/bash
124
- set -ex
125
-
126
- no_vendor_paths="$(go list ./... | grep -v vendor)"
127
- envman add --key GOLIST_WITHOUT_VENDOR --value "$no_vendor_paths"
128
- - script :
129
- title : Err check
130
- inputs :
131
- - content : |-
132
- #!/bin/bash
133
- set -ex
134
-
135
- errcheck -asserts=true -blank=true $GOLIST_WITHOUT_VENDOR
136
- - script :
137
- title : Go lint
138
- inputs :
139
- - content : |-
140
- #!/bin/bash
141
- set -ex
142
-
143
- while read -r line; do
144
- echo "-> Linting: $line"
145
- golint_out="$(golint $line)"
146
- if [[ "${golint_out}" != "" ]] ; then
147
- echo "=> Golint issues found:"
148
- echo "${golint_out}"
149
- exit 1
150
- fi
151
- done <<< "$GOLIST_WITHOUT_VENDOR"
152
- - script :
153
- title : Go test
154
- inputs :
155
- - content : |-
156
- #!/bin/bash
157
- set -ex
158
-
159
- go test ./...
160
-
161
- _install-test-tools :
162
- steps :
163
- - script :
164
- title : Install required testing tools
165
- inputs :
166
- - content : |-
167
- #!/bin/bash
168
- set -ex
169
-
170
- # Check for unhandled errors
171
- go get -u -v github.com/kisielk/errcheck
172
-
173
- # Go lint
174
- go get -u -v github.com/golang/lint/golint
175
-
176
119
# ----------------------------------------------------------------
177
120
# --- Utility workflows
178
121
dep-update :
@@ -186,23 +129,9 @@ workflows:
186
129
- content : |-
187
130
#!/bin/bash
188
131
set -ex
189
- go get -u -v github.com/golang/dep/cmd/dep
190
132
dep ensure -v
191
133
dep ensure -v -update
192
134
193
- # ----------------------------------------------------------------
194
- # --- workflow to create Release version
195
- create-release :
196
- steps :
197
- - script :
198
- title :
199
- inputs :
200
- - content : |
201
- #!/bin/bash
202
- set -ex
203
- go get -u github.com/bitrise-tools/releaseman
204
- export CI=true
205
- releaseman create --version "$RELEASE_VERSION"
206
135
207
136
# ----------------------------------------------------------------
208
137
# --- workflow to Share this step into a Step Library
@@ -214,38 +143,3 @@ workflows:
214
143
#!/bin/bash
215
144
set -ex
216
145
stepman audit --step-yml ./step.yml
217
-
218
- share-this-step :
219
- envs :
220
- # if you want to share this step into a StepLib
221
- - MY_STEPLIB_REPO_FORK_GIT_URL : $MY_STEPLIB_REPO_FORK_GIT_URL
222
- - STEP_ID_IN_STEPLIB : deploy-to-bitrise-io
223
- - STEP_GIT_VERION_TAG_TO_SHARE : $RELEASE_VERSION
224
- - STEP_GIT_CLONE_URL : https://github.com/bitrise-io/steps-deploy-to-bitrise-io.git
225
- description : |-
226
- If this is the first time you try to share a Step you should
227
- first call: $ bitrise share
228
- This will print you a guide, and information about how Step sharing
229
- works. Please read it at least once!
230
- As noted in the Step sharing guide you'll have to fork the
231
- StepLib you want to share this step into. Once you're done with forking
232
- the repository you should set your own fork's git clone URL
233
- in the `.bitrise.secrets.yml` file, or here in the `envs` section,
234
- as the value of the `MY_STEPLIB_REPO_FORK_GIT_URL` environment.
235
- You're now ready to share this Step, just make sure that
236
- the `STEP_ID_IN_STEPLIB` and `STEP_GIT_VERION_TAG_TO_SHARE`
237
- environments are set to the desired values!
238
- To share this Step into a StepLib you can just run: $ bitrise run share-this-step
239
- Once it finishes the only thing left is to actually create a Pull Request,
240
- the way described in the guide printed at the end of the process.
241
- before_run :
242
- - audit-this-step
243
- steps :
244
- - script :
245
- inputs :
246
- - content : |-
247
- #!/bin/bash
248
- set -ex
249
- bitrise share start -c ${MY_STEPLIB_REPO_FORK_GIT_URL}
250
- bitrise share create --stepid ${STEP_ID_IN_STEPLIB} --tag ${STEP_GIT_VERION_TAG_TO_SHARE} --git ${STEP_GIT_CLONE_URL}
251
- bitrise share finish
0 commit comments