question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add ability to inject settings as CLI flag while creating a sandbox

See original GitHub issue

Would be great for automation to have an ability to override default metadata with altered metadata (ex. OCAPI settings). Proposal is to add new flag to below command:

sandbox:create --sandbox-metadata path_to_metadata.json

As example using SwaggerUI I can change some settings now but not via CLI tool. This adds additional complexity to automation scripts.

This is what I want to inject (to get last login date in future for monitoring purposes): { "_v": "18.1", "clients": [ { "client_id": "my_client_id", "resources": [ { "methods": [ "get", "post", "put", "patch", "delete" ], "read_attributes": "(**)", "write_attributes": "", "resource_id": "/**" }, { "methods": [ "get" ], "read_attributes": "(**)", "write_attributes": "(**)", "resource_id": "/users/this" } ] } ] }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
tobiaslohrcommented, Apr 2, 2020

Suggestion:

sfcc-ci sandbox:create --realm zzzz --ocapi-settings <ocapi-settings-as-json> --webdav-settings <webdav-settings-as-json> 
  • --ocapi-settings <ocapi-settings-as-json> optional, allows to pass OCAPI settings as JSON string
  • --webdav-settings <webdav-settings-as-json> optional, allows to pass WebDAV client permissions as JSON string

Note: Both settings amend the settings passed to the sandbox for the API client used by the CLI, they will NOT replace them them. This allows that the CLI is still able to control the sandbox. JSON validation is done syntactically. There is only a basic semantical check done, that ensures, the settings don’t include the same API key as used by the CLI. There is no schema check being done to the JSON. A syntactically proper JSON, but semantically improper JSON may lead to an issue with the sandbox after creation.

Feedback?

0reactions
astound-cicommented, Apr 2, 2020

Great news, we’ll try to make sure JSON string is correct on our end.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Embedding a command-line tool in a sandboxed app
When building an app for the Mac, you can embed a command-line tool in the app ... See the discussion of the Other...
Read more >
Develop Functions Using Sandbox Orgs | Salesforce Functions
When creating a sandbox using the Salesforce CLI, first create a sandbox definition file in your project's config directory, and then use sfdx ......
Read more >
List of Chromium Command Line Switches - Peter Beverloo
List of Chromium Command Line Switches. There are lots of command lines which can be used with the Google Chrome browser. Some change...
Read more >
How to Add a New Sandbox to your Pipeline
1. Navigate to your pipeline and click the + sign next to one of the existing environments on the Pipeline Configuration page to...
Read more >
Test the Privacy Sandbox ads relevance and measurement APIs
In previous origin trials sites have been able to test against ... the APIs making up an initial version of the end-to-end ad...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found