Skip to content
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

Use GitOps Configuration File #15

Merged
merged 32 commits into from
Dec 15, 2023
Merged

Use GitOps Configuration File #15

merged 32 commits into from
Dec 15, 2023

Conversation

goruha
Copy link
Member

@goruha goruha commented Dec 7, 2023

what

  • Use a configuration file instead of passing all parameters as inputs

why

  • Makes it easier in reusable workflows to reuse actions without needing to edit workflows themselves
  • Separate business logic from configuration

Migrating from v0 to v1

v1 replace jq-query input with selected-filter variable and simplify the query.
Now you need to specify only part used in select function of jq-query.

v1 moved variables from inputs to atmos gitops config path ./.github/config/atmos-gitops.yaml

name
atmos-version
atmos-config-path

If you want the same behavior in v1 as inv0 you should create config ./.github/config/atmos-gitops.yaml with the same variables as in v1 inputs.

  - name: Selected Components
    id: components
    uses: cloudposse/github-action-atmos-terraform-select-components@v1
    with:
      atmos-gitops-config-path: ./.github/config/atmos-gitops.yaml
      select-filter: '.settings.github.actions_enabled // false'

same behaviour as

  - name: Selected Components
    id: components
    uses: cloudposse/github-action-atmos-terraform-select-components@v0
    with:
      atmos-config-path: "${{ github.workspace }}/rootfs/usr/local/etc/atmos/"
      jq-query: 'to_entries[] | .key as $parent | .value.components.terraform | to_entries[] | select(.value.settings.github.actions_enabled // false) | [$parent, .key] | join(",")'

@goruha goruha added the major Breaking changes (or first stable release) label Dec 7, 2023
@goruha goruha requested review from a team as code owners December 7, 2023 00:41
@goruha goruha requested review from jamengual and woz5999 and removed request for a team December 7, 2023 00:41
@goruha goruha requested a review from a team as a code owner December 9, 2023 21:13
README.yaml Outdated Show resolved Hide resolved
README.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rebuild with latest build-harness. this is using an older README template

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@milldr done

action.yml Outdated Show resolved Hide resolved
@osterman osterman changed the title Incupsulate configs Use GitOps Configuration File Dec 13, 2023
README.yaml Outdated Show resolved Hide resolved
README.yaml Outdated Show resolved Hide resolved
README.yaml Show resolved Hide resolved
README.yaml Show resolved Hide resolved
README.yaml Outdated Show resolved Hide resolved
README.yaml Show resolved Hide resolved
README.yaml Outdated Show resolved Hide resolved
README.yaml Outdated
Comment on lines 122 to 125
`v1` replace `jq-query` input with `selected-filter` variable and simplify the query.
Now you need to specify only part used in select function of `jq-query`.

`v1` moved variables from `inputs` to atmos gitops config path `./.github/config/atmos-gitops.yaml`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`v1` replace `jq-query` input with `selected-filter` variable and simplify the query.
Now you need to specify only part used in select function of `jq-query`.
`v1` moved variables from `inputs` to atmos gitops config path `./.github/config/atmos-gitops.yaml`
- `v1` replace `jq-query` input with `selected-filter` variable and simplify the query.
Now you need to specify only the part used inside of the `select(...)` function of the `jq-query`.
-`v1` moved parameters from the `inputs` to the Atmos GitOps config file, which defaults to `./.github/config/atmos-gitops.yaml`

Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
README.yaml Outdated Show resolved Hide resolved
@goruha goruha merged commit 385c6e8 into main Dec 15, 2023
15 checks passed
@goruha goruha deleted the incapsulate-configs branch January 31, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major Breaking changes (or first stable release)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants