-
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 #169 from open-component-model/add-config-and-exam…
…ples add config file and examples
- Loading branch information
Showing
3 changed files
with
453 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
title: Config file | ||
name: Config file | ||
url: /docs/cli/configfile/ | ||
date: 2023-12-11T10:43:19Z | ||
draft: false | ||
images: [] | ||
menu: | ||
docs: | ||
parent: cli-reference | ||
toc: true | ||
isCommand: false | ||
--- | ||
### Description | ||
|
||
The command line client supports configuration using a configuration file. | ||
If existent, by default, the file <code>$HOME/.ocmconfig</code> will be read. | ||
Using the option <code>--config</code> an alternative file can be specified. | ||
|
||
### Configuration File Syntax | ||
For a detailed description of the configuration file structure and all possible attributes see | ||
* [Config File Syntax](/docs/cli/configfile_syntax.md) — OCM CLI configuration file syntax | ||
|
||
### Examples | ||
* [Config File Examples](/docs/cli/configfile_examples.md) — OCM CLI configuration file examples |
72 changes: 72 additions & 0 deletions
72
content/en/docs/cli-reference/configfile/configfile_examples.md
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,72 @@ | ||
--- | ||
title: Config File Examples | ||
name: Config File Examples | ||
url: /docs/cli/configfile/examples | ||
date: 2023-12-11T10:43:19Z | ||
draft: false | ||
images: [] | ||
menu: | ||
docs: | ||
parent: configfile | ||
toc: true | ||
isCommand: true | ||
--- | ||
|
||
### Examples for .ocmconfig files | ||
|
||
Pointing the configuration to an existing Docker config json: | ||
|
||
```yaml | ||
type: generic.config.ocm.software/v1 | ||
configurations: | ||
- type: credentials.config.ocm.software | ||
repositories: | ||
- repository: | ||
type: DockerConfig/v1 | ||
dockerConfigFile: "~/.docker/config.json" | ||
propagateConsumerIdentity: true | ||
``` | ||
Pointing to an existing Docker config json and configure two additional consumers | ||
for a Github repository and a Helm chart repository. | ||
Caching for OCM component versions is switched on. | ||
A key pair for signing / verifiying OCM component versions has been configured, too. | ||
```yaml | ||
type: generic.config.ocm.software/v1 | ||
configurations: | ||
- type: credentials.config.ocm.software | ||
consumers: | ||
- identity: | ||
type: HelmChartRepository | ||
hostname: my.repository.mycomp.com | ||
pathprefix: artifactory/myhelm-repo | ||
port: "443" | ||
credentials: | ||
- type: Credentials | ||
properties: | ||
username: myuser | ||
password: 8eYwL5Ru44L6ZySyLUcyP | ||
- identity: | ||
type: Github | ||
hostname: github.com | ||
credentials: | ||
- type: Credentials | ||
properties: | ||
token: ghp_QRP489abcd1234A9q3x17a8BlD42kabv65 | ||
repositories: | ||
- repository: | ||
type: DockerConfig/v1 | ||
dockerConfigFile: ~/.docker/config.json | ||
propagateConsumerIdentity: true | ||
- type: attributes.config.ocm.software | ||
attributes: | ||
cache: ~/.ocm/cache | ||
- type: keys.config.ocm.software | ||
privateKeys: | ||
sap.com: | ||
path: /Users/myuser/.ocm/keys/mycomp.com.key | ||
publicKeys: | ||
sap.com: | ||
path: /Users/myuser/.ocm/keys/mycomp.com.pub | ||
``` |
Oops, something went wrong.