-
Notifications
You must be signed in to change notification settings - Fork 0
GitHub multiple environment support #7
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
Conversation
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
WARNING: this also carries a change to remove the bootstrap prior to tempest running. This has been done to reduce the time taken to start and finish a tempest run. This will require a copy of `public_openrc.sh` to GitHub secrets.
Role was failing if the user had not expanded `github_runs_on` to contain multiple entries in list. This is because the default value was a string which cannot be concatenated with a list. Fix: set `github_runs_on` to a list by default.
markgoddard
suggested changes
Sep 28, 2023
This reverts commit 20f2d6d.
GitHub mult env
markgoddard
suggested changes
Oct 18, 2023
markgoddard
reviewed
Oct 23, 2023
markgoddard
reviewed
Oct 23, 2023
Co-authored-by: Mark Goddard <mark@stackhpc.com>
markgoddard
suggested changes
Oct 24, 2023
The variable in `github_default_kayobe_arguments` served no purpose as users most likely want to provide their own environment name.
jackhodgkiss
commented
Oct 24, 2023
The `setup-buildx` step within the workflow has been known to cause issue when pushing images to Pulp registry < `3.32.0`. There was a concern surrounding the lack of buildx step potentially leading to a situation where the kayobe-config remains inside the image. However, this does not appear to be the case.
This reverts commit 85612c5.
Identified in `ansible-core < 2.15` nested vars will not be evaluated
within templates that are loaded via `extends` or `includes`. The
solution involves using `lookup('template', ...)` to ensure support
dating back to `2.12`. Unfortunately `lookup` does not have access to
the macro defined in `workflows.yml` nor does it inherit the
`block_*_string` and `variable_*_string` from the
`ansible.builtin.template` module as defined within `tasks/main.yml`.
Also `lookup` does not support setting `block_*_string``
NOTE: this is not ideal due to the duplication and the changing of
block/variable markers. Whilst low priority should be improved/replaced
in the future.
markgoddard
suggested changes
Oct 25, 2023
Co-authored-by: Mark Goddard <mark@stackhpc.com>
markgoddard
approved these changes
Oct 25, 2023
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.
This PR sees the introduction for multiple environment support when generating workflows. This will enable the workflows to operate from a single kayobe-config and serve multiple environments/clouds.
The current suppport for multiple environments is strictly kayobe based whereby the environments are defined within
etc/kayobe/environments.All workflows support multiple environments. Generic workflows and Tempest will allow for the user to select the environment as input. Building the kayobe image and config diff however will utilise matrix to operate within all environments simulatenously.
For multiple environments to work in deployments where GitHub Environments are not available all variable/secrets will be accessed via the environment prefix for example
PRODUCTION_KAYOBE_VAULT_PASSWORDall variables must have an environment specific key even if the values are the same between environments.Tempest has also been updated to drop the need for kayobe bootstrap which was done to provide the workflow with a copy of
public_openrc.sh. With removal of this step all deployments must ensure they are TEMPEST_OPENRC secret present within the repository.Finally, the workflow to test the role has been updated to include support for both single and multiple environment configs. Test Github Role contains two artifacts one for each type of config.