CI pipeline does not generate secrets.json
See original GitHub issueI am using version 2.0.0.8480-ci of Mobile.BuildTools in my Shared Xamarin project. I have defined a buildtools.json as shown below next to my solution file:
{
"$schema": "https://mobilebuildtools.com/schemas/v2/buildtools.schema.json",
"projectSecrets": {
"TI.Shared": {
"delimiter": ";",
"disable": false,
"className": "Secrets",
"namespace": "Helpers",
"properties": [
{
"name": "AppCenter_Android_Development_Secret",
"type": "Guid"
},
{
"name": "AppCenter_iOS_Development_Secret",
"type": "Guid"
},
{
"name": "AppCenter_Android_Production_Secret",
"type": "Guid"
},
{
"name": "AppCenter_iOS_Production_Secret",
"type": "Guid"
}
]
}
}
}
In my CI pipeline for Azure DevOps I have defined the variables as “Secret_AppCenter_iOS_Production_Secret” etc… but this is the error I get in my pipeline:
Build started 1/7/2020 10:39:56 PM.
Project "/Users/uioporqwerty/agents/agent_2/_work/2/s/src/TI.Android/TI.Android.csproj" on node 1 (PackageForAndroid;SignAndroidPackage target(s)).
_CleanIntermediateIfNuGetsChange:
Creating directory "obj/Debug/stamp/".
Creating "obj/Debug/stamp/_CleanIntermediateIfNuGetsChange.stamp" because "AlwaysCreate" was specified.
_ResolveSdks:
Found Java SDK version 1.8.0.
Found Java SDK version 1.8.0.
_ValidateAndroidPackageProperties:
PackageName: org.ti.mobile
Project "/Users/uioporqwerty/agents/agent_2/_work/2/s/src/TI.Android/TI.Android.csproj" (1) is building "/Users/uioporqwerty/agents/agent_2/_work/2/s/src/TI.Shared/TI.Shared.csproj" (2:2) on node 1 (default targets).
PrepareForBuild:
Creating directory "obj/Debug/netstandard2.0/".
ProcessScss:
Skipping target "ProcessScss" because it has no outputs.
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
BuildHostSecrets:
Output Path: /Users/uioporqwerty/agents/agent_2/_work/2/s/src/TI.Shared/secrets.json
No Build Host Secrets Found...
Secrets:
No Secrets Json File was found.
And then it eventually fails because it cannot find the namespace Helpers in TI.Shared. Is there a step I’m missing to set this up? I’ve combed through the docs and can’t find a reason why it should be failing to generate.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
The configuration file 'secrets.json' was not found and is not ...
User Secrets error is being generated in a CI/CD pipeline, when secrets.json file shouldn't be expected. Steps: Create .NET 5 project; Added ...
Read more >How do I create a JSON file containing secret variables in a ...
I'd like to deploy via FTP using a gulp task and secret variables, but I'm having a really hard time getting it to...
Read more >Don't generate new secrets by default (#222690) · Issues
We don't tell Omnibus users to back up secrets.yml , they should use gitlab-secrets.json (which writes secrets.yml ): ...
Read more >Secrets management for ASP.NET Core and Azure DevOps
In this post we will discover how to handle appsettings.json secrets (like API keys, passwords etc.) in a .NET app and eventually how...
Read more >Using secrets safely in development with .NET Core
Today we are going to use "User Secrets" to manage secrets in our .NET Core development environment. It's important to keep secrets out...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There are several known issues currently with the 2.0 CI builds which is why I haven’t released a preview
I’ve updated the integration tests to validate that they are generating the secrets.json in a CI pipeline and that is all working. You can look at the E2E folder to see how I’ve done that.