forked from alephao/bitrise-step-s3-cache-pull
-
Notifications
You must be signed in to change notification settings - Fork 0
/
step.yml
184 lines (160 loc) · 5.42 KB
/
step.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
title: |-
S3 Cache Pull
summary: |
A step to retrieve your cache from a S3 bucket using custom keys with fallback.
This should be used with the s3-cache-push step to store the cache.
If you want to retrieve multiple items, you'll need run this step multiple times.
*Bucket Access*
For this step to work you'll need an user in aws with programmatic access to a bucket.
The user should have permissions to list, get, and put objects in the bucket.
You can set the credentials using the Bitrise Secrets with the keys specified in the inputs
or set them directly in the inputs.
website: https://github.com/alephao/bitrise-step-s3-cache-pull
source_code_url: https://github.com/alephao/bitrise-step-s3-cache-pull
support_url: https://github.com/alephao/bitrise-step-s3-cache-pull/issues
host_os_tags:
- osx-10.10
- ubuntu-16.04
type_tags:
- utility
is_requires_admin_user: true
is_always_run: false
is_skippable: false
run_if: ""
toolkit:
go:
package_name: github.com/alephao/bitrise-step-s3-cache-pull
inputs:
- cache_aws_access_key_id:
opts:
title: AWS_ACCESS_KEY_ID
category: AWS Access
summary: The AWS_ACCESS_KEY_ID to access the bucket.
description: |
The access key id that matches the secret access key.
The credentials need to be from a user that has at least the following permissions
in the bucket specified bellow `s3:ListObjects`, `s3:PutObject`, and `s3:GetObject`.
is_expand: true
is_required: true
is_sensitive: true
- cache_aws_secret_access_key:
opts:
title: AWS_SECRET_ACCESS_KEY
category: AWS Access
summary: The AWS_SECRET_ACCESS_KEY to access the bucket.
description: |
The secret access key that matches the access key id.
The credentials need to be from a user that has at least the following permissions
in the bucket specified bellow `s3:ListObjects`, `s3:PutObject`, and `s3:GetObject`.
is_expand: true
is_required: true
is_sensitive: true
- cache_aws_endpoint:
opts:
title: AWS Endpoint
summary: Custom URL to override default AWS one.
description: |
Set a custom URL if your S3 bucket is not hosted on a AWS domain.
For instance, if you have a min.io server running on `https://your-domain.com`, it will use that endpoint instead.
category: AWS Access
is_expand: true
is_required: false
- cache_aws_region:
opts:
title: AWS Region
summary: The region of the S3 bucket
category: AWS Bucket
is_expand: true
is_required: true
value_options:
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- ca-central-1
- eu-north-1
- eu-west-3
- eu-west-2
- eu-west-1
- eu-central-1
- eu-south-1
- ap-south-1
- ap-northeast-1
- ap-northeast-2
- ap-northeast-3
- ap-southeast-1
- ap-southeast-2
- ap-east-1
- sa-east-1
- cn-north-1
- cn-northwest-1
- us-gov-east-1
- us-gov-west-1
- us-gov-secret-1
- us-gov-topsecret-1
- me-south-1
- af-south-1
- cache_bucket_name:
opts:
title: Bucket Name
category: AWS Bucket
summary: The name of the s3 bucket where you want to store the cache
is_expand: true
is_required: true
- cache_restore_keys:
opts:
title: Cache restore keys
summary: List of cache key prefixes to find the cached file
description: |
The cache key can contain special values for convenience.
You can use '{{ checksum path/to/file }}' to get the file content's sha256 checksum.
You can use '{{ branch }}' to get the name of the current branch.
You can use '{{ stackrev }}' to get the machine's stack id.
This step will loop through the specified keys and retrieve the cache for the first
key that matches the prefix of a cache key. For example:
If you only have a cache stored with the key `carthage-a-b-c` and the following restore Keys:
cache_restore_keys: |
carthage-a-b-123
carthage-a-123
carthage-
car
It will try looking for a key prefixed with `carthage-a-b-123` and will find nothing. Then
it will try the same for `carthage-a-123` and will find nothing. Then it will try the same for
`carthage-` and it will find our cache `carthage-a-b-c` and retrieve it.
If a cache is not found for the key, this step is skipped.
category: Cache
is_expand: false
is_required: true
- cache_path:
opts:
title: Cache path
summary: Path to extract the file or directory cached. Relative to the root of the git repo.
description: |
If you stored the cache as `/path/to/my/folder`, the compressed file in the bucket will contain
only `folder`, therefore you'll need to set this to `/path/to/my/`
category: Cache
is_expand: false
is_required: true
- cache_archive_extension: "zip"
opts:
title: Archive Extension
summary: The extension of the archive
category: Archive
is_expand: true
is_required: true
value_options:
- zip
- tar
- tar.br
- tar.gz
- tar.bz2
- tar.xz
- tar.lz4
- tar.sz
- zst
- tar.zst
- bz2
- gz
- lz4
- sz
- xz