Skip to content

Commit 932b5f8

Browse files
author
AruSeito
authored
Merge pull request #3694 from illacloud/release/4.5.0
Release/4.5.0
2 parents 412e4c5 + b3bf635 commit 932b5f8

Some content is hidden

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

70 files changed

+2646
-1980
lines changed

.github/workflows/build-all-in-one-image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010

1111
env:
1212
ILLA_MUI_LICENSE: ${{ secrets.ILLA_MUI_LICENSE }}
13+
ILLA_BASE_PATH: /build
1314

1415
jobs:
1516
build:
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Deploy cname image to k8s
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- beta
8+
- develop
9+
10+
env:
11+
ILLA_GOOGLE_MAP_KEY: ${{ secrets.ILLA_GOOGLE_MAP_KEY }}
12+
ILLA_MIXPANEL_API_KEY: ${{ secrets.ILLA_MIXPANEL_API_KEY }}
13+
ILLA_MUI_LICENSE: ${{ secrets.ILLA_MUI_LICENSE }}
14+
ILLA_SENTRY_AUTH_TOKEN: ${{ secrets.ILLA_SENTRY_AUTH_TOKEN }}
15+
DO_CLUSTER: ${{ secrets.DO_CLUSTER }}
16+
DOCKER_LOGIN: ${{ secrets.DOCKER_LOGIN }}
17+
DOCKER_PWD: ${{ secrets.DOCKER_PWD }}
18+
ILLA_BASE_PATH: /builder
19+
20+
jobs:
21+
build:
22+
name: Build website
23+
runs-on: ubuntu-latest
24+
environment:
25+
name:
26+
${{ (github.ref == 'refs/heads/main') && 'production' || (github.ref ==
27+
'refs/heads/develop') && 'test' || (github.ref == 'refs/heads/beta') &&
28+
'beta' }}
29+
env:
30+
ILLA_API_BASE_URL: ${{ vars.ILLA_API_BASE_URL }}
31+
ILLA_APP_ENV: ${{ vars.ILLA_APP_ENV }}
32+
ILLA_BUILDER_URL: ${{ vars.ILLA_BUILDER_URL }}
33+
ILLA_CLOUD_URL: ${{ vars.ILLA_CLOUD_URL }}
34+
ILLA_MARKET_URL: ${{ vars.ILLA_MARKET_URL }}
35+
steps:
36+
- uses: actions/checkout@v4
37+
with:
38+
submodules: true
39+
40+
- uses: actions/setup-node@v3
41+
with:
42+
node-version: 18.12.1
43+
44+
- uses: pnpm/action-setup@v2
45+
with:
46+
version: 8.7.0
47+
48+
- name: Install dependencies
49+
run: pnpm install --frozen-lockfile
50+
51+
- name: Install doctl
52+
uses: digitalocean/action-doctl@v2
53+
with:
54+
token: ${{ secrets.DO_TOKEN }}
55+
56+
- name: Install kubectl
57+
run: |
58+
sudo snap install kubectl --classic
59+
60+
- name: Setup kubectl
61+
run: |
62+
doctl kubernetes cluster kubeconfig save $DO_CLUSTER
63+
kubectl version
64+
65+
- name: Build website
66+
run: |
67+
echo "Building for $GITHUB_REF_NAME branch,ILLA APP ENV is $ILLA_APP_ENV"
68+
pnpm build-cloud
69+
- name: Build Docker
70+
run: |
71+
docker build --cache-from=illa-builder-cname-frontend -f Dockerfile -t illa-builder-cname-frontend .
72+
73+
- name: Push application Docker image
74+
run: |
75+
docker login -u $DOCKER_LOGIN -p $DOCKER_PWD
76+
docker tag illa-builder-cname-frontend "illasoft/illa-builder-cname-frontend:$GITHUB_REF_NAME"
77+
docker push "illasoft/illa-builder-cname-frontend:$GITHUB_REF_NAME"
78+
79+
- uses: actions/checkout@v4
80+
with:
81+
repository: illacloud/k8s-application-do
82+
token: ${{ secrets.ILLA_BOT_TOKEN }}
83+
path: k8s-application-do
84+
85+
- name: Deploy to Kubernetes
86+
run: |
87+
cd k8s-application-do/namespace-$ILLA_APP_ENV
88+
kubectl apply -f ./illa-builder-cname-frontend/ -n $ILLA_APP_ENV
89+
kubectl -n $ILLA_APP_ENV rollout restart deployment illa-builder-cname-frontend

README-CN.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
<br>
1717
<p align="center">
1818
<a href="https://cloud.illacloud.com?utm_source=github&utm_medium=readme&utm_campaign=github-readme">
19-
<img width="800" alt="GitHub - Readme - jp" src="https://github.com/illacloud/illa-builder/assets/112603073/bbeaaa07-f8e8-45ae-9aaf-6dde05b7926c">
19+
<img width="800" alt="GitHub - Readme - jp" src="https://github.com/illacloud/illa-builder/assets/112603073/f3e7105a-b50d-461b-b3b7-a031c43d9465">
2020
</a>
2121
</p>
2222

