Skip to content

Commit 5ccb566

Browse files
Deployment updates. (#66)
1 parent b4aedf3 commit 5ccb566

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

.circleci/config.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ _steps:
3131
install_aws_cli: &install_aws_cli
3232
run: sudo apt-get update && sudo apt-get install awscli
3333
install_dependencies: &install_dependencies
34-
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
34+
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
3535
update_version: &update_version
3636
run: npm run ci:update-version
3737
build: &build
@@ -61,7 +61,6 @@ jobs:
6161
- <<: *docker_defaults
6262
environment:
6363
STAGE: REVIEW
64-
REVIEW_DOMAIN: "review-python-simulator.microbit.org"
6564
REVIEW_CLOUDFRONT_DISTRIBUTION_ID: "E2DW5F7PA9W7JD"
6665
steps:
6766
- checkout
@@ -82,8 +81,7 @@ jobs:
8281
- <<: *docker_defaults
8382
environment:
8483
STAGE: STAGING
85-
STAGING_DOMAIN: "stage-python-simulator.microbit.org"
86-
STAGING_CLOUDFRONT_DISTRIBUTION_ID: "E10B3FPUWOJLVL"
84+
STAGING_CLOUDFRONT_DISTRIBUTION_ID: "E15FPP46STH15O"
8785
steps:
8886
- checkout
8987
- *restore_npm_cache
@@ -103,8 +101,7 @@ jobs:
103101
- <<: *docker_defaults
104102
environment:
105103
STAGE: PRODUCTION
106-
PRODUCTION_DOMAIN: "python-simulator.microbit.org"
107-
PRODUCTION_CLOUDFRONT_DISTRIBUTION_ID: "NOT_YET_CREATED"
104+
PRODUCTION_CLOUDFRONT_DISTRIBUTION_ID: "E15FPP46STH15O"
108105
steps:
109106
- checkout
110107
- *restore_npm_cache

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ as an iframe. The embedding API and URLs are not yet stable and are
1414
subject to change. If you are interested in embedding the simulator
1515
in your application please [get in touch](mailto:[email protected]).
1616

17-
The URL to embed is https://stage-python-simulator.microbit.org/simulator.html (subject to change, still under development).
17+
The URL to embed is https://python-simulator.usermbit.org/staging/simulator.html (subject to change, still under development).
1818

1919
The iframe provides the micro:bit board user interface and some limited
2020
interactions. It does not provide a terminal for serial/the REPL or any UI to change the board sensor state.
2121

2222
A value for a brand color can be passed to the simulator via a query
23-
string and is used to style the play button. E.g., https://stage-python-simulator.microbit.org/simulator.html?color=blue
23+
string and is used to style the play button. E.g., https://python-simulator.usermbit.org/staging/simulator.html?color=blue
2424

2525
[demo.html](./src/demo.html) is an example of embedding the simulator.
2626
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
299299
the simulator via this URL. Netlify's GitHub integration will comment
300300
on PRs with deployment details.
301301

302-
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
302+
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
303303
permissions for the relevant Micro:bit Educational Foundation infrastructure.
304304

305305
### Upgrading micropython-microbit-v2

deployment.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,23 @@
44
* SPDX-License-Identifier: MIT
55
*/
66
const {
7-
createDeploymentDetailsWithReviewPrefixes,
7+
createDeploymentDetailsFromOptions,
88
} = require("@microbit-foundation/website-deploy-aws-config");
99

10-
const { s3Config } = createDeploymentDetailsWithReviewPrefixes();
10+
const { s3Config } = createDeploymentDetailsFromOptions({
11+
production: {
12+
bucket: "python-simulator.usermbit.org",
13+
mode: "tag",
14+
},
15+
staging: {
16+
bucket: "python-simulator.usermbit.org",
17+
prefix: "staging",
18+
},
19+
review: {
20+
bucket: "review-python-simulator.usermbit.org",
21+
mode: "branch-prefix",
22+
},
23+
});
1124
module.exports = {
1225
...s3Config,
1326
region: "eu-west-1",

0 commit comments

Comments
 (0)