ci: store a 'latest' assets file in AWS S3 BM-1094 #1008
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
As a Basemaps developer, having to look up the path to the most recent
assets.tar.co
file stored in AWS S3 is inconvenient. It would save me time and effort if a copy of the latest assets file were stored in a fixed location with a fixed name, similar to the bundled config file (config-latest.json.gz
).Context
When I run Basemaps locally, it's not always the case that I can run the
basemaps/server
package using theconfig-latest.json.gz
file. For example, if I make changes to the vector tile stylesheets and want to test them locally, I need to bundle the config file myself. To do so, I have to specify the--assets
parameter to enable fonts, glyphs, and sprites. Otherwise, they will not load on the map.Solution
Currently, assets files are uploaded to AWS S3 with a hash suffix. Remembering such a hash is unrealistic. It would be ideal if there were an
assets-latest.tar.co
file stored within the/assets
directory, similar to how aconfig-latest.json.gz
file is stored within the/config
directory.s3://linz-basemaps/...
config/
assets/
Modifications
build
workflow so that it stores a copy of the current assets at the following location in AWS S3: