Skip to content

Commit 94a82ef

Browse files
committed
Merge branch 'charmed-snapcraft-io' into staging
2 parents 2914da2 + 0c9b2e7 commit 94a82ef

251 files changed

Lines changed: 3658 additions & 5801 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
PORT=8004
2+
VITE_PORT=5004
3+
VITE_OUTPUT_DIR=static/js/dist/vite
24
ENVIRONMENT=devel
35
FLASK_DEBUG=true
46
DEVEL=True

.github/workflows/coverage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v5
1616

17-
- uses: actions/setup-node@v4
17+
- uses: actions/setup-node@v5
1818
with:
1919
node-version: 20
2020

@@ -118,13 +118,13 @@ jobs:
118118
path: coverage
119119

120120
- name: Set up Python 3.10
121-
uses: actions/setup-python@v5
121+
uses: actions/setup-python@v6
122122
with:
123123
python-version: "3.10"
124124
cache: "pip"
125125

126126
- name: Set up Node.js
127-
uses: actions/setup-node@v4
127+
uses: actions/setup-node@v5
128128
with:
129129
node-version: "22"
130130
cache: "yarn"

.github/workflows/pr.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979

8080
- name: Run dotrun
8181
run: |
82-
dotrun &
82+
dotrun --env ENVIRONMENT="prod" serve &
8383
curl --head --fail --retry-delay 3 --retry 30 --retry-connrefused http://localhost:8004
8484
# END copy of the run-dotrun job
8585

@@ -88,6 +88,20 @@ jobs:
8888
docker run --network="host" -v .:/app cypress/base:22.18.0 \
8989
bash "-c" "cd /app && npx cypress install && yarn run test-e2e"
9090
91+
pack-rock:
92+
runs-on: ubuntu-latest
93+
steps:
94+
- uses: actions/checkout@v4
95+
96+
- name: Setup LXD
97+
uses: canonical/setup-lxd@main
98+
99+
- name: Setup rockcraft
100+
run: sudo snap install rockcraft --classic
101+
102+
- name: Pack rock
103+
run: rockcraft pack
104+
91105
lint-python:
92106
runs-on: ubuntu-latest
93107
permissions:
@@ -236,7 +250,7 @@ jobs:
236250
tsx:
237251
- '**/*.tsx'
238252
239-
- uses: actions/setup-node@v4
253+
- uses: actions/setup-node@v5
240254
with:
241255
node-version: 20
242256

Dockerfile

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,16 @@ ADD package.json .
1717
ADD yarn.lock .
1818
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn yarn install --production
1919

20-
21-
# Build stage: Run "yarn run build-css"
20+
# Build stage: Run "yarn run build"
2221
# ===
23-
FROM yarn-dependencies AS build-css
24-
ADD static/sass static/sass
25-
RUN yarn run build-css
26-
27-
# Build stage: Run "yarn run build-js"
28-
# ===
29-
FROM yarn-dependencies AS build-js
22+
FROM yarn-dependencies AS build
3023
ADD static/js static/js
24+
ADD static/sass static/sass
3125
ADD vite.config.js .
32-
ADD vite.config.entry.js .
3326
ADD tsconfig.json .
34-
ADD babel.config.json .
27+
ADD templates .
3528
RUN yarn install
36-
RUN yarn run build-js
29+
RUN yarn run build
3730

3831
# Build the production image
3932
# ===
@@ -52,8 +45,7 @@ WORKDIR /srv
5245
# Import code, build assets and mirror list
5346
ADD . .
5447
RUN rm -rf package.json yarn.lock .babelrc requirements.txt
55-
COPY --from=build-css /srv/static/css static/css
56-
COPY --from=build-js /srv/static/js static/js
48+
COPY --from=build /srv/static/js static/js
5749

5850
# Set revision ID
5951
ARG BUILD_ID

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ dotrun
3434

3535
Once the server has started, you can visit `http://127.0.0.1:8004` in your browser. You stop the server using `<ctrl>+c`.
3636

