-
Notifications
You must be signed in to change notification settings - Fork 35
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
CICD Docs (Github/Gitlab) #743
Conversation
Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>
Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>
Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>
fe44573
to
cceac0f
Compare
Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks, Peter 😃 Just a few thoughts, but nothing blocking.
README.md
Outdated
@@ -152,30 +152,9 @@ Documentation: https://docs.styra.com/regal/rules/style/prefer-snake-case | |||
> will likely generate a lot of violations. You can do this by passing the `--disable-category style` flag to | |||
> `regal lint`. | |||
|
|||
### GitHub Actions | |||
### Using Regal in CI/CD Workflows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Using Regal in your build pipeline" sounds a little less techno-babbly, perhaps?
README.md
Outdated
``` | ||
|
||
Please see [`setup-regal`](https://github.com/StyraInc/setup-regal) for more information. | ||
Kindly refer to the [CICD](/docs/cicd.md) documentation for more information on how to integrate Regal into your CI/CD workflows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little more context here would be helpful. Perhaps something like:
To ensure Regal's rules are enforced consistently in your project or organization, we've made it easy to run Regal as part of your builds. See the docs on "Using Regal in your build pipeline" to learn more about how to set up Regal to lint your policies on every commit or pull request.
docs/cicd.md
Outdated
- uses: actions/checkout@v4 | ||
- uses: StyraInc/setup-regal@v1 | ||
with: | ||
# For production workflows, use a specific version, like v0.16.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it's going to be outdated soon anyway, let's bump this to v0.22.0 while we're at it.
docs/cicd.md
Outdated
regal_lint_policies: | ||
stage: regal-lint | ||
image: | ||
# For production workflows, use a specific version, like v0.16.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, bump version.
|
||
## GitLab CICD | ||
|
||
To use Regal in GitLab CI/CD, you could for example use the following stage in your `.gitlab-ci.yml`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably obvious to someone who uses GitLab, but the GH example above specifically mentions running Regal on PRs, while this sentence says nothing about when/how this is triggered. Could you add that? 🙂
Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 👏
Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>
Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>
Think it should be okay now 😅 the markdown linter is a fussy one 😆 |
Add CI/CD Docs for Regal Signed-off-by: Peter Macdonald <macdonald.peter90@gmail.com>
Hey Team! 👋
This closes #405 and adds a separate CICD doc 😃
I moved the Github one (as-is) from the README and added what we use for Regal in Gitlab CICD (which works for us).
LMK in terms of wording or structure if its okay and if not I will update it 👍
Thanks!