1

We are trying to build and deploy our applications in openshift.

By default, the openshift is taking default maven settings.xml for building the application, which in-turn try to download the jars from repo https://repo1.maven.org/maven2.

We have jfrog repository, which we use to publish all our private artifacts(also has authentication to publish and access the artifacts), we have custom settings.xml generated from jfrog which we are using in local machines/servers to build the applications.

currently i tried the following step to configure our(custom) settings.xml in openshift, but its not working

Created a config map in open shift using below command

oc create configmap mavensettings --from-file=settings.xml=settings.xml

Added the above created configmap in buildconfig yml

sourceSecret:
  name: appresource
configMaps:
  - configMap:
      name: mavensettings 

but, this is not working,

any suggestion on how use custom settings.xml(jfrog repository in our case) in openshit to build the applications or an alternative way to download the artifacts from private repository during build in openshift? any suggestion is helpful

Vishal Vasani
  • 647
  • 8
  • 16
Nishu
  • 95
  • 3
  • 12

1 Answers1

0

According to the official document for s2i openjdk image at Red Hat, you can put the custom settings.xml file on ${S2I_SOURCE_DIR}/configuration/settings.xml.

Provide custom Maven settings To specify a custom settings.xml file along with Maven arguments, create the source_dir/configuration directory and place the settings.xml file inside.

Sample path should be similar to: source_dir/configuration/settings.xml.

*1: https://access.redhat.com/documentation/en-us/openjdk/11/html-single/using_openjdk_11_source-to-image_for_openshift/index#s2i-openshift-config-maven

hiroyukik
  • 713
  • 1
  • 6
  • 14