Skip to content

Commit 660689e

Browse files
committed
Revert "RM-3487: remove gitlab_ci profile, replaced by gitlab MAVEN_SETTINGS CI variable"
This reverts commit c6c3162.
1 parent c6c3162 commit 660689e

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

pom.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,42 @@
4343
</distributionManagement>
4444
</profile>
4545

46+
<profile>
47+
<!-- set gitlab profile active when run by gitlab CI -->
48+
<id>gitlab_ci</id>
49+
<activation>
50+
<property>
51+
<name>env.GITLAB_CI</name>
52+
<value>true</value>
53+
</property>
54+
</activation>
55+
56+
<distributionManagement>
57+
<!-- env variables are available, when run by gitlab CI -->
58+
<repository>
59+
<id>gitlab.ext.cyber.ee</id>
60+
<url>${env.CI_SERVER_URL}/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url>
61+
</repository>
62+
<snapshotRepository>
63+
<id>gitlab.ext.cyber.ee</id>
64+
<url>${env.CI_SERVER_URL}/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url>
65+
</snapshotRepository>
66+
</distributionManagement>
67+
</profile>
4668
</profiles>
4769

70+
71+
<!--distributionManagement>
72+
<repository>
73+
<id>gitlab.ext.cyber.ee</id>
74+
<url>https://gitlab.ext.cyber.ee/api/v4/projects/58/packages/maven</url>
75+
</repository>
76+
<snapshotRepository>
77+
<id>gitlab.ext.cyber.ee</id>
78+
<url>https://gitlab.ext.cyber.ee/api/v4/projects/58/packages/maven</url>
79+
</snapshotRepository>
80+
</distributionManagement-->
81+
4882
<dependencies>
4983

5084
</dependencies>
@@ -88,6 +122,7 @@
88122
<source>
89123
try {
90124
println "active profiles: ${project.activeProfiles}"
125+
println "url: ${url}"
91126
println "project.distributionManagement.repository.id: ${project.distributionManagement.repository.id}"
92127
println "project.distributionManagement.repository.url: ${project.distributionManagement.repository.url}"
93128
//project.getProperties().setProperty('cdoc2-key-capsules-openapi.version', openapi.info.version)

0 commit comments

Comments
 (0)