Skip to content

Add Sparrow6 CI/CD Example #316

Description

@librasteve

@melezhik has kindly proposed a Sparrow6 CI-CD example for the https://raku.org front page.

Many thanks for pulling this together. In general I think it would be a nice plus for our site to show CI-CD tooling done in Raku.

note: Ensure that no non-comment line enables passwordless sudo
!regexp: ^^ \s* <-[\#]> .* NOPASSWD

note: Ensure that any group privilege entry belongs to either "stuff" or "wheel"
regexp: ^^ \s* \% (\S+)
generator: <<RAKU
!raku
 my $group = capture()[0];
 if $group eq 'stuff' || $group eq 'wheel' {
 say "assert: 1 group $group is allowed";
 } else {
 say "assert: 0 group $group is not allowed, only stuff or wheel";
 }
RAKU

I suppose it would live in the bottom row of examples as a tab to the right of FFI (since CI-CD is an acronym).

So please visit the page to get an idea of what is needed.


I know nothing about CI-CD and I have not used Sparrow6, so I will need to get some support from the wider community to review and validate this proposal.

I have the following high level concerns that I would like to see resolved before moving to a PR:

  • no explanatory text has been proposed - all the other examples have this, so @melezhik please provide some (even if you are not a marketing person, please try and follow the other examples)
  • don't forget the title and the 'code-note' ... which is intended to be a sharp summary to cement the USPs
  • usually I prefer to post examples that I can run on my machine - this is not going to be possible - so please provide some context (maybe a blog post or a video) so that I can be confident that it is useful and it works (or have a 3rd person come here and vouch for it)
  • usually I prefer to post examples that I understand - I am hoping that the explanatory text will do that without anything else (treat me like a new visitor) - otherwise please explain what this is doing and why it is good here

Also some low level feedback:

  • as it is proposed, this will be one of the longest examples - I am not sure what a note: is - perhaps this text can live in the explanation box? anyway - please reduce the number of code lines to 4-6 ish if you can
  • I note that the Raku is in a HEREDOC ... so this example will not hilite under Rainbow and it will look less pretty than the others - perhaps there is a more Raku oriented way to recast this?
  • the indentation needs to be 4 spaces to match the other examples

Hopefully other (more knowledgeable) folks can chime in and we can whip this into shape.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions