From afc2f2d96066f285c7ef02322c207bb466cbadcc Mon Sep 17 00:00:00 2001 From: BugKing Date: Fri, 18 Dec 2020 11:57:58 +0800 Subject: [PATCH 1/6] =?UTF-8?q?build:=20=E5=A2=9E=E5=8A=A0=20Jenkinsfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000..ac1493e11a --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,28 @@ +pipeline { + agent { + node { + label 'master' + } + } + options { quietPeriod(2400) } + parameters { + string(name: 'IMAGE_NAME', defaultValue: 'metersphere', description: '构建后的 Docker 镜像名称') + string(name: 'IMAGE_FREFIX', defaultValue: 'registry.cn-qingdao.aliyuncs.com/metersphere', description: '构建后的 Docker 镜像带仓库名的前缀') + } + stages { + stage('Build/Test') { + steps { + configFileProvider([configFile(fileId: 'metersphere-maven', targetLocation: 'settings.xml')]) { + sh "mvn clean package --settings ./settings.xml" + } + } + } + stage('Docker build & push') { + steps { + sh "docker build --build-arg MS_VERSION=${TAG_NAME:-$BRANCH_NAME}-b${BUILD_NUMBER} -t ${IMAGE_NAME}:${TAG_NAME:-$BRANCH_NAME} ." + sh "docker tag ${IMAGE_NAME}:${TAG_NAME:-$BRANCH_NAME} ${IMAGE_FREFIX}/${IMAGE_NAME}:${TAG_NAME:-$BRANCH_NAME}" + sh "docker push ${IMAGE_FREFIX}/${IMAGE_NAME}:${TAG_NAME:-$BRANCH_NAME}" + } + } + } +} From 18e32230d05222a1640de3ac820bf7491792b83b Mon Sep 17 00:00:00 2001 From: BugKing Date: Fri, 18 Dec 2020 12:04:00 +0800 Subject: [PATCH 2/6] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=20submodule?= =?UTF-8?q?=20=E5=9C=B0=E5=9D=80=E4=B8=BA=20ssh=20=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 98dd969402..417c9cca52 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "backend/src/main/java/io/metersphere/xpack"] path = backend/src/main/java/io/metersphere/xpack - url = https://github.com/metersphere/xpack-backend.git + url = git@github.com:metersphere/xpack-backend.git [submodule "frontend/src/business/components/xpack"] path = frontend/src/business/components/xpack - url = https://github.com/metersphere/xpack-frontend.git + url = git@github.com:metersphere/xpack-frontend.git From 602e5009268ef6280284b37dcbb62eee410da425 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Fri, 18 Dec 2020 12:58:17 +0800 Subject: [PATCH 3/6] =?UTF-8?q?fix:=E9=A6=96=E9=A1=B5=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/components/api/router.js | 1 - .../components/common/head/HeaderTopMenus.vue | 21 ++++++++++++++----- frontend/src/business/components/xpack | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/frontend/src/business/components/api/router.js b/frontend/src/business/components/api/router.js index ab570f38ac..3b32bbc216 100644 --- a/frontend/src/business/components/api/router.js +++ b/frontend/src/business/components/api/router.js @@ -3,7 +3,6 @@ import MsProject from "@/business/components/settings/project/MsProject"; export default { path: "/api", name: "api", - redirect: "/api/home", components: { content: () => import('@/business/components/api/ApiTest') }, diff --git a/frontend/src/business/components/common/head/HeaderTopMenus.vue b/frontend/src/business/components/common/head/HeaderTopMenus.vue index 57907d9c7a..a8fb2db8eb 100644 --- a/frontend/src/business/components/common/head/HeaderTopMenus.vue +++ b/frontend/src/business/components/common/head/HeaderTopMenus.vue @@ -9,17 +9,17 @@ router> - {{$t('test_track.test_track')}} + {{ $t('test_track.test_track') }} - - {{$t('commons.api')}} + + {{ $t('commons.api') }} - {{$t('commons.performance')}} + {{ $t('commons.performance') }} - {{$t('commons.system_setting')}} + {{ $t('commons.system_setting') }} @@ -47,7 +47,18 @@ }, methods: { handleSelect(index) { + console.log(index) this.activeIndex = index + + }, + active() { + if (this.activeIndex === '/api') { + if (this.$store.state.switch.value == 'new') { + window.location.href = "/#/api/home"; + } else if (this.$store.state.switch.value == 'old') { + window.location.href = "/#/api/home_obsolete"; + } + } } } } diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index d39dafaf84..010ad7a5f0 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit d39dafaf84b9c7a56cb51f2caf67dd7dfde5938c +Subproject commit 010ad7a5f072a5e9d368c756a2473bbd20781433 From 2cebe9763e5fd92bb56e84e14a7c67dbe347c115 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 18 Dec 2020 13:22:16 +0800 Subject: [PATCH 4/6] =?UTF-8?q?refactor:=20=E8=AE=BE=E7=BD=AElimit?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=A4=9A=E4=B8=AAjob?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/xpack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index efb49c9b4b..39ca4aba6f 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit efb49c9b4be136ce48e9550dc9c8a2975d9f4d7f +Subproject commit 39ca4aba6f5829df6ff27c341e59f943510b761f From f4430b16bc1844cc02e879407317603beba38798 Mon Sep 17 00:00:00 2001 From: BugKing Date: Fri, 18 Dec 2020 13:39:56 +0800 Subject: [PATCH 5/6] =?UTF-8?q?build:=20=E8=BD=AC=E4=B9=89=20Jenkinsfile?= =?UTF-8?q?=20=E4=B8=AD=E7=9A=84=E5=8F=98=E9=87=8F=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ac1493e11a..a2855eb4f1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,9 +19,9 @@ pipeline { } stage('Docker build & push') { steps { - sh "docker build --build-arg MS_VERSION=${TAG_NAME:-$BRANCH_NAME}-b${BUILD_NUMBER} -t ${IMAGE_NAME}:${TAG_NAME:-$BRANCH_NAME} ." - sh "docker tag ${IMAGE_NAME}:${TAG_NAME:-$BRANCH_NAME} ${IMAGE_FREFIX}/${IMAGE_NAME}:${TAG_NAME:-$BRANCH_NAME}" - sh "docker push ${IMAGE_FREFIX}/${IMAGE_NAME}:${TAG_NAME:-$BRANCH_NAME}" + sh "docker build --build-arg MS_VERSION=\${TAG_NAME:-\$BRANCH_NAME}-b\${BUILD_NUMBER} -t ${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME} ." + sh "docker tag ${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME} ${IMAGE_FREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}" + sh "docker push ${IMAGE_FREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME}" } } } From 92a7460eee3024b681a8ae92110dd4962b67d364 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 18 Dec 2020 14:24:05 +0800 Subject: [PATCH 6/6] =?UTF-8?q?refactor:=20=E8=AE=BE=E7=BD=AE=E4=B8=B4?= =?UTF-8?q?=E6=97=B6=E7=9A=84=20test=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/xpack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 39ca4aba6f..7e32340f93 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 39ca4aba6f5829df6ff27c341e59f943510b761f +Subproject commit 7e32340f93c59e1b26332632ebae2eb83fbb6059