Last active
November 26, 2020 20:45
-
-
Save ck1125/e309cef786480b8836869a4c5bb5c7a1 to your computer and use it in GitHub Desktop.
Deploying RSK skill and its radio station catalogue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Each time a deploy is triggered, the state is saved in a hidden file ask-states.json | |
# We use S3 Buckets to keep that in sync since the circle-ci container is stateless | |
# Get the latest deployment state from our S3 bucket ask-states.json | |
aws s3 cp s3://code-bucket/alexa-deployment/ask-states.json .ask/ask-states.json | |
# Deploy the Skill code with the ask cli (v2) | |
ask deploy -profile my-profile | |
# Save this new deployment state back to our S3 bucket | |
aws s3 cp .ask/ask-states.json s3://code-bucket/alexa-deployment/ask-states.json | |
# Upload the latest version of the radio stations catalog | |
skillId=$(cat .ask/ask-states.json | jq -r '.profiles."my-profile".skillId') | |
catalogId=$(ask smapi list-catalogs-for-vendor - profile my-profile | jq -r '.catalogs[] | select(.type == "AMAZON.TerrestrialRadioChannel") | select(.title == "Catalog Name") | .id') | |
ask smapi upload-catalog -c $catalogId -f ../catalog.json - profile my-profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment