代码拉取完成,页面将自动刷新
stages:
- main
- sync
main:
stage: main
image: maven:3.6.3-jdk-8
variables:
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
cache:
paths:
- .m2/repository
script:
- GPG_FILE=`find / -name xuxiaowei_0x30F97859_SECRET`
- echo $GPG_FILE
- gpg --import $GPG_FILE
- sed -i "s#</servers>#<server><id>ossrh</id><username>$ossrh_user</username><password>$ossrh_pass</password></server>&#" settings.xml
- git --version
- NAME=`mvn help:evaluate -Dexpression=project.name -q -DforceStdout -s settings.xml`
- VERSION=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout -s settings.xml`
- PACKAGING=`mvn help:evaluate -Dexpression=project.packaging -q -DforceStdout -s settings.xml`
- echo 名称:$NAME
- echo 版本:$VERSION
- echo 包:$PACKAGING
- echo 常量网址:https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
- echo 当前分支:$CI_COMMIT_BRANCH
- echo 主分支:$CI_DEFAULT_BRANCH
- echo 项目路径:$CI_PROJECT_DIR
- mvn clean -U package source:jar javadoc:jar deploy -Pgpg -DskipTests -s settings.xml && echo 发布完成
artifacts:
paths:
- target/spring-boot-starter-wechat-offiaccount-*
rules:
- if: $CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "next"
changes:
- ".mvn/**/*"
- "src/**/*"
- ".gitlab-ci.yml"
- "mvnw"
- "mvnw.cmd"
- "pom.xml"
- "settings.xml"
- "!README.md"
include:
- project: xuxiaowei-com-cn/spring-boot-starter
file: sync.yml
ref: main
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。