Closed malenalbc closed 6 months ago
We are also having the same problem... 🤔
yeah same here
It's been a while and I don't remember exactly how I made it work, but after some tinkering it did run on the CI properly. I added logs in the bash script to see if the flavour file was really being created or populated properly and it wasn't, so hopefully this will be a tip for people.
Leaving my setup, also, in case it helps:
build.gradle
secrets {
defaultPropertiesFileName = 'local.defaults.properties'
}
I have three files in the project root directory: local.defaults.properties
, test.properties
, staging.properties
, production.properties
(The flavour ones are git ignored).
In my yml file:
- step: &Create-Test-properties
name: Create-Test-properties
script:
- echo API_KEY1=$MY_SECRET_VAR1 > test.properties
- echo API_KEY2=$MY_SECRET_VAR2 >> test.properties
artifacts:
- test.properties
(...)
pipelines:
"{branch}":
- step: *(...)
- step: *Create-Test-properties
- step: *(...)
Also closing this since it feels it was more of a yml configuration issue, not a plugin one.
Followed the notes in the docs and created three files:
test.properties
,staging.properties
,production.properties
. They work properly locally.Now, on the CI (Bitbucket, yml), I have a first step on pipelines that dumps the keys into each build variant file, like this:
Problem is, the error seem to imply that the plugin will go to
local.properties
and ignore the build-variant files:Is there a step I'm missing? Configuration options only mentions
defaultPropertiesFileName
for CI but then it'll use the default file, not the specific ones.