Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected] @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/[email protected] @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
Expand Down Expand Up @@ -61,7 +61,6 @@ jobs:
- <<: *docker_defaults
environment:
STAGE: REVIEW
REVIEW_DOMAIN: "review-python-simulator.microbit.org"
REVIEW_CLOUDFRONT_DISTRIBUTION_ID: "E2DW5F7PA9W7JD"
steps:
- checkout
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]).

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
Expand Down Expand Up @@ -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
Expand Down
17 changes: 15 additions & 2 deletions deployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down