23-
2423
[![Discord](https://img.shields.io/badge/chat-Discord-7289DA?logo=discord)](https://discord.gg/illacloud)
2524
[![Twitter](https://img.shields.io/badge/Twitter-1DA1F2?logo=x&logoColor=white)](https://twitter.com/illa_cloud)
2625
[![Discussions](https://img.shields.io/badge/discussions-GitHub-333333?logo=github)](https://github.com/orgs/illacloud/discussions)

README-DE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<br>
1616
<p align="center">
1717
<a href="https://cloud.illacloud.com?utm_source=github&utm_medium=readme&utm_campaign=github-readme">
18-
<img width="800" alt="GitHub - Readme - jp" src="https://github.com/illacloud/illa-builder/assets/112603073/4c9b27c1-b3c4-4c55-99c4-4e3cb529d236">
18+
<img width="800" alt="GitHub - Readme - jp" src="https://github.com/illacloud/illa-builder/assets/112603073/1a4b64ac-1384-4eaf-9b3c-9b0b278b40fe">
1919
</a>
2020
</p>
2121

README-JP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<br>
1717
<p align="center">
1818
<a href="https://cloud.illacloud.com?utm_source=github&utm_medium=readme&utm_campaign=github-readme">
19-
<img width="800" alt="GitHub - Readme - jp" src="https://github.com/illacloud/illa-builder/assets/112603073/797f4934-3bf2-4b91-8877-e370e5fda142">
19+
<img width="800" alt="GitHub - Readme - jp" src="https://github.com/illacloud/illa-builder/assets/112603073/eeb65cb6-e307-4f16-9a7a-2fcb9d3a37a3">
2020
</a>
2121
</p>
2222

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ English | <a href="https://github.com/illacloud/illa-builder/blob/beta/README-CN
1616
<br>
1717
<p align="center">
1818
<a href="https://cloud.illacloud.com?utm_source=github&utm_medium=readme&utm_campaign=github-readme">
19-
<img width="800" alt="Github(1)" src="https://github.com/illacloud/illa-builder/assets/112603073/37e2cc1b-efeb-4a95-9719-76022ac49191">
19+
<img width="800" alt="Github(1)" src="https://github.com/illacloud/illa-builder/assets/112603073/fdc4c02b-e412-4c41-8240-8077d4447ebc">
2020
</a>
2121
</p>
2222

apps/builder/index.html

Lines changed: 72 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link href="/src/assets/favicon.ico" rel="icon" type="image/svg+xml" />
5+
6+
<link href="/favicon.png" rel="icon" type="image/svg+xml" />
67
<meta
78
name="viewport"
89
content="width=device-width, initial-scale=1.0, maximum-scale=1"
@@ -19,9 +20,76 @@
1920
/>
2021
<link href="/public/font-family/Fira-code/fira_code.css" rel="stylesheet" />
2122
<link href="/public/font-family/Inter/inter.css" rel="stylesheet" />
22-
<title>
23-
ILLA Builder - An open-source low-code Platform for Developers.
24-
</title>
23+
<title>Loading...</title>
24+
<script>
25+
function createFavicon() {
26+
const newFavicon = document.createElement("link")
27+
newFavicon.rel = "icon"
28+
document.getElementsByTagName("head")[0].appendChild(newFavicon)
29+
return newFavicon
30+
}
31+
32+
function setFavicon(faviconHref) {
33+
const linkElements = document.getElementsByTagName("link")
34+
35+
const faviconElements = []
36+
37+
for (let i = 0; i < linkElements.length; i++) {
38+
const link = linkElements[i]
39+
if (link.rel.toLowerCase() === "icon") {
40+
faviconElements.push(link)
41+
}
42+
}
43+
44+
if (faviconElements.length === 0) {
45+
const element = createFavicon()
46+
element.href = faviconHref
47+
} else {
48+
faviconElements.forEach((faviconElement) => {
49+
faviconElement.href = faviconHref
50+
})
51+
}
52+
}
53+
54+
async function validateCustomDomain() {
55+
const origin = location.origin
56+
if (origin !== "%ILLA_BUILDER_URL%") {
57+
window.customDomain = location.host
58+
try {
59+
const response = await fetch(
60+
`https://%ILLA_API_BASE_URL%/supervisor/api/v1/domain/validate`,
61+
{
62+
method: "POST",
63+
headers: {
64+
"Content-Type": "application/json",
65+
},
66+
body: JSON.stringify({ customDomain: location.host }),
67+
},
68+
)
69+
const data = await response.json()
70+
window.currentTeamIdentifier = data.teamIdentifier
71+
if (!data.customDomainAvaliable) {
72+
const redirectURL = window.location.href.replace(
73+
`https://${window.location.host}/cloud`,
74+
"%ILLA_CLOUD_URL%",
75+
)
76+
window.location.href = `%ILLA_CLOUD_URL%/redirect-expired?redirectURL=${redirectURL}`
77+
return
78+
}
79+
if (data.favicon) {
80+
setFavicon(data.favicon)
81+
} else {
82+
setFavicon("/ILLAFavicon.ico")
83+
}
84+
} catch {
85+
setFavicon("/ILLAFavicon.ico")
86+
}
87+
} else {
88+
setFavicon("/ILLAFavicon.ico")
89+
}
90+
}
91+
validateCustomDomain()
92+
</script>
2593
</head>
2694
<body>
2795
<div id="root"></div>

apps/builder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"private": true,
66
"author": "ILLA Cloud <[email protected]>",
77
"license": "Apache-2.0",
8-
"version": "4.4.12",
8+
"version": "4.5.0",
99
"scripts": {
1010
"dev": "vite --strictPort --force",
1111
"build-cloud": "NODE_OPTIONS=--max-old-space-size=12288 vite build --mode cloud",
622 Bytes
Binary file not shown.

apps/builder/public/favicon.png

133 Bytes
Loading

0 commit comments

Comments
 (0)