openshift / ocm-container

Containerized environment for accessing OpenShift v4 clusters, packing necessary tools/scripts
Apache License 2.0
10 stars 63 forks source link

handle better ocm-container config file creation #241

Closed T0MASD closed 9 months ago

T0MASD commented 9 months ago

when config not found, download one from upstream, promt for ocm token for 5min, if provided, update it and continue as normal

[tomas@ugnis ocm-container]$ rm ~/.config/ocm-container/env.source 
[tomas@ugnis ocm-container]$ ./ocm-container.sh 
Cannot find config file at /home/tomas/.config/ocm-container/env.source
Downloading sample config from upstream...
Paste your ocm token from https://cloud.redhat.com/openshift/token: dummy token ftw
Thanks, updating the sample config...

so the token is saved

[tomas@ugnis ocm-container]$ grep TOKEN ~/.config/ocm-container/env.source 
export OFFLINE_ACCESS_TOKEN="dummy token ftw"
clcollins commented 9 months ago

/lgtm

openshift-ci[bot] commented 9 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clcollins, T0MASD

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/ocm-container/blob/master/OWNERS)~~ [T0MASD,clcollins] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment