-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2810 from cal-itp/more-docs
More docs (mostly infra) and fixing CI configuration
- Loading branch information
Showing
13 changed files
with
109 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ name: Build and publish docs | |
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'docs/**' | ||
pull_request: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# hologit | ||
|
||
[hologit](https://github.com/JarvusInnovations/hologit) is a tool that facilitates manipulation of | ||
GitHub branches in a manner that facilitates an "obvious" GitOps workflow for CI/CD. Specifically, | ||
hologit allows: | ||
|
||
1. Building branches containing only a subset of repository contents (for example, a branch only including infra-related code) | ||
* This action is called "projection" | ||
2. Bringing in contents from another repository without relying on published artifacts such as Helm charts | ||
3. Applying transformations to files as part of #1 | ||
* These transformations are called "lenses" | ||
|
||
In this repository, we declare one holobranch named [release-candidate](../branches/release-candidate). | ||
By projecting this holobranch in GitHub Actions, individual "candidate" branches end up containing | ||
only the code relevant to infra/Kubernetes as well as Kubernetes code from the upstream [cluster-template](https://github.com/JarvusInnovations/cluster-template) | ||
repository. Then, a PR from a `candidate/<some-branch>` to `releases/<env>` (such as `releases/test`) will only show changes/content | ||
relevant to infra in addition to `releases/*` branches only ever containing infra code. For example: | ||
|
||
1. Create a [PR making an infra-related change](https://github.com/cal-itp/data-infra/pull/2828) | ||
2. Create and merge a [PR to deploy a candidate branch to test](https://github.com/cal-itp/data-infra/pull/2829) | ||
3. Merge the PR from #1 | ||
4. After merge, [PR to deploy the main candidate branch to prod](https://github.com/cal-itp/data-infra/pull/2832) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Contribution guidelines | ||
|
||
These guidelines are meant to provide a foundation for collaboration in Cal-ITP's data services repos, | ||
primarily [#data-infra](https://github.com/cal-itp/data-infra). | ||
|
||
## Issues | ||
* When submitting an issue, please try to use an existing template if one is appropriate | ||
* Provide enough information and context; try to do one or more of the following: | ||
* Include links to specific lines of code, error logs, Slack context, etc. | ||
* Include error messages or tracebacks if relevant and short | ||
* Connect issues to Sentry issues | ||
|
||
## Pull Requests | ||
* We generally use merge commits as we think they provide clarity in a PR-based workflow | ||
* PRs should be linked to any issues that they close. [Keywords](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) are one good way to do this | ||
* Google provides a [How to do a code review reference](https://google.github.io/eng-practices/review/reviewer/) that reviewers may find helpful | ||
* Use draft PRs to keep track of work without notifying reviewers, and avoid giving pre-emptive feedback on draft PRs | ||
* Reviewers should not generally merge PRs themselves and should instead let the author merge, since authors will have the most context about merge considerations (for example, whether additional reviews are still needed, or whether any communication is needed about the impacts of the PR when it merges) | ||
* After a PR is merged, the author has the responsibility of monitoring any subsequent CI actions for successful completions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# CI - deploys via pyinvoke | ||
|
||
This folder contains code and YAML that drives the deployments of Kubernetes-based applications and services. For example, | ||
a deployment named `archiver` is configured in [the prod channel](./channels/prod.yaml) and is ultimatedly deployed | ||
by `invoke` (see below) calling `kubectl` commands. | ||
|
||
## invoke (aka pyinvoke) | ||
[invoke](https://docs.pyinvoke.org/en/stable/) is a Python framework for executing subprocess and building a CLI application. | ||
The tasks are defined in `tasks.py` and configuration in `invoke.yaml`; config values under the top-level `calitp` | ||
are specific to our defined tasks. | ||
|
||
Run `poetry run invoke -l` to list the available commands, and `poetry run invoke -h <command>` to get more detailed help for each individual command. | ||
Individual release channels/environments are config files that are passed to invoke. For example, to deploy to test: | ||
|
||
```bash | ||
poetry run invoke release -f channels/test.yaml | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.