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

Using the CLI in automated builds design #23

Open
mrbiggred opened this issue Apr 12, 2021 · 2 comments
Open

Using the CLI in automated builds design #23

mrbiggred opened this issue Apr 12, 2021 · 2 comments
Assignees
Labels

Comments

@mrbiggred
Copy link
Contributor

Try to use the CLI in automated builds and find out what features would be useful. Trying to use the CLI in automated builds will hopefully create some discussion in this case and also issue/PRs for both the CLI and Lib.

On example of using Freshli CLI in an automated build is to get a Freshness score and fail the build the score is too high (i.e. dependencies our too out of date). How high is too high? Can we compare it with the previous builds Freshness score?

Another example is can the CLI produce data that can be used by the Continuous Integration platform in a graph? Can it upload the data somewhere useful to the user? Perhaps upload it to Freshli Web?

Any other ideas?

Note: Currently this issue is assigned to @mfcorgi but I'm hoping that others will try the CLI in their automated build and give us feedback.

@mrbiggred mrbiggred added this to the v0.4.0 milestone Apr 12, 2021
@mrbiggred
Copy link
Contributor Author

@mairadanielaferrari added some our Slack conversation here for posterity.


Maira
We want to allow people to use our actions on Github runners running on either LInux or Windows operating systems right? Or just Linux?

I ask because there are three ways to create actions.

  • using Docker Containers (only works in github linux runners)
  • using Javascript (works in Linux, macOS and Windos)
  • composite run stels (works in Linux, macOS and Windos)

Docker will be easier but I think would be better to go with 2 or 3 so we allow people to run our actions on any operating system. Thoughts?

Chris
I'm less concerned right now with having the CLI wrapped in a runner. I'm more interested in how you, and other developers, would use the Freshli CLI on an existing project.

For example, JournalBooks. How would we use Freshli CLI during the build process. What information would we like to see? Could we use Freshli CLI to fail the build if our dependencies where not "fresh" enough?

Once we have figured some examples of how Freshli CLI will be used in a build process we can look at wrapping it in GitHub actions.

My guess is that the CLI will need new options and/or return different data then it currently does to make is useful in a CI process.

For example, you try the CLI in the JournalBooks CI. Currently the CLI does not return a single "freshness" value we can use in during the build. You create a new GitHub issue to that describes the value you want the CLI to return and why.

Then you, or someone else, adds that feature to the Freshli CLI. You use the new Freshli CLI in the JournalBooks build and this part works but you find new features you think would be useful and the process repeats it's self.

Maira
Yes that is the task, but I what I was going to do is

  • Pack freshli-cli into a github action
  • Use it in freshli-lib workflow.

I think there is also a way to trigger an Github action from a Jenkins Build.

Chris
The CLI does not need to be in a GitHub action to be used. At least it shouldn't. We should be able to install it using dotnet tools install freshli-cli. At least once we have it published to NuGet.

Chris
Maybe that is the first issue we need to work on. Getting the CLI published to NuGet, or wherever "dotnet tools" reads from.

I'm sure there is a way to set dotnet tools to read from a package manager that is not NuGet.

That or you have to use a "curl", or similar command, to download the CLI from the GitHub Release.

Maira
Okay. So lets do this.

  • This task, the number 23 is to do what you said. And will use dotnet tools install freshli-cli.
  • We create a new task to work on next milestones to make the freshli-cli available as an action, too. Once we have the worfklow well defined.

Maira
Does it sound good?

Chris C
I like that plan.


@mrbiggred mrbiggred modified the milestones: v0.4.0, v0.5.0 Jun 10, 2021
@mrbiggred
Copy link
Contributor Author

@mairadanielaferrari some notes from our meeting today. Let me know if I missed anything. Our meeting also involved the corgibytes/freshli#32 design issue.

  • You outlined a design for Freshli-CLI commands.
  • The CLI can be used with or without Freshli-Web integration.
  • The CLI will eventually have commands to access information in Freshli-Web. For example, get list of projects, create new project, get past metrics, etc.
  • Freshli-Web currently does not support any account login, storing data, etc. The CLI commands to interface with Freshli-Web will be added as new features to Freshli-Web are added.
  • Discussed the Score command to get the Freshness number. This would be the command used during CI builds.
  • Would be nice if Freshli could use the a local directory instead of needing a Git repo path.
  • Discussed the Compare command to get the Freshness score for two different tags, commits, branches in a repo.
  • The current CLI does not have any argument parsing. It just assumes the first argument is a Git path. Need to add better argument parsing.

Two concert issues came out of our meeting:

  1. Add better argument parsing to the CLI.
  2. Add the Score command to get the freshness score. This would be used in CI builds.

I'll create these issues and assign them to you.

This was referenced Jun 10, 2021
@mrbiggred mrbiggred modified the milestones: v0.4.0, v0.5.0 Jun 23, 2021
@mscottford mscottford removed this from the v0.5.0 milestone Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Icebox
Development

No branches or pull requests

3 participants