37+
> If you're running dotrun on macOS or Windows, you will have to use a different command to launch dotrun with an additional argument in order to get JavaScript code working:
38+
```bash
39+
dotrun -p 5004:5004
40+
```
41+
3742
For more detailed local development instructions, see [HACKING.md](HACKING.md).
3843

3944
## Brand stores

charm/charmcraft.yaml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extensions:
2020
config:
2121
options:
2222
sentry-dsn:
23-
description: ""
23+
description: "Sentry Data Source Name for the project"
2424
type: string
2525

2626
environment:
@@ -29,47 +29,47 @@ config:
2929
type: string
3030

3131
marketo-client-id:
32-
description: ""
32+
description: "Marketo API client ID"
3333
type: string
3434

3535
marketo-client-secret:
36-
description: ""
36+
description: "Marketo API client secret"
3737
type: string
3838

3939
github-client-id:
40-
description: ""
40+
description: "GitHub OAuth application ID for prompting users for access to their repositories"
4141
type: string
4242

4343
github-client-secret:
44-
description: ""
44+
description: "GitHub OAuth application client secret for prompting users for access to their repositories"
4545
type: string
4646

4747
github-snapcraft-user-token:
48-
description: ""
48+
description: "GitHub application token for automated builds"
4949
type: string
5050

5151
github-snapcraft-bot-user-token:
52-
description: ""
52+
description: "GitHub application token for CVE data"
5353
type: string
5454

5555
github-webhook-secret:
56-
description: ""
56+
description: "Secret salt used for signing automated build webhooks"
5757
type: string
5858

5959
github-webhook-host-url:
60-
description: ""
60+
description: "URL of the automated build webhooks' host"
6161
type: string
6262

6363
lp-api-username:
64-
description: ""
64+
description: "Launchpad API username"
6565
type: string
6666

6767
lp-api-token:
68-
description: ""
68+
description: "Launchpad API token"
6969
type: string
7070

7171
lp-api-token-secret:
72-
description: ""
72+
description: "Launchpad API secret"
7373
type: string
7474

7575
youtube-api-key:
@@ -88,6 +88,22 @@ config:
8888
description: ""
8989
type: string
9090

91+
login-url:
92+
description: "Base URL for SSO login redirects"
93+
default: "https://login.ubuntu.com"
94+
type: string
95+
96+
bsi-url:
97+
description: ""
98+
default: "https://build.snapcraft.io"
99+
type: string
100+
101+
snapstore-dashboard-api-url:
102+
description: "Base URL for SCA backend"
103+
default: "https://dashboard.snapcraft.io/"
104+
type: string
105+
106+
91107
# requires:
92108
# tracing:
93109
# interface: tracing

cypress.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,12 @@ export default defineConfig({
66
// implement node event listeners here
77
},
88
supportFile: false,
9+
blockHosts: [
10+
"www.googletagmanager.com",
11+
"analytics.google.com",
12+
"*.analytics.google.com",
13+
"www.google-analytics.com",
14+
"assets.ubuntu.com"
15+
],
916
},
1017
});

cypress/e2e/fsf.cy.js

Lines changed: 0 additions & 89 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import jest from "eslint-plugin-jest";
1+
import vitest from '@vitest/eslint-plugin'
22
import react from "eslint-plugin-react";
33
import prettier from "eslint-plugin-prettier";
44
import jsxA11Y from "eslint-plugin-jsx-a11y";
@@ -38,7 +38,7 @@ export default [
3838
),
3939
{
4040
plugins: {
41-
jest,
41+
vitest,
4242
react,
4343
prettier,
4444
"jsx-a11y": jsxA11Y,
@@ -48,7 +48,7 @@ export default [
4848
Object.entries({
4949
...globals.browser,
5050
...globals.node,
51-
...jest.environments.globals.globals,
51+
...vitest.environments.env.globals
5252
}).map(([key, value]) => [key.trim(), value]),
5353
),
5454
parser: babelParser,

jest.config.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)