|
586 | 586 | inputs={
|
587 | 587 | 'fields': [
|
588 | 588 | {
|
589 |
| - 'id': 'username', 'label': gettext_noop('Username'), 'type': 'string', |
| 589 | + 'id': 'username', |
| 590 | + 'label': gettext_noop('Username'), |
| 591 | + 'type': 'string', |
| 592 | + 'help_text': gettext_noop( |
| 593 | + 'Required for basic authentication. ' |
| 594 | + 'May be blank if using client_id and client_secret', |
| 595 | + ), |
590 | 596 | },
|
591 | 597 | {
|
592 |
| - 'id': 'password', 'label': gettext_noop('Password'), 'type': 'string', 'secret': True, |
| 598 | + 'id': 'password', |
| 599 | + 'label': gettext_noop('Password'), |
| 600 | + 'type': 'string', |
| 601 | + 'secret': True, |
| 602 | + 'help_text': gettext_noop( |
| 603 | + 'Required for basic authentication. ' |
| 604 | + 'May be blank if using client_id and client_secret', |
| 605 | + ), |
| 606 | + }, |
| 607 | + { |
| 608 | + 'id': 'client_id', |
| 609 | + 'label': gettext_noop('Client ID'), |
| 610 | + 'type': 'string', |
| 611 | + 'help_text': gettext_noop( |
| 612 | + 'Required for service account authentication. ' |
| 613 | + 'May be blank if using username and password', |
| 614 | + ), |
| 615 | + }, |
| 616 | + { |
| 617 | + 'id': 'client_secret', |
| 618 | + 'label': gettext_noop('Client Secret'), |
| 619 | + 'type': 'string', |
| 620 | + 'secret': True, |
| 621 | + 'help_text': gettext_noop( |
| 622 | + 'Required for service account authentication. ' |
| 623 | + 'May be blank if using username and password', |
| 624 | + ), |
593 | 625 | },
|
594 | 626 | ],
|
595 |
| - 'required': ['username', 'password'], |
| 627 | + 'required': [], |
596 | 628 | },
|
597 | 629 | injectors={
|
598 | 630 | 'extra_vars': {
|
599 | 631 | 'scm_username': '{{username}}',
|
600 | 632 | 'scm_password': '{{password}}',
|
| 633 | + 'client_id': '{{client_id}}', |
| 634 | + 'client_secret': '{{client_secret}}', |
| 635 | + 'authentication': '{% if client_id %}service_account{% else %}basic{% endif %}', |
601 | 636 | },
|
602 | 637 | 'env': {
|
603 | 638 | 'INSIGHTS_USER': '{{username}}',
|
604 | 639 | 'INSIGHTS_PASSWORD': '{{password}}',
|
| 640 | + 'INSIGHTS_CLIENT_ID': '{{client_id}}', |
| 641 | + 'INSIGHTS_CLIENT_SECRET': '{{client_secret}}', |
605 | 642 | },
|
606 | 643 | },
|
607 | 644 | )
|
|
0 commit comments