-
Notifications
You must be signed in to change notification settings - Fork 35
repository doc example #278
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
Open
lapentad
wants to merge
14
commits into
nephio-project:main
Choose a base branch
from
Nordix:cli-tutorial-doc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ceb4285
repository doc example
lapentad db6f02b
Update content/en/docs/neo-porch/4_tutorials_&_how-tos/setting-up-rep…
lapentad 982687c
Update content/en/docs/neo-porch/4_tutorials_&_how-tos/setting-up-rep…
lapentad a49ebbc
removed OCI reference and referenced porchctl api new docs
lapentad fb1315f
used relref
lapentad af27744
Update content/en/docs/neo-porch/4_tutorials_and_how-tos/setting-up-r…
lapentad 0c04e6a
removed gitea script and repo flag explaination
lapentad 7b3020e
link block script and added explaination for git initialization
lapentad 03c20bf
moved sections
lapentad 18c5604
made steps more precise
lapentad b40c858
Update content/en/docs/neo-porch/4_tutorials_and_how-tos/setting-up-r…
lapentad 2a4a94d
repository change
lapentad 6855ca6
moved description
lapentad 67481cc
style suggestions
lapentad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
54 changes: 50 additions & 4 deletions
54
content/en/docs/neo-porch/4_tutorials_and_how-tos/setting-up-repositories.md
This file contains hidden or 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 |
|---|---|---|
| @@ -1,10 +1,56 @@ | ||
| --- | ||
| title: "Setting Up Repositories" | ||
| title: Managing Porch Repositories | ||
| type: docs | ||
| weight: 2 | ||
| description: | ||
| description: Tutorial on setting up Porch repositories and using them. Before Porch can manage packages, you must register the Git repositories where those packages are stored. This tells Porch where to find package blueprints and where to store deployment packages. | ||
| --- | ||
|
|
||
| ## Lorem Ipsum | ||
| If you don't have a Git repository already created and initialized, follow the steps below to create and use your own Git repository. | ||
|
|
||
| tutorial in setting up porch repositories and using them | ||
| ## Creating and initializing a Git Repository | ||
|
|
||
| 1. **Create a new repository** in your Git hosting service (e.g., GitHub, GitLab, Gitea, Bitbucket). | ||
| - Navigate to your user or organization page and create a new repository. | ||
| - Provide a name (e.g., `porch-repo`), description, and set visibility as needed. | ||
| 2. **Initialize the repository** for the main/master branch to exist (typically done by adding a *README.md* file in the UI) or by cloning it locally and adding initial content. | ||
|
|
||
| For detailed instructions on repository creation, refer to your Git hosting service documentation. [For example on GitHub](https://docs.github.com/en/repositories/creating-and-managing-repositories/quickstart-for-repositories). | ||
|
|
||
| ## Register a Git-Repository as a Porch-Repository | ||
|
|
||
| The `porchctl` command-line tool provides a straightforward way to register a repository. | ||
|
|
||
| ### Command Syntax | ||
|
|
||
| The basic command for registering a repository is: | ||
|
|
||
| ```bash | ||
| porchctl repo register REPOSITORY [flags] | ||
| ``` | ||
|
|
||
| For more information about the `repo` command and available flags, see the Porchctl CLI guide [Repository registration]({{% relref "/docs/neo-porch/7_cli_api/relevant_old_docs/porchctl-cli-guide.md#repository-registration" %}}). | ||
|
|
||
| ### Example | ||
|
|
||
| This example registers a private Git repository hosted on Gitea and configures it as a deployment repository. | ||
|
|
||
| ```bash | ||
| # Register a Git repository with Porch | ||
| porchctl repo register http://gitea.gitea:3000/nephio/porch-test.git \ | ||
| --name=porch-test \ | ||
| --description="Test repository for Porch packages" \ | ||
| --branch=main \ | ||
| --deployment=true \ | ||
| --repo-basic-username=nephio \ | ||
| --repo-basic-password=secret | ||
| ``` | ||
|
|
||
| {{% alert title="Note" color="primary" %}} | ||
| Replace the Git URL, repository name, username, and password with your own values. | ||
| {{% /alert %}} | ||
|
|
||
| # See Also | ||
|
|
||
| In this example we demonstrate a simple HTTP Basic auth setup using a Kubernetes `Secret`. For production environments, secret management solutions are preferred (external secret stores, sealed-secrets, or platform secrets) and the avoidance of embedding plaintext credentials in scripts. | ||
|
|
||
| [Authenticating to Remote Git Repositories]({{% relref "/docs/neo-porch/6_configuration_and_deployments/relevant_old_docs/git-authentication-config.md" %}}) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
now that i think of it this shows input and no output.
we should include the response of a repo get command and show a successfully registered repo and an unsuccessful registration
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.
maybe even a FAQ of common registration issues reason for repo not being ready e.g. invalid password/username combo etc