-
Notifications
You must be signed in to change notification settings - Fork 7
/
bitrise.yml
61 lines (54 loc) · 1.91 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
format_version: "11"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
workflows:
ci:
before_run:
- test
- test_integration
test:
steps:
- git::https://github.com/bitrise-steplib/steps-check.git:
title: Lint
inputs:
- workflow: lint
- skip_step_yml_validation: "yes"
- go-list:
inputs:
- exclude: |-
*/mocks
- go-test: { }
test_integration:
before_run:
- _generate_cache_api_token
steps:
- script:
title: Integration tests
deps:
brew:
- name: zstd
apt_get:
- name: zstd
inputs:
- content: |-
#!/bin/bash
set -ex
go test -v -tags integration ./integration
_generate_cache_api_token:
steps:
- script:
title: Generate cache API access token
description: Generate an expiring API token using $API_CLIENT_SECRET
inputs:
- content: |
#!/bin/env bash
set -e
json_response=$(curl --fail -X POST https://auth.services.bitrise.io/auth/realms/bitrise-services/protocol/openid-connect/token -k \
--data "client_id=bitrise-steps" \
--data "client_secret=$CACHE_API_CLIENT_SECRET" \
--data "grant_type=urn:ietf:params:oauth:grant-type:uma-ticket" \
--data "claim_token=eyJhcHBfaWQiOlsiMzYxNzJhODkyMTU1OTk1MSJdLCAib3JnX2lkIjpbIjg2NGMyZmViOTE0YzI2MTUiXSwgImFiY3NfYWNjZXNzX2dyYW50ZWQiOlsidHJ1ZSJdfQ==" \
--data "claim_token_format=urn:ietf:params:oauth:token-type:jwt" \
--data "audience=bitrise-services")
auth_token=$(echo $json_response | jq -r .access_token)
envman add --key BITRISEIO_ABCS_API_URL --value $CACHE_API_URL
envman add --key BITRISEIO_BITRISE_SERVICES_ACCESS_TOKEN --value $auth_token --sensitive