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 diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000000..a2855eb4f1 --- /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}" + } + } + } +} diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 61397c1672..7e32340f93 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 61397c16728a63493507679f7e0940d9099f337f +Subproject commit 7e32340f93c59e1b26332632ebae2eb83fbb6059 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