提交 6bd1e669 authored 作者: Matrix's avatar Matrix

15

上级 c9a0f1d0
流水线 #270 已通过 于阶段
in 2 秒
image: maven:3.8.1-jdk-8
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
cache:
paths:
- /cache/.m2/repository
- target/
stages:
- build
- deploy
job1:
build:
stage: build
tags:
- docker
- lshell
script:
- mvn clean package -s $HOME/.m2/settings.xml
artifacts:
# GitLab 提供的環境變數,意思是產生出的成果下載時的檔名將會是專案名稱
name: "$CI_PROJECT_TITLE"
# 要保留哪些成果的路徑
paths:
- target/*.jar
expire_in: 1 day
- mvn -v
deploy:
stage: deploy
tags:
- lshell
script:
- echo 'deploy'
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论