提交 b0882be1 authored 作者: Matrix's avatar Matrix

[cicd] 脚本测试29

上级 4e2f1263
流水线 #248 已失败 于阶段
in 4 秒
image: maven:3.3.9-jdk-8
variables:
MAVEN_OPTS: "-Dmaven.repo.local=/cache/.m2/repository -s $HOME/.m2/settings.xml"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true"
stages:
- build
- deploy
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_NAME"'
cache:
paths:
- /cache/.m2/repository
- target/
before_script:
- echo '<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>/cache/.m2/repository</localRepository>
<mirrors>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
</settings>' > $HOME/.m2/settings.xml
# 构建jar包
build:
stage: build
tags:
- java
script:
- cd $HOME
- pwd
- cat $HOME/.m2/settings.xml
- mvn -v
#
## 运行jar包
#deploy:
# stage: deploy
# tags:
# - java
# script:
# - nohup java -jar *.jar &
- mvn clean package -DskipTests=true -P dev
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论