diff --git a/.circleci/config.yml b/.circleci/config.yml index 457a774e..9a0a7e42 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ _steps: install_aws_cli: &install_aws_cli run: sudo apt-get update && sudo apt-get install awscli install_dependencies: &install_dependencies - run: npm ci --cache .npm-cache && sudo npm config set @microbit-foundation:registry https://npm.pkg.github.com/microbit-foundation && sudo npm i -g @microbit-foundation/website-deploy-aws@0.3.0 @microbit-foundation/website-deploy-aws-config@0.4.2 @microbit-foundation/circleci-npm-package-versioner@1 + run: npm ci --cache .npm-cache && sudo npm config set @microbit-foundation:registry https://npm.pkg.github.com/microbit-foundation && sudo npm i -g @microbit-foundation/website-deploy-aws@0.3.0 @microbit-foundation/website-deploy-aws-config@0.5.0-dev.84 @microbit-foundation/circleci-npm-package-versioner@1 update_version: &update_version run: npm run ci:update-version build: &build @@ -61,7 +61,6 @@ jobs: - <<: *docker_defaults environment: STAGE: REVIEW - REVIEW_DOMAIN: "review-python-simulator.microbit.org" REVIEW_CLOUDFRONT_DISTRIBUTION_ID: "E2DW5F7PA9W7JD" steps: - checkout @@ -82,8 +81,7 @@ jobs: - <<: *docker_defaults environment: STAGE: STAGING - STAGING_DOMAIN: "stage-python-simulator.microbit.org" - STAGING_CLOUDFRONT_DISTRIBUTION_ID: "E10B3FPUWOJLVL" + STAGING_CLOUDFRONT_DISTRIBUTION_ID: "E15FPP46STH15O" steps: - checkout - *restore_npm_cache @@ -103,8 +101,7 @@ jobs: - <<: *docker_defaults environment: STAGE: PRODUCTION - PRODUCTION_DOMAIN: "python-simulator.microbit.org" - PRODUCTION_CLOUDFRONT_DISTRIBUTION_ID: "NOT_YET_CREATED" + PRODUCTION_CLOUDFRONT_DISTRIBUTION_ID: "E15FPP46STH15O" steps: - checkout - *restore_npm_cache diff --git a/README.md b/README.md index 14a556a3..820a9377 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,13 @@ as an iframe. The embedding API and URLs are not yet stable and are subject to change. If you are interested in embedding the simulator in your application please [get in touch](mailto:support@microbit.org). -The URL to embed is https://stage-python-simulator.microbit.org/simulator.html (subject to change, still under development). +The URL to embed is https://python-simulator.usermbit.org/staging/simulator.html (subject to change, still under development). The iframe provides the micro:bit board user interface and some limited interactions. It does not provide a terminal for serial/the REPL or any UI to change the board sensor state. A value for a brand color can be passed to the simulator via a query -string and is used to style the play button. E.g., https://stage-python-simulator.microbit.org/simulator.html?color=blue +string and is used to style the play button. E.g., https://python-simulator.usermbit.org/staging/simulator.html?color=blue [demo.html](./src/demo.html) is an example of embedding the simulator. It connects the iframe to a terminal and provides a simple interface for @@ -299,7 +299,7 @@ There is a Netlify based build for development purposes. Do not embed the simulator via this URL. Netlify's GitHub integration will comment on PRs with deployment details. -Branches in this repository are also deployed via CircleCI to https://review-python-simulator.microbit.org/{branchName}/. This requires the user pushing code to have +Branches in this repository are also deployed via CircleCI to https://review-python-simulator.usermbit.org/{branchName}/. This requires the user pushing code to have permissions for the relevant Micro:bit Educational Foundation infrastructure. ### Upgrading micropython-microbit-v2 diff --git a/deployment.js b/deployment.js index e614327a..57b4896d 100644 --- a/deployment.js +++ b/deployment.js @@ -4,10 +4,23 @@ * SPDX-License-Identifier: MIT */ const { - createDeploymentDetailsWithReviewPrefixes, + createDeploymentDetailsFromOptions, } = require("@microbit-foundation/website-deploy-aws-config"); -const { s3Config } = createDeploymentDetailsWithReviewPrefixes(); +const { s3Config } = createDeploymentDetailsFromOptions({ + production: { + bucket: "python-simulator.usermbit.org", + mode: "tag", + }, + staging: { + bucket: "python-simulator.usermbit.org", + prefix: "staging", + }, + review: { + bucket: "review-python-simulator.usermbit.org", + mode: "branch-prefix", + }, +}); module.exports = { ...s3Config, region: "eu-west-1",