unbroken-dome / gradle-helm-plugin

A Gradle plugin for building, publishing and managing Helm charts.
MIT License
52 stars 55 forks source link

Setting repository credentials with -P not working #179

Open bsgrd opened 6 months ago

bsgrd commented 6 months ago

Hi, I'm trying to publish my charts to chartmuseum with the helmPublish command. I have set up my build.gradle like below, but can't get it to read the properties form command line like this: ./gradlew helmPublish -Pchartmuseum_username=myuser -Pchartmuseum_password=mypass

helm {
    ...
    publishing {
        repositories {
            chartMuseum('mycharts') {
                url = uri('// removed')
                credentials {
                    username = findProperty('chartmuseum_username')
                    password = "findProperty('chartmuseum_password')
                }
            }
        }
    }
}

I have also tried a variety of other methods like "${chartmuseum_username}", getProeprty('chartmuseum_username'), System.property('chartmuseum_username') and so on. None have worked for me.

If I insert my username and password directly in the build.gradle file, it works fine. It also works fine if I define chartmuseum_username and chartmuseum_password in my global gradle.properties file.

Any idea what's going on? I'm using the exact same approach for publishing maven artifacts, and that works fine.

JamieSlome commented 4 months ago

Hey @bsgrd 👋

Just a heads up that this codebase is no longer actively maintained. As the original author recommends, you are welcome to open an issue here instead.

Our maintainers and contributors will be happy to support! ❤️