代码拉取完成,页面将自动刷新
image: registry.cn-beijing.aliyuncs.com/yunyuncx/mvn:3.6.1
cache:
key: maven-repository-cache
paths:
- .m2
# 定义使用变量
variables:
GIT_STRATEGY: "clone"
MAVEN_OPTS: "-Dmaven.repo.local=.m2"
# 定义JOB
stages:
- win
- docker
standalone:
stage: win
script:
- rm -rf archive-admin/src/main/resources/static/css/*.css
- rm -rf archive-admin/src/main/resources/static/js/*.js
- rm -rf archive-admin/src/main/resources/static/static/js/*.js
- wget http://8.142.97.38:8212/source.zip
- unzip source.zip
- cp static/js/*.js archive-admin/src/main/resources/static/js
- cp base/static/css/*.css archive-admin/src/main/resources/static/css
- cp static/js/*.js archive-admin/src/main/resources/static/static/js
- mvn clean package -DskipTests
artifacts:
paths:
- archive-admin/target/archive-admin.jar
- archive-admin/target/lib/archive*.jar
- archive-admin/target/lib/meida*.jar
expire_in: 1 day
only:
- master
tags:
- bzds_api_dev
net:
stage: win
script:
- rm -rf archive-admin/src/main/resources/static
- rm -rf archive-admin/src/main/resources/application-dev.yml
- rm -rf archive-admin/src/main/resources/bootstrap.yml
- mv archive-admin/src/main/resources/bootstrap-net.yml archive-admin/src/main/resources/bootstrap.yml
- mvn clean package -DskipTests
artifacts:
paths:
- archive-admin/target/archive-admin.jar
- archive-admin/target/lib
expire_in: 1 day
only:
- master
when: manual
tags:
- bzds_api_dev
mvn-package:
stage: docker
script:
# - sed -i 's/localhost/192.168.0.142/g' pom.xml
# - sed -i 's/172.24.59.144/192.168.0.142/g' pom.xml
- rm -rf archive-admin/src/main/resources/static/css/*.css
- rm -rf archive-admin/src/main/resources/static/js/*.js
- rm -rf archive-admin/src/main/resources/static/static/js/*.js
- wget http://8.142.97.38:8212/source.zip
- apk add zip
- unzip source.zip
- cp static/js/*.js archive-admin/src/main/resources/static/js
- cp base/static/css/*.css archive-admin/src/main/resources/static/css
- cp static/js/*.js archive-admin/src/main/resources/static/static/js
- mvn clean package -DskipTests
artifacts:
paths:
- archive-admin/target/archive-admin.jar
- archive-admin/target/lib
expire_in: 1 day
only:
- master
when: manual
tags:
- bzds_api_dev
docker-run:
stage: docker
cache:
key: docker-images
when: manual
dependencies:
- mvn-package
script:
- mkdir /admin/ -p
- cp -r archive-admin/target/lib archive-admin/target/archive-admin.jar archive-admin/Dockerfile archive-admin/docker-compose.yml archive-admin/run.sh /admin/
- cd /admin
# - if [ "$(docker-compose ps -aq --filter name=archive-admin)" ]; then docker-compose down archive-admin && docker rm archive-admin ;fi
- docker-compose up -d
only:
- master
tags:
- bzds_api_dev
uos:
stage: docker
script:
# - sed -i 's/localhost/192.168.0.142/g' pom.xml
# - sed -i 's/172.24.59.144/192.168.0.142/g' pom.xml
- rm -rf archive-admin/src/main/resources/static/css/*.css
- rm -rf archive-admin/src/main/resources/static/js/*.js
- rm -rf archive-admin/src/main/resources/static/static/js/*.js
- wget http://8.142.97.38:8212/source.zip
- apk add zip
- unzip source.zip
- cp static/js/*.js archive-admin/src/main/resources/static/js
- cp base/static/css/*.css archive-admin/src/main/resources/static/css
- cp static/js/*.js archive-admin/src/main/resources/static/static/js
- mvn clean package -DskipTests
- mv archive-admin/target/lib archive-admin/target/archive-admin.jar archive-admin/Dockerfile archive-admin/docker-compose.yml archive-admin/run.sh .
- docker-compose build
- docker save -o archive.tar archive-admin:latest
- pwd && ls
only:
- master
when: manual
tags:
- bzds_api_dev
artifacts:
paths:
- archive.tar
expire_in: 1 day
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。