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

feat: build-workspace-matrix supports Echo flag #436

Closed
wants to merge 3 commits into from

Conversation

amartin-isp
Copy link
Contributor

@amartin-isp amartin-isp commented Oct 11, 2024

Adding support to build-workspace-matrix for flags in the dependency glob expression. The flags are meant to modify the behavior of the tool and or its output.

This PR introduces the Echo flag which is meant to cause the tool to simply return the workspace in the dependency glob expression as configured without attempting to minMatch it against existing workspaces.

One use-case for this feature is for automating terraform plan accross multiple repositories. For example, the con-eng-infra repo hosts the stream-cluster module. When the module is updated, a Github action will checkout the kubernetes_management repo and run a terraform plan for every stream-cluster-* root module in the repo.

E.g:

jobs:
  determine-matrix:
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.build-workspace-matrix.outputs.matrix }}
    steps:
      - uses: actions/checkout@v4
      - id: build-workspace-matrix
        uses: iStreamPlanet/github-actions/[email protected]
        with:
          github-token: ${{secrets.GITHUB_TOKEN}}
          workspaces: |
            clusters/aws/us-east-1/stream-prod-use1-c/ : modules/stream-cluster/* | Echo
            clusters/aws/us-east-1/stream-prod-use1-d/ : modules/stream-cluster/* | Echo
            clusters/aws/us-east-1/stream-stage-use1-b/ : modules/stream-cluster/* | Echo
            clusters/aws/us-west-2/stream-prod-usw2-c/ : modules/stream-cluster/* | Echo
            clusters/aws/us-west-2/stream-prod-usw2-d/ : modules/stream-cluster/* | Echo
            clusters/aws/us-west-2/stream-stage-usw2-b/ : modules/stream-cluster/* | Echo

@amartin-isp amartin-isp requested a review from a team as a code owner October 11, 2024 17:22
@amartin-isp amartin-isp deleted the am/build-workspace-matrix branch October 12, 2024 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant