You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, services are an adhoc dict that gets stored in the keychain based on whatever the cli is doing - but tasks expect services to:
exist,
be configured, &
have certain properties
Additionally, there is no way for users of the tool to add their own arbitrary services to the keychain (or add an additional attribute for a service).
Lastly, there is currently no way to determine which services a project may include tasks for.
I propose that the cumulusci.yml file add a services node at both the global and project level.
Configuration
services:
github:
description: Configure connection for github tasks, e.g. Create Release
attributes:
username:
description: The Github username to use for tasks
required: True
password:
description: Github password to use for tasks. It is recommended to use a Github Application Token instead of password to allow bypassing 2fa.
required: True
email:
description: The email address to used by Github tasks when an operation requires an email address.
required: True
All tasks included in the core distribution that need a service should have their service defined in cumulusci/cumulusci.yml.
Projects may individually define additional services, or add additional attributes to global services in their project specific cumulusci.yml files.
CLI Usage
This proposal adds three new commands to the command line:
service connect SERVICE_NAME
(venv) ➜ supported-employment git:(release/2.0) ✗ cci service connect github
**Username: **
**Password: **
**Email: **
service show SERVICE_NAME
(venv) ➜ NPSP-Extension-Template git:(master) ✗ cci service show github
{
"email": "[email protected]",
"password": "fhdjsl4378hfjkds743hjfd74hjk1tw3o",
"username": "cdcarter"
}
service list
(venv) ➜ NPSP-Extension-Template git:(master) ✗ cci service list
service description is_configured
----------- ------------------------------------------------------------------- -------------
github Configure connection for github tasks, e.g. Create Release *
mrbelvedere Configure connection for mrbelvedere tasks, e.g. MrbelvederePublish
apextestsdb Configure connection for ApexTestsDB tasks, e.g. ApextestsdbUpload *
saucelabs Configure connection for saucelabs tasks.
Task Usage
BaseProjectKeychain.get_service() is the current API for getting a service. This method should validate that all required attributes for that service live on the keychain, and throw an error if an attribute is missing.
rejected solution
A task could define a services property that lists its required services, like task_options. On init of task, validate that the services are complete.
Rejected in favor of keeping existing API for tasks and including specific exceptions for ServiceNotConfigured and ServiceMissingAttribute. ServiceNotConfigured is an existing exception, ServiceMissingAttribute would be new.
The text was updated successfully, but these errors were encountered:
We chatted about this in Slack but just to record my thoughts here... this looks great.
Down the road we could explore a better system for tasks to associate themselves with services. That would help with things like adding something to cci task info that calls out the dependency on the service.
Intro
Right now, services are an adhoc dict that gets stored in the keychain based on whatever the cli is doing - but tasks expect services to:
Additionally, there is no way for users of the tool to add their own arbitrary services to the keychain (or add an additional attribute for a service).
Lastly, there is currently no way to determine which services a project may include tasks for.
I propose that the
cumulusci.yml
file add aservices
node at both the global and project level.Configuration
All tasks included in the core distribution that need a service should have their service defined in cumulusci/cumulusci.yml.
Projects may individually define additional services, or add additional attributes to global services in their project specific cumulusci.yml files.
CLI Usage
This proposal adds three new commands to the command line:
service connect SERVICE_NAME
service show SERVICE_NAME
service list
Task Usage
BaseProjectKeychain.get_service()
is the current API for getting a service. This method should validate that all required attributes for that service live on the keychain, and throw an error if an attribute is missing.rejected solution
A task could define a
services
property that lists its required services, liketask_options
. On init of task, validate that the services are complete.Rejected in favor of keeping existing API for tasks and including specific exceptions for ServiceNotConfigured and ServiceMissingAttribute. ServiceNotConfigured is an existing exception, ServiceMissingAttribute would be new.
The text was updated successfully, but these errors were encountered: