Repository navigation
feat: declare what each task example requires - #667
Merged
Merged
Conversation
Each catalog example now publishes `requires`, the tasks to apply before it in apply order, so the required tasks followed by the example make a complete recipe, and each reference page prints them with the example. Most of the list is derived from the task's plugin requirements and `objects`: a `dokku_plugin` for each plugin it needs, then `dokku_app` or `dokku_service_create` for each object it names but does not create, each after what it needs in turn, and `sdk.TaskRequires` exposes that derivation with `sdk.TaskTypeOf` to name the results. Examples that need more declare it: a deployed app for `dokku_service_link`, `dokku_letsencrypt` and `dokku_app_clone`, HTTP auth for the `dokku_http_auth_*` tasks, the storage entry, network and node profile the mount, network property and node sysctls examples name. The example integration tests now set up from `requires`, so `exampleIntegrationPolicy` keeps only what a task cannot express: the k3s, letsencrypt and docker-link environment gates, the skips, git_from_archive's fresh app per example, and the placeholder rewrites for certs, registry auth, the maintenance tarball and the letsencrypt DNS record. The setup-dokku action now pins dokku-postgres, which the postgres examples require, so they run in CI instead of skipping. `requires` is an additive key, so the catalog stays at version 1.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Each catalog example now publishes
requires, the tasks to apply before it in apply order, so the required tasks followed by the example make a complete recipe, and each reference page prints them with the example. Most of the list is derived from the task's plugin requirements andobjects: adokku_pluginfor each plugin it needs, thendokku_appordokku_service_createfor each object it names but does not create, each after what it needs in turn, andsdk.TaskRequiresexposes that derivation withsdk.TaskTypeOfto name the results. Examples that need more declare it: a deployed app fordokku_service_link,dokku_letsencryptanddokku_app_clone, HTTP auth for thedokku_http_auth_*tasks, the storage entry, network and node profile the mount, network property and node sysctls examples name. The example integration tests now set up fromrequires, soexampleIntegrationPolicykeeps only what a task cannot express: the k3s, letsencrypt and docker-link environment gates, the skips, git_from_archive's fresh app per example, and the placeholder rewrites for certs, registry auth, the maintenance tarball and the letsencrypt DNS record. The setup-dokku action now pins dokku-postgres, which the postgres examples require, so they run in CI instead of skipping.requiresis an additive key, so the catalog stays at version 1.Closes #652