I am trying to use Google Cloud Build to build my Java app. It allows to use so called cloud builders - docker images of different builders. I am using Maven. So the problem is that I have to use a private repository (artifactory) to deploy artifacts. This rep is password protected and I do not know how to pass these credentials to GC maven docker container.
I see that the only possible way is:
To run the shell script which will update the maven container settings.xml with something like:
<servers> <server> <id>myRepoName</id> <username>${server.username}</username> <password>${server.password}</password> </server> </servers>
set env variables in the cloudbuild.yml
Are there any other elegant ways to achieve what I'm trying to?