|
@@ -1,57 +0,0 @@
|
|
|
-stages:
|
|
|
- - build
|
|
|
- - deploy
|
|
|
-# mvn打包
|
|
|
-build:
|
|
|
- stage: build
|
|
|
- only:
|
|
|
- - dev_01
|
|
|
- script:
|
|
|
- - $MAVEN_HOME/bin/mvn clean package '-Dmaven.test.skip=true'
|
|
|
- - cp ./vctgo-auth/target/vctgo-auth.jar /usr/local/jnrz-service-saas-multi-tenant/docker/vctgo/auth/jar/
|
|
|
- - cp ./vctgo-gateway/target/vctgo-gateway.jar /usr/local/jnrz-service-saas-multi-tenant/docker/vctgo/gateway/jar/
|
|
|
- - cp ./vctgo-modules/vctgo-file/target/vctgo-file.jar /usr/local/jnrz-service-saas-multi-tenant/docker/vctgo/modules/file/jar/
|
|
|
- - cp ./vctgo-modules/vctgo-system/target/vctgo-system.jar /usr/local/jnrz-service-saas-multi-tenant/docker/vctgo/modules/system/jar/
|
|
|
- - cp ./vctgo-modules/jnrz-toy/target/jnrz-toy.jar /usr/local/jnrz-service-saas-multi-tenant/docker/vctgo/modules/toy/jar/
|
|
|
- - cp ./vctgo-modules/jnrz-book/target/jnrz-book.jar /usr/local/jnrz-service-saas-multi-tenant/docker/vctgo/modules/book/jar/
|
|
|
- - cp ./vctgo-modules/jnrz-activity/target/jnrz-activity.jar /usr/local/jnrz-service-saas-multi-tenant/docker/vctgo/modules/activity/jar/
|
|
|
- #- cp ./vctgo-modules/jnrz-process/target/jnrz-process.jar /usr/local/jnrz-service-saas-multi-tenant/docker/vctgo/modules/process/jar/
|
|
|
- #- cp ./vctgo-modules/jnrz-message/target/jnrz-message.jar /usr/local/jnrz-service-saas-multi-tenant/docker/vctgo/modules/message/jar/
|
|
|
- - cp ./vctgo-modules/jnrz-profile/target/jnrz-profile.jar /usr/local/jnrz-service-saas-multi-tenant/docker/vctgo/modules/profile/jar/
|
|
|
- - rm -rf /usr/local/jnrz-service-saas-multi-tenant/docker/nginx/html/platform/
|
|
|
- - docker exec npmtools bash -c 'cd vctgo-ui && rm -rf `ls | grep -v "node_modules"`'
|
|
|
- - docker cp ./vctgo-ui npmtools:/
|
|
|
- - docker exec npmtools bash -c "cd vctgo-ui && npm i && export NODE_OPTIONS=--openssl-legacy-provider && npm run build:test"
|
|
|
- - docker cp npmtools:/vctgo-ui/dist/ /usr/local/jnrz-service-saas-multi-tenant/docker/nginx/html/platform
|
|
|
- - rm -rf /usr/local/jnrz-service-saas-multi-tenant/docker/nginx/html/kindergarten/
|
|
|
- - docker exec npmtools bash -c 'cd vctgo-ui-kindergarten && rm -rf `ls | grep -v "node_modules"`'
|
|
|
- - docker cp ./vctgo-ui-kindergarten npmtools:/
|
|
|
- - docker exec npmtools bash -c "cd vctgo-ui-kindergarten && npm i && export NODE_OPTIONS=--openssl-legacy-provider && npm run build:test"
|
|
|
- - docker cp npmtools:/vctgo-ui-kindergarten/dist/ /usr/local/jnrz-service-saas-multi-tenant/docker/nginx/html/kindergarten
|
|
|
- #- rm -rf /usr/local/jnrz-service-saas-multi-tenant/docker/nginx/html/expert/
|
|
|
- #- docker exec npmtools bash -c 'cd vctgo-ui-expert && rm -rf `ls | grep -v "node_modules"`'
|
|
|
- #- docker cp ./vctgo-ui-expert npmtools:/
|
|
|
- #- docker exec npmtools bash -c "cd vctgo-ui-expert && npm i && export NODE_OPTIONS=--openssl-legacy-provider && npm run build:test"
|
|
|
- #- docker cp npmtools:/vctgo-ui-expert/dist/ /usr/local/jnrz-service-saas-multi-tenant/docker/nginx/html/expert
|
|
|
- tags:
|
|
|
- - test-ci/cd
|
|
|
-# 部署测试服务器
|
|
|
-deploy:
|
|
|
- stage: deploy
|
|
|
- only:
|
|
|
- - dev_01
|
|
|
- script:
|
|
|
- - cd /usr/local/jnrz-service-saas-multi-tenant/docker
|
|
|
- - /usr/local/bin/docker-compose down
|
|
|
- - docker tag node:latest docker_jnrz_system:latest
|
|
|
- - docker rmi $(docker images | grep docker_ | awk '{print $1}')
|
|
|
- - docker rmi nginx:latest
|
|
|
- - docker rmi mysql:5.7
|
|
|
- - /usr/local/bin/docker-compose up -d vctgo-mysql vctgo-redis vctgo-nacos
|
|
|
- # - /usr/local/bin/docker-compose up -d vctgo-nginx vctgo-gateway vctgo-auth vctgo-system vctgo-file jnrz-toy jnrz-activity jnrz-process jnrz-message jnrz-profile
|
|
|
- - /usr/local/bin/docker-compose up -d vctgo-nginx vctgo-gateway vctgo-auth vctgo-system vctgo-file jnrz-toy jnrz-activity jnrz-profile jnrz-book
|
|
|
- - docker system prune -f
|
|
|
- - docker volume prune -f
|
|
|
- tags:
|
|
|
- - test-ci/cd
|
|
|
-
|