generated from softwareone-platform/swo-extension-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
MPT-16656: configure repository #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * @softwareone-platform/sirius |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "uv" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| day: "monday" | ||
| time: "08:00" | ||
| timezone: "UTC" | ||
| versioning-strategy: "auto" | ||
| groups: | ||
| python-production: | ||
| dependency-type: "production" | ||
| python-development: | ||
| dependency-type: "development" | ||
| commit-message: | ||
| prefix: "deps" | ||
| include: "scope" | ||
| open-pull-requests-limit: 5 | ||
| - package-ecosystem: "docker" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "monthly" | ||
| time: "08:00" | ||
| timezone: "UTC" | ||
| commit-message: | ||
| prefix: "deps" | ||
| include: "scope" | ||
| open-pull-requests-limit: 5 | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "monthly" | ||
| time: "08:00" | ||
| timezone: "UTC" | ||
| commit-message: | ||
| prefix: "deps" | ||
| include: "scope" | ||
| open-pull-requests-limit: 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,94 +1,9 @@ | ||
| [](https://sonarcloud.io/summary/new_code?id=softwareone-platform_swo-extension-playground) | ||
| [](https://sonarcloud.io/summary/new_code?id=softwareone-platform_swo-extension-playground) | ||
| [](https://sonarcloud.io/summary/new_code?id=softwareone-platform_mpt-tool) | ||
| [](https://sonarcloud.io/summary/new_code?id=softwareone-platform_mpt-tool) | ||
|
|
||
| [](https://github.com/astral-sh/ruff) | ||
|
|
||
| # SoftwareONE Extension playground | ||
| # SoftwareONE MPT Tool | ||
|
|
||
| Playground Extension with the SoftwareONE Marketplace | ||
|
|
||
| # Run tests | ||
|
|
||
| ``` | ||
| $ docker-compose build app_test | ||
| $ docker-compose run --service-ports app_test | ||
| ``` | ||
|
|
||
| # Local run using SoftwareONE Marketplace API | ||
|
|
||
| ## Create configuration files | ||
|
|
||
| 1. Create environment file | ||
|
|
||
| ``` | ||
| $ cp .env.sample .env | ||
| ``` | ||
|
|
||
| 1. Setup parameters for `.env` file | ||
|
|
||
| ``` | ||
| MPT_PRODUCTS_IDS=PRD-1111-1111 | ||
| MPT_PORTAL_BASE_URL=http://devmock:8000 | ||
| MPT_API_BASE_URL=http://devmock:8000 | ||
| MPT_API_TOKEN=<vendor-api-token> | ||
| MPT_ORDERS_API_POLLING_INTERVAL_SECS=120 | ||
| EXT_WEBHOOKS_SECRETS={"PRD-1111-1111": "<super-jwt-secret>"} | ||
| MPT_INITIALIZER="swo_playground.initializer.initialize" | ||
| MPT_KEY_VAULT_NAME="" | ||
| MPT_NOTIFY_CATEGORIES={"ORDERS": "NTC-0000-0006"} | ||
| ``` | ||
|
|
||
| `MPT_PRODUCTS_IDS` should be a comma-separated list of the SWO Marketplace Product identifiers | ||
| For each of the defined product id in the `MPT_PRODUCTS_IDS` list define `WEBHOOKS_SECRETS` json variables using product | ||
| ID as key. | ||
|
|
||
| ``` | ||
| EXT_WEBHOOKS_SECRETS={"PRD-1111-1111": "<webhook-secret-for-product>"} | ||
| ``` | ||
|
|
||
| Example of `.env` file | ||
|
|
||
| ``` | ||
| MPT_PRODUCTS_IDS=PRD-1111-1111 | ||
| MPT_PORTAL_BASE_URL=http://devmock:8000 | ||
| MPT_API_BASE_URL=http://devmock:8000 | ||
| MPT_API_TOKEN=<vendor-api-token> | ||
| MPT_ORDERS_API_POLLING_INTERVAL_SECS=120 | ||
| EXT_WEBHOOKS_SECRETS={"PRD-1111-1111": "<super-jwt-secret>"} | ||
| MPT_INITIALIZER="swo_playground.initializer.initialize" | ||
| MPT_KEY_VAULT_NAME="" | ||
| MPT_NOTIFY_CATEGORIES={"ORDERS": "NTC-0000-0006"} | ||
| ``` | ||
|
|
||
| ``` | ||
|
|
||
|
|
||
| ## Build and run extension | ||
|
|
||
| 1. Build and run the extension | ||
| ``` | ||
|
|
||
| $ docker-compose build app | ||
| $ docker-compose run --service-ports app | ||
|
|
||
| ``` | ||
|
|
||
| # Configuration | ||
|
|
||
| ## Application | ||
| | Environment Variable | Default | Example | Description | | ||
| |---------------------------------|-----------------------|----------------------------------------|-------------------------------------------------------------------------------------------| | ||
| | `EXT_WEBHOOKS_SECRETS` | - | {"PRD-1111-1111": "123qweasd3432234"} | Webhook secret of the Draft validation Webhook in SoftwareONE Marketplace for the product | | ||
| | `MPT_PRODUCTS_IDS` | PRD-1111-1111 | PRD-1234-1234,PRD-4321-4321 | Comma-separated list of SoftwareONE Marketplace Product ID | | ||
| | `MPT_API_BASE_URL` | http://localhost:8000 | https://portal.softwareone.com | SoftwareONE Marketplace API URL | | ||
| | `MPT_API_TOKEN` | - | eyJhbGciOiJSUzI1N... | SoftwareONE Marketplace API Token | | ||
| | `MPT_INITIALIZER` | - | swo_playground.initializer.initialize | Initializer function | | ||
| | `MPT_NOTIFY_CATEGORIES` | - | {"ORDERS": "NTC-0000-0006"} | Notify categories for the orders | | ||
| | `MPT_KEY_VAULT_NAME` | - | swo-playground-kv | Key Vault name | | ||
| | `MPT_PORTAL_BASE_URL` | http://localhost:8000 | https://portal.softwareone.com | SoftwareONE Marketplace Portal URL | | ||
|
|
||
|
|
||
| ## Other | ||
| | Environment Variable | Default | Example | Description | | ||
| |----------------------------------------|---------|---------|----------------------------------------------------------------------| | ||
| | `MPT_ORDERS_API_POLLING_INTERVAL_SECS` | 120 | 60 | Orders polling interval from the Software Marketplace API in seconds | | ||
| A Python-based migration tool for extensions that standardizes migration execution. It provides a CLI-based interface | ||
| to manage both schema and data migrations across multiple backends, ensuring consistent behavior in all environments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,56 +1,30 @@ | ||
| services: | ||
| app: | ||
| container_name: ext_playground | ||
| container_name: mpt_tool | ||
| build: | ||
| context: . | ||
| dockerfile: prod.Dockerfile | ||
| working_dir: /extension | ||
| command: swoext run --no-color | ||
| working_dir: /mpt_tool | ||
| volumes: | ||
| - .:/extension | ||
| env_file: | ||
| - .env | ||
| ports: | ||
| - "8080:8080" | ||
| expose: | ||
| - "8080" | ||
|
|
||
| bash: | ||
| container_name: ext_playground_bash | ||
| build: | ||
| context: . | ||
| dockerfile: dev.Dockerfile | ||
| working_dir: /extension | ||
| command: bash | ||
| stdin_open: true | ||
| tty: true | ||
| volumes: | ||
| - .:/extension | ||
| env_file: | ||
| - .env | ||
| - .:/mpt_tool | ||
|
|
||
| app_test: | ||
| container_name: ext_playground_test | ||
| container_name: mpt_tool_test | ||
| build: | ||
| context: . | ||
| dockerfile: dev.Dockerfile | ||
| working_dir: /extension | ||
| working_dir: /mpt_tool | ||
| command: bash -c "ruff format --check . && ruff check . && flake8 . && mypy . && uv lock --check && pytest" | ||
| volumes: | ||
| - .:/extension | ||
| environment: | ||
| - PROCESS_CHECK_INTERVAL_SECS=0 | ||
| env_file: | ||
| - .env | ||
| - .:/mpt_tool | ||
|
|
||
|
|
||
| format: | ||
| container_name: ext_playground_format | ||
| container_name: mpt_tool_format | ||
| build: | ||
| context: . | ||
| dockerfile: dev.Dockerfile | ||
| working_dir: /extension | ||
| working_dir: /mpt_tool | ||
| command: bash -c "ruff check --select I --fix . && ruff format ." | ||
| volumes: | ||
| - .:/extension | ||
| env_file: | ||
| - .env | ||
| - .:/mpt_tool |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.