Skip to content

Commit de4cebc

Browse files
feat(init_mega): ship mega-init image (#2159)
* chore(moon): migrate off @shopify/react-shortcuts and upgrade jsdom/scrollbar-hide * feat(moon): add admin VM terminal UI on /oc Wire an xterm panel and WebSocket client for the future mono terminal proxy so admins can open an interactive shell next to View logs. * feat(orion-scheduler): add VM terminal WebSocket and retain_antares_mounts Expose /vms/{id}/terminal via qlean InteractiveShell, proxy it through mono for the moon UI, and allow webhook/config to set ORION_RETAIN_ANTARES_MOUNTS. * feat(init_mega): ship mega-init image and drop libra import Add Dockerfile and deploy workflow for buckal-bundles sync only, and remove the optional --with-libra / import-buck2-deps path from init_mega so the Job stays focused on toolchains sync. * fix(moon): clear ESLint errors blocking test-web-ui Satisfy padding-line-between-statements in MergedItem and drop unused catch bindings flagged on PR CI. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8e590f1 commit de4cebc

88 files changed

Lines changed: 5748 additions & 4140 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.

.dockerignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ tools/**
1313

1414
docs
1515

16-
scripts
16+
# Exclude scripts by default (large / unused in most images), but keep the
17+
# paths required by scripts/init_mega/Dockerfile (mega-init image).
18+
scripts/*
19+
!scripts/init_mega/
20+
!scripts/init_mega/**
21+
!scripts/import-buck2-deps/
22+
!scripts/import-buck2-deps/**
1723

1824
tests
1925

.github/workflows/base.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ concurrency:
2424
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2525
cancel-in-progress: true
2626

27+
permissions:
28+
contents: read
29+
2730
jobs:
2831
format:
2932
if: ${{ !(github.repository == 'gitmono-dev/mega' && github.event_name == 'push') }}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Mega Init deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- ".github/workflows/mega-init-deploy.yml"
9+
- "scripts/init_mega/**"
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
18+
env:
19+
REPOSITORY: mega/mega-init
20+
IMAGE_TAG: latest
21+
HARBOR_REGISTRY: registry.xuanwu.openatom.cn
22+
23+
jobs:
24+
build-and-push:
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 15
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
31+
- name: Login to Harbor
32+
uses: docker/login-action@v3
33+
with:
34+
registry: ${{ env.HARBOR_REGISTRY }}
35+
username: ${{ secrets.HARBOR_USERNAME }}
36+
password: ${{ secrets.HARBOR_PASSWORD }}
37+
38+
- name: Build, tag, and push docker image to Harbor
39+
run: |
40+
set -euo pipefail
41+
42+
HARBOR_IMAGE_BASE="${{ env.HARBOR_REGISTRY }}/${{ env.REPOSITORY }}"
43+
IMAGE_TAG="${{ env.IMAGE_TAG }}"
44+
SHORT_SHA="${GITHUB_SHA:0:7}"
45+
46+
docker build \
47+
-f scripts/init_mega/Dockerfile \
48+
-t "$HARBOR_IMAGE_BASE:$IMAGE_TAG" \
49+
-t "$HARBOR_IMAGE_BASE:$SHORT_SHA" \
50+
.
51+
52+
docker push "$HARBOR_IMAGE_BASE:$IMAGE_TAG"
53+
docker push "$HARBOR_IMAGE_BASE:$SHORT_SHA"

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ jobs:
2727
context: .
2828
dockerfile: orion-server/Dockerfile
2929

30+
- name: mega-init
31+
context: .
32+
dockerfile: scripts/init_mega/Dockerfile
33+
3034
steps:
3135
- name: Checkout
3236
uses: actions/checkout@v4

.github/workflows/services.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1616
cancel-in-progress: true
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
# Label of the runner job
2023
runner-job:

.github/workflows/web-sync-server-deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref }}
1616
cancel-in-progress: true
1717

18+
permissions:
19+
contents: read
20+
1821
env:
1922
REGISTRY_ALIAS: m8q5m4u3
2023
REPOSITORY: mega/web-sync-server

.github/workflows/web-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- '.github/workflows/web-deploy.yml'
99
- 'moon/**'
1010

11+
permissions:
12+
contents: read
13+
1114
env:
1215
TIPTAP_PRIVATE_REGISTRY_KEY: CjqFil0n7z4GGur+RPric21fBBeSB4R4FoNdRYOE1bQEz6AXLCoANCc+o9rLIg6Q
1316

0 commit comments

Comments
 (0)