Skip to content

Commit

Permalink
fix(KFLUXSPRT-794): pass content-gateway token as env var (#334)
Browse files Browse the repository at this point in the history
- Change name of CGW_TOKEN to CGW_PASSWORD
  - This is actually a token, no pw, but the pubtools library expects
    this environment variable name
- No longer pass token with command invocation

Signed-off-by: Scott Wickersham <[email protected]>
  • Loading branch information
swickersh authored Dec 4, 2024
1 parent daea8c0 commit 50b8874
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions developer-portal-wrapper/developer_portal_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
DEFAULT_DATE_FMT = "%Y-%m-%d %H:%M:%S %z"
CGW_ENV_VARS_STRICT = (
"CGW_USERNAME",
"CGW_TOKEN",
"CGW_PASSWORD",
)

WORKSPACE_DIR = "/tmp"
Expand Down Expand Up @@ -181,20 +181,14 @@ def main():

LOG.info(f"YAML content dumped to {METADATA_FILE_PATH}")
cgw_username = os.getenv("CGW_USERNAME")
cgw_token = os.getenv("CGW_TOKEN")
main_command = "push-cgw-metadata"
common_args = [
"--CGW_filepath",
METADATA_FILE_PATH,
"--CGW_hostname",
cgw_hostname,
]
cred_args = [
"--CGW_username",
cgw_username,
"--CGW_password",
cgw_token,
]
cred_args = ["--CGW_username", cgw_username]
command = [main_command] + common_args
cmd_str = " ".join(command)
command += cred_args
Expand Down

0 comments on commit 50b8874

Please sign in to comment.