mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-23 00:05:52 +01:00
Update .m2/settings.xml, .gitlab-ci.yml files
This commit is contained in:
parent
e90ceab393
commit
e840025e45
33
.gitlab-ci.yml
Normal file
33
.gitlab-ci.yml
Normal file
@ -0,0 +1,33 @@
|
||||
image: maven:3-openjdk-8-slim
|
||||
|
||||
variables:
|
||||
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
|
||||
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
|
||||
|
||||
before_script:
|
||||
- apt-get update -qq
|
||||
# Setup SSH deploy keys
|
||||
- 'which ssh-agent || ( apt-get install -qq openssh-client )'
|
||||
- eval $(ssh-agent -s)
|
||||
- ssh-add <(echo "$SSH_PRIVATE_KEY")
|
||||
- mkdir -p ~/.ssh
|
||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .m2/repository/
|
||||
- target/
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- mvn $MAVEN_CLI_OPTS package
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
script:
|
||||
- mvn $MAVEN_CLI_OPTS deploy
|
||||
- ssh lumine@proxy.mythiccraft.io -p 2222 "mkdir -p /tmp/builds/$CI_JOB_ID && exit"
|
||||
- scp -rp -o StrictHostKeyChecking=no -o Port=2222 ./target/ lumine@proxy.mythiccraft.io:/tmp/builds/$CI_JOB_ID/
|
||||
only:
|
||||
- master
|
9
.m2/settings.xml
Normal file
9
.m2/settings.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<settings>
|
||||
<servers>
|
||||
<server>
|
||||
<id>nexus</id>
|
||||
<username>${env.M2_REPO_USER}</username>
|
||||
<password>${env.M2_REPO_PASS}</password>
|
||||
</server>
|
||||
</servers>
|
||||
</settings>
|
Loading…
Reference in New Issue
Block a user