Skip to content

Commit 6801484

Browse files
committed
RM-3338: fix gitlab CI
1 parent a06f884 commit 6801484

File tree

1 file changed

+23
-35
lines changed

1 file changed

+23
-35
lines changed

pom.xml

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
</profile>
8787

8888
<profile>
89-
<!-- activate github profile when runned by github actions -->
89+
<!-- activate github profile when run by github actions -->
9090
<id>github</id>
9191
<activation>
9292
<property>
@@ -102,60 +102,48 @@
102102
</repositories>
103103
</profile>
104104

105-
<!--profile>
105+
<profile>
106+
<!-- set gitlab.ext profile active when run by gitlab CI -->
106107
<id>gitlab.ext</id>
108+
<activation>
109+
<property>
110+
<name>env.GITLAB_CI</name>
111+
<value>true</value>
112+
</property>
113+
</activation>
107114
<repositories>
108115
<repository>
109116
<id>gitlab.ext.cyber.ee</id>
110117
<url>https://gitlab.ext.cyber.ee/api/v4/projects/39/packages/maven</url>
111118
</repository>
112119
</repositories>
113-
</profile-->
120+
121+
<distributionManagement>
122+
<!-- env variables are available, when run by gitlab CI -->
123+
<repository>
124+
<id>gitlab.ext.cyber.ee</id>
125+
<url>${env.CI_SERVER_URL}/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url>
126+
</repository>
127+
<snapshotRepository>
128+
<id>gitlab.ext.cyber.ee</id>
129+
<url>${env.CI_SERVER_URL}/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url>
130+
</snapshotRepository>
131+
</distributionManagement>
132+
</profile>
114133
</profiles>
115134

116135
<repositories>
136+
<!-- for local development, configure your settings.xml or activate one of profiles above-->
117137
<!--repository>
118138
<id>gitlab.ext.cyber.ee</id>
119139
<url>https://gitlab.ext.cyber.ee/api/v4/projects/39/packages/maven</url>
120140
</repository-->
121-
<!--repository>
122-
<id>github</id>
123-
<url>https://maven.pkg.github.com/jann0k/cdoc2-java-ref-impl</url>
124-
</repository-->
125141
<!--repository>
126142
<id>github</id>
127143
<url>https://maven.pkg.github.com/open-eid/cdoc2-capsule-server</url>
128144
</repository-->
129145
</repositories>
130146

131-
132-
<!--distributionManagement>
133-
<repository>
134-
<id>github</id>
135-
<name>GitHub jann0k Maven Packages</name>
136-
<url>https://maven.pkg.github.com/jann0k/cdoc2-java-ref-impl</url>
137-
</repository>
138-
139-
<snapshotRepository>
140-
<id>github</id>
141-
<name>GitHub jann0k Maven Packages</name>
142-
<url>https://maven.pkg.github.com/jann0k/cdoc2-java-ref-impl</url>
143-
</snapshotRepository>
144-
</distributionManagement-->
145-
146-
147-
<!--distributionManagement>
148-
<repository>
149-
<id>gitlab.ext.cyber.ee</id>
150-
<url>https://gitlab.ext.cyber.ee/api/v4/projects/40/packages/maven</url>
151-
</repository>
152-
153-
<snapshotRepository>
154-
<id>gitlab.ext.cyber.ee</id>
155-
<url>https://gitlab.ext.cyber.ee/api/v4/projects/40/packages/maven</url>
156-
</snapshotRepository>
157-
</distributionManagement-->
158-
159147
<modules>
160148
<module>cdoc2-schema</module>
161149
<module>cdoc2-lib</module>

0 commit comments

Comments
 (0)