build: 前端应用部署。
Some checks are pending
CI / Test (ubuntu-latest) (push) Waiting to run
CI / Test (windows-latest) (push) Waiting to run
CI / Lint (ubuntu-latest) (push) Waiting to run
CI / Lint (windows-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / CI OK (push) Blocked by required conditions
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
Deploy Website on push / Deploy Push Playground Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Docs Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Antd Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Element Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Naive Ftp (push) Waiting to run
Deploy Website on push / Rerun on failure (push) Blocked by required conditions
Release Drafter / update_release_draft (push) Waiting to run
Some checks are pending
CI / Test (ubuntu-latest) (push) Waiting to run
CI / Test (windows-latest) (push) Waiting to run
CI / Lint (ubuntu-latest) (push) Waiting to run
CI / Lint (windows-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / CI OK (push) Blocked by required conditions
CodeQL / Analyze (javascript-typescript) (push) Waiting to run
Deploy Website on push / Deploy Push Playground Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Docs Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Antd Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Element Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Naive Ftp (push) Waiting to run
Deploy Website on push / Rerun on failure (push) Blocked by required conditions
Release Drafter / update_release_draft (push) Waiting to run
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
node_modules
|
**/node_modules
|
||||||
.git
|
.git
|
||||||
.gitignore
|
.gitignore
|
||||||
*.md
|
*.md
|
||||||
dist
|
**/dist
|
||||||
.turbo
|
.turbo
|
||||||
dist.zip
|
dist.zip
|
||||||
|
|||||||
39
Jenkinsfile_antd
Normal file
39
Jenkinsfile_antd
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
#!/usr/bin/env groovy
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
stage('build') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
file_contents = '''
|
||||||
|
VITE_GLOB_API_URL=${env.VITE_GLOB_API_URL}
|
||||||
|
'''
|
||||||
|
write_file_path = "apps/web-antd/.env.production.local"
|
||||||
|
writeFile file: write_file_path, text: file_contents, encoding: 'UTF-8'
|
||||||
|
}
|
||||||
|
script{
|
||||||
|
sh "docker build -f apps/web-antd/Dockerfile --build-arg BASE_URI=$BASE_URI -t $IMAGE_PATH ."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('deploy') {
|
||||||
|
steps {
|
||||||
|
script{
|
||||||
|
sh 'docker push $IMAGE_PATH'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
sh """
|
||||||
|
curl -X POST "${params.API_URL}/success"
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
sh """
|
||||||
|
curl -X POST "${params.API_URL}/failure"
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
21
apps/web-antd/Dockerfile
Normal file
21
apps/web-antd/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
FROM node:lts-alpine AS base
|
||||||
|
ENV PNPM_HOME="/pnpm"
|
||||||
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
ARG NPM_CONFIG_REGISTRY=https://registry.npmmirror.com
|
||||||
|
RUN npm config set registry ${NPM_CONFIG_REGISTRY}
|
||||||
|
RUN corepack enable
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
FROM base AS builder
|
||||||
|
COPY . .
|
||||||
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile
|
||||||
|
ARG RELATIVE_PATH=/
|
||||||
|
ARG BASE_URI=
|
||||||
|
RUN pnpm run build:antd -- --base=${RELATIVE_PATH}${BASE_URI}
|
||||||
|
|
||||||
|
FROM nginx:stable-alpine
|
||||||
|
ARG BASE_URI=
|
||||||
|
COPY --from=builder /app/apps/web-antd/dist /usr/share/nginx/html/${BASE_URI}
|
||||||
|
COPY --from=builder /app/scripts/deploy/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
EXPOSE 8080
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
export { default as Tinyflow } from './tinyflow.vue';
|
export { default as Tinyflow } from './Tinyflow.vue';
|
||||||
export * from './ui/typing';
|
export * from './ui/typing';
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { isNumber } from '@vben/utils';
|
|||||||
import { Button, Input, Select } from 'ant-design-vue';
|
import { Button, Input, Select } from 'ant-design-vue';
|
||||||
|
|
||||||
import { testWorkflow } from '#/api/ai/workflow';
|
import { testWorkflow } from '#/api/ai/workflow';
|
||||||
import { Tinyflow } from '#/components/tinyflow';
|
import { Tinyflow } from '#/components/Tinyflow';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
provider: any;
|
provider: any;
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
import { defineConfig } from '@vben/vite-config';
|
import { defineConfig } from '@vben/vite-config';
|
||||||
|
import { loadEnv } from 'vite';
|
||||||
|
|
||||||
export default defineConfig(async () => {
|
export default defineConfig(async ({ mode }) => {
|
||||||
|
const env = loadEnv(mode, process.cwd());
|
||||||
return {
|
return {
|
||||||
application: {},
|
application: {},
|
||||||
vite: {
|
vite: {
|
||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/admin-api': {
|
[env.VITE_GLOB_API_URL]: {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/admin-api/, ''),
|
|
||||||
// mock代理目标地址
|
// mock代理目标地址
|
||||||
target: 'http://localhost:48080/admin-api',
|
target: env.VITE_BASE_URL,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user