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

CI/CD workflows #351

Open
12 of 18 tasks
guicassolato opened this issue Sep 1, 2022 · 1 comment
Open
12 of 18 tasks

CI/CD workflows #351

guicassolato opened this issue Sep 1, 2022 · 1 comment
Labels
area/tooling Makefile and scripts for the dev workflow, testing, etc kind/epic participation/help needed Extra attention is needed size/large

Comments

@guicassolato
Copy link
Collaborator

guicassolato commented Sep 1, 2022

We want to improve automation in all repos for the Kuadrant components. We're aiming for:

  1. good coverage of automation tasks related to code style, testing, CD/CD (image builds, releases), etc
  2. consistency across components
  3. automation as manageable code – i.e. less mouse clicks across scaterred UI "settings" pages and more Gitops, more YAMLs hosted as part of a code base.

As part of a preliminary investigation (Kuadrant/kuadrant-operator#21) of the current state of such automation, the following desired workflows and corresponding state for the Authorino repo were identified. Please review the list below.

Workflows do not have to be implemented exactly as in the list. The list is just a driver for the kind of tasks we want to cover. Each component should assess it as it makes sense, considering the component's specificities. More details in the original epic: Kuadrant/kuadrant-operator#21.

You may also want to use this issue to reorganize how current workflows are implemented, thus helping us make the whole thing consistent across components.

@guicassolato
Copy link
Collaborator Author

An idea of how to organise this:

Name File (.github/workflows/) Trigger Scope (path filter)1 Steps
Code Style code-style.yaml
  • PR
  • **/*.go
  • *.mod
  • *.sum
  1. "Check out the code"
  2. "Set up Go environment"
  3. "Install dependencies" (goimports, reviewdog)
  4. "Linting" (golangci/golangci-lint-action@v2)
  5. "Code format" (gofmt)
  6. "Code format (imports)" (goimports)
  7. "Verify diff" (git diff)
Language language.yaml
  • PR
  • **
  1. "Check out the code"
  2. "Set up Go environment"
  3. "Install dependencies" (reviewdog, client9/misspell)
  4. "Check language" (reviewdog:woke)
  5. "Check spelling" (client9/misspell)
  6. "Check trailing white spaces" (reviewdog)
  7. "Check EOF" (reviewdog)
Unit Tests unit-testing.yaml
  • PR
  • Pushes to main and release/* branches
  • **/*.go
  • *.mod
  • *.sum
  • **/*.yaml
  • **/*.sh
  • Makefile
  • **/*.mk
  1. "Check out the code"
  2. "Set up Go environment"
  3. "Run the tests" (make test)
Unit Benchmarks unit-benchmarks.yaml
  • Pushes to main and release/* branches
  • Manual
  • **/*.go
  • *.mod
  • *.sum
  • **/*.yaml
  • **/*.sh
  • Makefile
  • **/*.mk
  1. "Check out the code"
  2. "Set up Go environment"
  3. "Run the tests" (make benchmarks)
End-to-end Tests e2e-tests.yaml
  • Pushes to main and release/* branches
  • Manual
  • !docs/**
  • !**/*.md
  • !**/*.adoc
  • !LICENCE
  • !PROJECT
  1. "Check out the code"
  2. "Set up Go environment"
  3. "Install dependencies" (jq)
  4. "Run the tests" (make e2e)
Smoke Tests smoke-tests.yaml
  • 'Build Images'
N/A
  1. "Install dependencies" (kind, jq)
  2. "Create Kubernetes cluster"
  3. "Setup the environment" (namespaces, apps, operators, CRDs, RBAC, etc)
  4. "Deploy the component" (image published to registry)
  5. "Run the tests" (e2e)
Performance Tests performance-tests.yaml
  • Manual
N/A
  1. "Install dependencies" (kind, jq)
  2. "Create Kubernetes cluster"
  3. "Setup the environment" (namespaces, apps, operators, CRDs, RBAC, etc)
  4. "Deploy the component"
  5. "Run the tests" (benchmarks)
Build Images build-images.yaml
  • Pushes to main and release/* branches
  • 'Release'
  • **
  1. "Check out the code"
  2. "Install dependencies" (qemu)
  3. Add tags ('latest', sanitized branch name)
  4. "Build the image" (redhat-actions/buildah-build@v2)
  5. "Push the image to registry" (redhat-actions/push-to-registry@v2)
Deploy deploy.yaml
  • 'Smoke Tests'
  • Manual
N/A
  1. "Amend the environment" (namespaces, apps, operators, CRDs, RBAC, etc)
  2. "(Re)deploy the component"
  3. "Run the tests" (e2e)
Release release.yaml
  • Manual
N/A
  1. "Tag and publish the release"

1 PRs and pushes only (ref).

TBD: Workflows related to Code scan (vulnerability and dependency updates) and Badges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tooling Makefile and scripts for the dev workflow, testing, etc kind/epic participation/help needed Extra attention is needed size/large
Projects
Status: Todo
Status: No status
Development

No branches or pull requests

1 participant