Merge pull request '添加local-test分支CICD配置' (#1) from develop into local-test
local-test-CICD / Docker-Build (push) Failing after 1m14s
Details
local-test-CICD / Docker-Build (push) Failing after 1m14s
Details
Reviewed-on: joylink/rtss-simulation-app-client#1
This commit is contained in:
commit
75797ebc40
|
@ -0,0 +1,53 @@
|
||||||
|
name: local-test-CICD
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- local-test
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Docker-Build:
|
||||||
|
runs-on: joylink-local233
|
||||||
|
steps:
|
||||||
|
- name: 检出代码
|
||||||
|
uses: https://gitea.joylink.club/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: 设置node环境
|
||||||
|
uses: https://gitea.joylink.club/actions/local-setup-node@v0.1.2
|
||||||
|
with:
|
||||||
|
version: 'v18.19.1'
|
||||||
|
cache: 'yarn'
|
||||||
|
cache-dependency-path: 'yarn.lock'
|
||||||
|
- name: 安装yarn,并run build
|
||||||
|
run: |
|
||||||
|
node -v
|
||||||
|
npm -v
|
||||||
|
npm config set registry https://registry.npmmirror.com
|
||||||
|
npm install --global yarn
|
||||||
|
yarn config set registry https://registry.npmmirror.com
|
||||||
|
yarn
|
||||||
|
yarn run build:local
|
||||||
|
tar czvf ./dist-test.tar.gz ./dist
|
||||||
|
- name: 打包发送到本地测试环境
|
||||||
|
uses: https://gitea.joylink.club/appleboy/scp-action@v0.1.7
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.LOCAL_233_SSH_HOST }}
|
||||||
|
username: ${{ secrets.LOCAL_233_SSH_USER }}
|
||||||
|
password: ${{ secrets.LOCAL_233_SSH_PASSWORD }}
|
||||||
|
port: ${{ secrets.LOCAL_233_SSH_PORT }}
|
||||||
|
source: ./dist-test.tar.gz
|
||||||
|
target: /home/minio/oss/rtss-simulation-app-client
|
||||||
|
overwrite: true
|
||||||
|
- name: SSH连接233并解压发布
|
||||||
|
uses: https://gitea.joylink.club/appleboy/ssh-action@v1.0.3
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.LOCAL_233_SSH_HOST }}
|
||||||
|
port: ${{ secrets.LOCAL_233_SSH_PORT }}
|
||||||
|
username: ${{ secrets.LOCAL_233_SSH_USER }}
|
||||||
|
password: ${{ secrets.LOCAL_233_SSH_PASSWORD }}
|
||||||
|
script: |
|
||||||
|
cd /home/minio/oss/rtss-simulation-app-client
|
||||||
|
rm -rf /usr/local/joylink/client/rtsa
|
||||||
|
mkdir -p /usr/local/joylink/client
|
||||||
|
tar xz --strip 2 -C /usr/local/joylink/client -f dist-test.tar.gz
|
||||||
|
- run: echo "This job's status is ${{ job.status }}."
|
|
@ -17,7 +17,7 @@
|
||||||
"@quasar/extras": "^1.16.4",
|
"@quasar/extras": "^1.16.4",
|
||||||
"axios": "^1.2.1",
|
"axios": "^1.2.1",
|
||||||
"google-protobuf": "^3.21.4",
|
"google-protobuf": "^3.21.4",
|
||||||
"jl-graphic": "git+http://120.46.212.6:3000/joylink/graphic-pixi.git#v0.1.15",
|
"jl-graphic": "git+https://gitea.joylink.club/joylink/graphic-pixi.git#v0.1.15",
|
||||||
"js-base64": "^3.7.5",
|
"js-base64": "^3.7.5",
|
||||||
"pinia": "^2.0.11",
|
"pinia": "^2.0.11",
|
||||||
"quasar": "^2.16.0",
|
"quasar": "^2.16.0",
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
const { configure } = require('quasar/wrappers');
|
const { configure } = require('quasar/wrappers');
|
||||||
|
|
||||||
const BasePath = '';
|
const BasePath = 'rtsa';
|
||||||
|
|
||||||
module.exports = configure(function (/* ctx */) {
|
module.exports = configure(function (/* ctx */) {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 4029b6c96f132115bba08c87bfd3470f3e2d872b
|
Subproject commit 1672a8c0e2b41c4076c1dc9ec852f425dcba21c3
|
|
@ -2,7 +2,7 @@ import axios, { AxiosInstance } from 'axios';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import { Dialog } from 'quasar';
|
import { Dialog } from 'quasar';
|
||||||
import { boot } from 'quasar/wrappers';
|
import { boot } from 'quasar/wrappers';
|
||||||
//import { getJwtToken } from 'src/configs/TokenManage';
|
import { getJwtToken } from 'src/configs/TokenManage';
|
||||||
import { getHttpBase } from 'src/configs/UrlManage';
|
import { getHttpBase } from 'src/configs/UrlManage';
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
declare module '@vue/runtime-core' {
|
||||||
|
@ -76,9 +76,9 @@ export default boot(({ app, router }) => {
|
||||||
// 拦截请求,添加
|
// 拦截请求,添加
|
||||||
api.interceptors.request.use(
|
api.interceptors.request.use(
|
||||||
(config) => {
|
(config) => {
|
||||||
//config.headers.Authorization = getJwtToken();
|
const token = getJwtToken();
|
||||||
config.headers.Authorization = 'Bearer 1e2d0d5d96034f4a0805af6512051ddc';
|
config.headers.Authorization = `Bearer ${token}`;
|
||||||
config.headers['Token'] = '1e2d0d5d96034f4a0805af6512051ddc';
|
config.headers['Token'] = token;
|
||||||
config.cancelToken = source.token;
|
config.cancelToken = source.token;
|
||||||
if (isOpenDialog) {
|
if (isOpenDialog) {
|
||||||
source.cancel();
|
source.cancel();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const JwtTokenKey = 'jwttoken';
|
const JwtTokenKey = 'jwttoken';
|
||||||
|
|
||||||
export function saveJwtToken(token: string) {
|
export function saveJwtToken(token: string) {
|
||||||
sessionStorage.setItem(JwtTokenKey, `Bearer ${token}`);
|
sessionStorage.setItem(JwtTokenKey, token);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getJwtToken(): string | null {
|
export function getJwtToken(): string | null {
|
||||||
|
|
|
@ -121,16 +121,21 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import SysMenu from 'src/components/SysMenu.vue';
|
import SysMenu from 'src/components/SysMenu.vue';
|
||||||
// import { useRouter } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { clearJwtToken } from 'src/configs/TokenManage';
|
import { clearJwtToken, saveJwtToken } from 'src/configs/TokenManage';
|
||||||
import { Dialog } from 'quasar';
|
import { Dialog } from 'quasar';
|
||||||
|
|
||||||
// const router = useRouter();
|
const route = useRoute();
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (route.params.token) {
|
||||||
|
saveJwtToken(route.params.token as string);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const leftDrawerOpen = ref(false);
|
const leftDrawerOpen = ref(false);
|
||||||
|
|
||||||
function toggleLeftDrawer() {
|
function toggleLeftDrawer() {
|
||||||
leftDrawerOpen.value = !leftDrawerOpen.value;
|
leftDrawerOpen.value = !leftDrawerOpen.value;
|
||||||
onResize();
|
onResize();
|
||||||
|
|
|
@ -3,13 +3,13 @@ import { RouteRecordRaw } from 'vue-router';
|
||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
redirect: '/home',
|
redirect: '/home/1e2d0d5d96034f4a0805af6512051ddc',
|
||||||
meta: {
|
meta: {
|
||||||
hidden: true,
|
hidden: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/home',
|
path: '/home/:token',
|
||||||
component: () => import('layouts/MainLayout.vue'),
|
component: () => import('layouts/MainLayout.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
hidden: true,
|
hidden: true,
|
||||||
|
|
Loading…
Reference in New Issue