How to retrieve the cloud foundry oauth token from a devops deploy stage for setting up auto scaling?
问题 I'm trying to get the cloud foundry oauth-token from a devops pipeline deploy stage: ... cf push $CF_APP ... accessToken=$(cf oauth-token | grep bearer | sed -e s/bearer/Bearer/g) echo accessToken=$accessToken ... # use token in Auto Scaling API call ... curl $createPolicyUrl -X 'PUT' -H 'Content-Type:application/json' \ -H 'Accept:application/json' \ -H "Authorization:$accessToken" \ --data-binary @${policyJson} \ -s -o response.txt -w '%{http_code}\n' The output from the echo command is: