For context, here’s the current (relevant) build.gradle
information.
ext {
nexusUsername = "$System.env.NEXUS_USERNAME"
nexusPassword = "$System.env.NEXUS_PASSWORD"
}
repositories {
maven {
url "https://repo.qixalite.com/repository/Qixalite-Private"
credentials {
username nexusUsername
password nexusPassword
}
}
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://repo.qixalite.com/repository/qixalite-private-releases/") {
authentication(userName: nexusUsername, password: nexusPassword)
}
snapshotRepository(url: "https://repo.qixalite.com/repository/qixalite-private-snapshot/") {
authentication(userName: nexusUsername, password: nexusPassword)
}
}
}
}
Because GitLab-CI’s runners are containerized we cannot use our normal method of putting the username/password inside of GRADLE_HOME
. Short of creating a custom docker container, obviously.
So our current system is that we have environmental variables setup (GitLab-CI through the project, developers through their own system) which have their username/passwords for the repository.
Users are allowed to pull from the repo, while the CI is using a username/password that allows it to deploy to the repo.
I’m curious if there is a better way to do this because a few of my developers have mentioned how dirty the current method feels.
Any help is appreciated! <3