Hello,
I am attempting to setup a CI build using a docker runner which builds our jars using Ant + Ivy. I have successfully configured the runner to build our docker images based on one project and successfully configured another project to upload artifacts to Gitlabs “Generic” package registry. What I am unable to figure out is how to publish our jars to the Maven registry. Is this possible considering Ivy and Maven are so so integrated ? I would like to use the CI-Job-Token authentication method.
Does anyone know what the equivalent Ivy settings files are that I need to configure to authenticate and publish?
This is my ivysettings.xml file, which I have no idea if it is correct.
<ivysettings>
<include url="${basedir}/ivysettings-gitlab.xml"/>
<include url="${basedir}/ivysettings-public.xml"/>
<include url="${basedir}/ivysettings-shared.xml"/>
<include url="${basedir}/ivysettings-local.xml"/>
<include url="${basedir}/ivysettings-main-chain.xml"/>
<include url="${basedir}/ivysettings-default-chain.xml"/>
<settings defaultResolver="default">
<servers>
<server>
<id>gitlab-maven</id>
<configuration>
<httpHeaders>
<property>
<name>Job-Token</name>
<value>${env.CI_JOB_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>
</ivysettings>
And my ivysettings-gitlab.xml file
<ivysettings>
<resolvers>
<url name="gitlab" m2compatible="true">
<ivy pattern="${env.CI_SERVER_URL}/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven/[organisation]/[module]/ivy-[revision](-[classifier]).xml"/>
<artifact pattern="${env.CI_SERVER_URL}/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven/[organisation]/[module]/ivy-[revision](-[classifier]).[ext]"/>
</url>
</resolvers>
</ivysettings>
Sorry if I am missing any details, I am a co-op student who just found out what Maven and Ivy is 2 months ago, so I am still very fuzzy on most topics.
Thanks in advance!