Open bogdanrn opened 2 years ago
circleci context store-secret github my-org my-context my-env <<< "production"
CircleCI CLI Version: 0.1.19666+830e7ff (release)
Operating System: Mac OS 12.4
CircleCI CLI Diagnostic:
--- CircleCI CLI Diagnostics --- Debugger mode: false Config found: /Users/bogdan/.circleci/cli.yml API host: https://circleci.com API endpoint: graphql-unstable OK, got a token. Trying an introspection query on API... Ok. Hello, Bogdan Radu.
circleci context store-secret github my-org my-context MY_ENV <<< "production"
$MY_ENV will be set as production,
production,
$MY_ENV should be production not production,
production
before upgrading cli to version 0.1.19666+830e7ff (release) it worked as expcted
I was using a node script to call the context updater
#!/usr/bin/env node const { execSync } = require("child_process"); const config = { MY_ENV: 'production', MY_FIRST_VAR: 'TEST-1' } const contextName = 'myContext'; const orgName = 'myOrg'; for (key in config) { const value = config[key]; console.log(`Setting key ${contextName}[${key}]=${value}`); try { const cmd = `circleci context store-secret github ${orgName} ${contextName} ${key} <<< "${value}"`; console.log(execSync(cmd).toString()); } catch (error) { console.log( `Key: ${key} Status Code: ${error.status} with '${error.message}'` ); } }
I do wonder if circleci team responds to those bugs at all. This issue has been in the issue tracker for 2 years and we have just lost a day investigating the source of weirdest failures.
Meta:
circleci context store-secret github my-org my-context my-env <<< "production"
CircleCI CLI Version: 0.1.19666+830e7ff (release)
Operating System: Mac OS 12.4
CircleCI CLI Diagnostic:
Current behavior:
circleci context store-secret github my-org my-context MY_ENV <<< "production"
$MY_ENV will be set as
production,
Expected behavior:
$MY_ENV should be
production
notproduction,
When did this begin / Was this previously working?:
before upgrading cli to version 0.1.19666+830e7ff (release) it worked as expcted
Additional Information:
I was using a node script to call the context updater