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

Refactor check env and fossa cli #73

Merged
merged 21 commits into from
May 29, 2024

Conversation

elaguerta-nr
Copy link
Contributor

@elaguerta-nr elaguerta-nr commented May 27, 2024

Refactor check-env and FOSSA CLI

Refactor all workflows to pull out duplicate code from check_env and fossa jobs. Fix bugs that suppressed errors from FOSSA analyze, and incorrectly set the fossaAnalyzeResult custom property.

Refactors

  • Pull out FOSSA CLI duplicated code into a composite action at .github/composite/fossa-composite/action.yml.
    • A composite action enables the FOSSA steps to be called in the same job as the calling job. This allows the FOSSA CLI to to run after required configuration steps such as installing package managers.
  • Pull out check-env duplicated code into a reusable workflow at .github/workflows/fossa-check-env.yml
    • A reusable workflow runs as a separate job. This allows it to be tracked and monitored separately from the FOSSA job. It also minimizes passing of required secrets from the caller to the check-env job.

Bugfixes

@elaguerta-nr elaguerta-nr marked this pull request as ready for review May 27, 2024 23:40
Copy link

@lucasgonze lucasgonze left a comment

Choose a reason for hiding this comment

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

No issues jump out at me.

.github/workflows/fossa-caos.yml Show resolved Hide resolved
@elaguerta-nr elaguerta-nr merged commit 294983c into newrelic:main May 29, 2024
8 checks passed
@elaguerta-nr elaguerta-nr deleted the refactor-check-env-fossa-cli branch May 29, 2024 19:17
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.

3 participants