Skip to content

Commit aa006f8

Browse files
committed
rename GLOCI_REGISTRY_TOKEN to GL_CLI_REGISTRY_TOKEN
1 parent c461e80 commit aa006f8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,23 @@ The process to push a Gardenlinux build-output folder to an OCI registry is spli
6363

6464
#### 1. Push layers + manifest
6565

66-
To push layers you have to supply the directory with the build outputs `--dir`. Also you have to supply cname (`--cname`), architecture `--arch` and version `--version` of the build. This information will be included in the manifest. You have to supply an endpoint where the artifacts shall be pushed to `--container`, for example `ghcr.io/gardenlinux/gardenlinux`. You can disable enforced HTTPS connections to your registry with `--insecure True`. You can supply `--cosign_file <filename>` if you want to have the hash saved in `<filename>`. This can be handy to read the hash later to sign the manifest with cosign. With `--manifest_file <filename>` you tell the program in which file to store the manifests index entry. This is the file that can be used in the next step to update the index. You can use the environment variable GLOCI_REGISTRY_TOKEN to authenticate against the registry. Below is an example of a full program call of `push-manifest`
66+
To push layers you have to supply the directory with the build outputs `--dir`. Also you have to supply cname (`--cname`), architecture `--arch` and version `--version` of the build. This information will be included in the manifest. You have to supply an endpoint where the artifacts shall be pushed to `--container`, for example `ghcr.io/gardenlinux/gardenlinux`. You can disable enforced HTTPS connections to your registry with `--insecure True`. You can supply `--cosign_file <filename>` if you want to have the hash saved in `<filename>`. This can be handy to read the hash later to sign the manifest with cosign. With `--manifest_file <filename>` you tell the program in which file to store the manifests index entry. This is the file that can be used in the next step to update the index. You can use the environment variable GL_CLI_REGISTRY_TOKEN to authenticate against the registry. Below is an example of a full program call of `push-manifest`
6767

6868
```bash
69-
GLOCI_REGISTRY_TOKEN=asdf123 gl-oci push-manifest --dir build-metal-gardener_prod --container ghcr.io/gardenlinux/gl-oci --arch amd64 --version 1592.1 --cname metal-gardener_prod --cosign_file digest --manifest_file oci_manifest_entry_metal.json
69+
GL_CLI_REGISTRY_TOKEN=asdf123 gl-oci push-manifest --dir build-metal-gardener_prod --container ghcr.io/gardenlinux/gl-oci --arch amd64 --version 1592.1 --cname metal-gardener_prod --cosign_file digest --manifest_file oci_manifest_entry_metal.json
7070
```
7171

7272
#### 2. Update index with manifest entry
7373

7474
Parameters that are the same as for `push-manifest`:
7575

76-
- env-var `GLOCI_REGISTRY_TOKEN`
76+
- env-var `GL_CLI_REGISTRY_TOKEN`
7777
- `--version`
7878
- `--container`
7979
- `--manifest-file` this time this parameter adjusts the manifest entry file to be read from instead of being written to
8080

8181
A full example looks like this:
8282

8383
```bash
84-
GLOCI_REGISTRY_TOKEN=asdf123 gl-oci update-index --container ghcr.io/gardenlinux/gl-oci --version 1592.1 --manifest_file oci_manifest_entry_metal.json
84+
GL_CLI_REGISTRY_TOKEN=asdf123 gl-oci update-index --container ghcr.io/gardenlinux/gl-oci --version 1592.1 --manifest_file oci_manifest_entry_metal.json
8585
```

src/python_gardenlinux_lib/oci/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def push_manifest(
5858
container_name = f"{container}:{version}"
5959
registry = GlociRegistry(
6060
container_name=container_name,
61-
token=os.getenv("GLOCI_REGISTRY_TOKEN"),
61+
token=os.getenv("GL_CLI_REGISTRY_TOKEN"),
6262
insecure=insecure,
6363
)
6464
digest = registry.push_from_dir(arch, version, cname, directory, manifest_file)
@@ -96,7 +96,7 @@ def update_index(container, version, manifest_folder, insecure):
9696
container_name = f"{container}:{version}"
9797
registry = GlociRegistry(
9898
container_name=container_name,
99-
token=os.getenv("GLOCI_REGISTRY_TOKEN"),
99+
token=os.getenv("GL_CLI_REGISTRY_TOKEN"),
100100
insecure=insecure,
101101
)
102102
registry.update_index(manifest_folder)

0 commit comments

Comments
 (0)