Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit f11b2c8

Browse files
committed
Prepare to deploy to the Gitlab repository
1 parent 4313131 commit f11b2c8

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.gitlab-ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,22 @@ spotbugs-sast:
4949
before_script:
5050
- rm -rf example
5151

52+
release:
53+
stage: deploy
54+
script:
55+
- mvn $MAVEN_CLI_OPTS -s ci_settings.xml clean deploy -Dchangelist= -ntp -Psources,javadocs,release -DaltDeploymentRepository=gitlab-maven::default::${CI_SERVER_URL}/api/v4/projects/${CI_PROJECT_ID}/packages/maven
56+
only:
57+
- tags
58+
5259
pages:
5360
stage: deploy
5461
script:
5562
- cp changelog.md src/site/markdown
56-
- mvn clean verify site -Pjavadocs
63+
- mvn clean verify site -Dchangelist= -Pjavadocs
5764
- mv target/site public
5865
- mv target/apidocs public
5966
artifacts:
6067
paths:
6168
- public
69+
only:
70+
- tags

ci_settings.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
<servers>
6+
<server>
7+
<id>gitlab-maven</id>
8+
<configuration>
9+
<httpHeaders>
10+
<property>
11+
<name>Job-Token</name>
12+
<value>${env.CI_JOB_TOKEN}</value>
13+
</property>
14+
</httpHeaders>
15+
</configuration>
16+
</server>
17+
</servers>
18+
</settings>

0 commit comments

Comments
 (0)