Hi @nbialostosky
Many thanks for this solution! I almost got it to work. The curl "https://circleci.com/api/v1.1/project/${API_URL}?circle-token=${CIRCLECI_API_TOKEN}" | jq
part failed with this error : parse error: Invalid numeric literal at line 1, column 10
.
I observed that the curl output itself is not in valid json format. Is this the reason why this error showed up? I am really surprise seeing all of the gibberish below when I redirected curl
output to a file.
<!DOCTYPE html>
<html><head><title>Continuous Integration and Deployment</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"><meta content="width=device-width, initial-scale=1" name="viewport"><meta content="CircleCI" name="apple-mobile-web-app-title"><meta content="Hosted Continuous Integration for web applications. Set up your application for testing in one click, on the fastest testing platform on the internet." name="description"><link href="https://dmmj3mmt94rvw.cloudfront.net/favicon-undefined.ico" rel="icon" type="image/png"><link href="https://dmmj3mmt94rvw.cloudfront.net/assets/css/app-2aee31877418f72a53af30f3775829e4.css" rel="stylesheet" type="text/css"><script type="text/javascript">var circleEnvironment = "production";var circleHost = "circle-www-api-v1-57b68684b4-nb92n";var current_manifest_version_key = "frontend-releases/v3/3e3971eb539a.json";var segmentWriteKey = 'AbgkrlzMkHbwvrXnxHh35';var CSRFToken = 'k5XSJUk1-mIOV9vkJad1kVpUTcF1KXBujEkWV-xb168yGdvBqu';var OAuthCSRFToken = '1jkA-ONu6h521PRuVdZwWBV0uz4ixoIixe7K1fMWGFb8W03kye3ZBG';</script><meta content="{"assetsRoot":"https://dmmj3mmt94rvw.cloudfront.net","enterprise":false,"enabled_auth_providers":["github","bitbucket"],"analytics_enabled":true,"githubHttpEndpoint":"https://github.com","is_1_0_enabled":false,"enabled_code_providers":["github","bitbucket"],"support_email":"sayhi@circleci.com","support_enabled":false,"pusher":{"key":"1cf6e0e755e419d2ac9a"},"user_session_settings":null,"auth_protocol":"https","current_user":null,"zuora_urls":{"hosted_url":"https://www.zuora.com/apps/PublicHostedPageLite.do","signature_url":"https://api.zuora.com/rest/v1/rsa-signatures","script_url":"https://static.zuora.com/Resources/libs/hosted/1.3.0/zuora-min.js"},"status":404,"logging_enabled":false,"log_channels":false,"instrument":false,"bitbucketClientId":"4DMqkNUJUMcdfnFtDU","is_2_0_enabled":true,"githubClientId":"78a2ba87f071c28e65bb","env":"production","auth_host":null,"loginBannerMessage":null,"flash":null,"can_create_user":true,"stripePublishableKey":"pk_ZPBtv9wYtkUh6YwhwKRqL0ygAb0Q9"}" id="ec62bfa4-6436-41ba-8321-a86221c111ee" /><script type="text/javascript">var renderContext = JSON.parse(document.getElementById('ec62bfa4-6436-41ba-8321-a86221c111ee').content);</script><script async src="https://cdn.optimizely.com/js/14812510231.js" type="text/javascript"></script>
<script type="text/javascript">
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t,e){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="https://cdn.sment.cm/analyts.js/v1/"+t+"/analytics.min.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(n,a);analytics._loadOptions=e};analytics.SNIPPET_VERSION="4.1.0";
var optout = window.renderContext.current_user &&
window.renderContext.current_user.privacy_optout;
if (optout) {
analytics.load(segmentWriteKey, {
integrations: {
All: false,
Amplitude: true,
Postgres: true
}
});
} else {
analytics.load(segmentWriteKey);
}
}}();
</script>
<script src="//d3dy5gmtp8yhk7.cloudfront.net/2.2/pusher.min.js" type="text/javascript"></script><meta content="{"user":{"email":null,"name":null,"key":"","custom":{"organizations":[],"in_beta_program":null,"enrolled_betas":null,"free":true}},"client-id":"562fbc5f169cf106f1000015","flags":{"update-zuora-billing-info":false,"circle-11121-uncertified-orbs-allowed":true,"disable-performance-signup":false,"new-build-logs":false,"force-redirect-to-new-ui":false,"circle-6591-migrate-to-js-card":null,"project-cache-clear-buttons":null,"plan-overview-loading-override":false,"project-set-up-march-2019":"not-in-test","allow-interim-performance-chargify":false,"show-active-users":true,"org-usage-banners":true,"circle-13360-gh-checks":true,"free-check-in-execution-authorized":true,"eol-banners":true,"swap-authorized-event-names":true,"job-page-sort-by-repo-name-alphabetically":false,"orbs-enabled":true,"pipelines-opt-in-banner":true,"upgrade-alert-free-container-customers":true,"js-component-alerts":false,"plans-performance-overview":true,"billing-zuora":null,"upgrade-alert-paid-container-customers":true,"plan-share-web-ui":true,"open-pull-request":null,"projects-page":null,"github-student-pack":null,"plan-usage-web-ui":true,"import-env-vars":true,"plans-performance-usage":true,"audit":true,"offer-linux-trial":null,"setup-docs-ab-test":null,"web-ui-job-detail-opt-in":true,"insights-org-workflows-api":true,"log-invalid-routes":false,"plan-overview-web-ui":true,"paid-usage-upgrade-banner":true,"insights-direct-api-request-access":false,"usage-credits":true,"web-ui-auto-opt-in":true,"enterprise-ui":null,"job-page-rerun-workflow-from-failed":false}}" id="40727ad0-be6f-49e8-a6b9-0fb2931b5439" /><script type="text/javascript">var launchDarkly = JSON.parse(document.getElementById('40727ad0-be6f-49e8-a6b9-0fb2931b5439').content);</script><meta content="{"accessToken":"88e6275c49774d618916bfb4b4e13dfa","captureUncaught":true,"captureUnhandledRejections":true,"hostWhiteList":["dmmj3mmt94rvw.cloudfront.net","circleci.com"],"payload":{"environment":"production","client":{"javascript":{"code_version":"3e3971eb5e8d270ec6e77c07b0a750a96324539a"}}}}" id="948884a0-3bcd-45e1-87d8-9c20d5723a8d" /><script type="text/javascript">var _rollbarConfig = JSON.parse(document.getElementById('948884a0-3bcd-45e1-87d8-9c20d5723a8d').content);</script><script>!function(r){function o(n){if(e[n])return e[n].exports;var t=e[n]={exports:{},id:n,loaded:!1};return r[n].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}var e={};return o.m=r,o.c=e,o.p="",o(0)}([function(r,o,e){"use strict";var n=e(1),t=e(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://dmmj3mmt94rvw.cloudfront.net/assets/js/hosted/rollbar-4fcef5ccc29985d4878f2e7c5676180b.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,o,e){"use strict";function n(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}function t(r,o){this.options=r,this._rollbarOldOnError=null;var e=s++;this.shimId=function(){return e},window&&window._rollbarShims&&(window._rollbarShims[e]={handler:o,messages:[]})}function a(r,o){var e=o.globalAlias||"Rollbar";if("object"==typeof r[e])return r[e];r._rollbarShims={},r._rollbarWrappedError=null;var t=new p(o);return n(function(){o.captureUncaught&&(t._rollbarOldOnError=r.onerror,i.captureUncaughtExceptions(r,t,!0),i.wrapGlobals(r,t,!0)),o.captureUnhandledRejections&&i.captureUnhandledRejections(r,t,!0);var n=o.autoInstrument;return(void 0===n||n===!0||"object"==typeof n&&n.network)&&r.addEventListener&&(r.addEventListener("load",t.captureLoad.bind(t)),r.addEventListener("DOMContentLoaded",t.captureDomContentLoaded.bind(t))),r[e]=t,t})()}function l(r){return n(function(){var o=this,e=Array.prototype.slice.call(arguments,0),n={shim:o,method:r,args:e,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)})}var i=e(2),s=0,d=e(3),c=function(r,o){return new t(r,o)},p=d.bind(null,c);t.prototype.loadFull=function(r,o,e,t,a){var l=function(){var o;if(void 0===r._rollbarDidLoad){o=new Error("rollbar.js did not load");for(var e,n,t,l,i=0;e=r._rollbarShims[i++];)for(e=e.messages||[];n=e.shift();)for(t=n.args||[],i=0;i<t.length;++i)if(l=t[i],"function"==typeof l){l(o);break}}"function"==typeof a&&a(o)},i=!1,s=o.createElement("script"),d=o.getElementsByTagName("script")[0],c=d.parentNode;s.crossOrigin="",s.src=t.rollbarJsUrl,e||(s.async=!0),s.onload=s.onreadystatechange=n(function(){if(!(i||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){s.onload=s.onreadystatechange=null;try{c.removeChild(s)}catch(r){}i=!0,l()}}),c.insertBefore(s,d)},t.prototype.wrap=function(r,o,e){try{var n;if(n="function"==typeof o?o:function(){return o||{}},"function"!=typeof r)return r;if(r._isWrap)return r;if(!r._rollbar_wrapped&&(r._rollbar_wrapped=function(){e&&"function"==typeof e&&e.apply(this,arguments);try{return r.apply(this,arguments)}catch(e){var o=e;throw"string"==typeof o&&(o=new String(o)),o._rollbarContext=n()||{},o._rollbarContext._wrappedSource=r.toString(),window._rollbarWrappedError=o,o}},r._rollbar_wrapped._isWrap=!0,r.hasOwnProperty))for(var t in r)r.hasOwnProperty(t)&&(r._rollbar_wrapped[t]=r[t]);return r._rollbar_wrapped}catch(o){return r}};for(var u="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleUnhandledRejection,captureDomContentLoaded,captureLoad".split(","),f=0;f<u.length;++f)t.prototype[u[f]]=l(u[f]);r.exports={setupShim:a,Rollbar:p}},function(r,o){"use strict";function e(r,o,e){if(r){var t;"function"==typeof o._rollbarOldOnError?t=o._rollbarOldOnError:r.onerror&&!r.onerror.belongsToShim&&(t=r.onerror,o._rollbarOldOnError=t);var a=function(){var e=Array.prototype.slice.call(arguments,0);n(r,o,t,e)};a.belongsToShim=e,r.onerror=a}}function n(r,o,e,n){r._rollbarWrappedError&&(n[4]||(n[4]=r._rollbarWrappedError),n[5]||(n[5]=r._rollbarWrappedError._rollbarContext),r._rollbarWrappedError=null),o.handleUncaughtException.apply(o,n),e&&e.apply(r,n)}function t(r,o,e){if(r){"function"==typeof r._rollbarURH&&r._rollbarURH.belongsToShim&&r.removeEventListener("unhandledrejection",r._rollbarURH);var n=function(r){var e=r.reason,n=r.promise,t=r.detail;!e&&t&&(e=t.reason,n=t.promise),o&&o.handleUnhandledRejection&&o.handleUnhandledRejection(e,n)};n.belongsToShim=e,r._rollbarURH=n,r.addEventListener("unhandledrejection",n)}}function a(r,o,e){if(r){var n,t,a="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(n=0;n<a.length;++n)t=a[n],r[t]&&r[t].prototype&&l(o,r[t].prototype,e)}}function l(r,o,e){if(o.hasOwnProperty&&o.hasOwnProperty("addEventListener")){for(var n=o.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(o,e,t){n.call(this,o,r.wrap(e),t)};t._rollbarOldAdd=n,t.belongsToShim=e,o.addEventListener=t;for(var a=o.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,o,e){a.call(this,r,o&&o._rollbar_wrapped||o,e)};l._rollbarOldRemove=a,l.belongsToShim=e,o.removeEventListener=l}}r.exports={captureUncaughtExceptions:e,captureUnhandledRejections:t,wrapGlobals:a}},function(r,o){"use strict";function e(r,o){this.impl=r(o,this),this.options=o,n(e.prototype)}function n(r){for(var o=function(r){return function(){var o=Array.prototype.slice.call(arguments,0);if(this.impl[r])return this.impl[r].apply(this.impl,o)}},e="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleUnhandledRejection,_createItem,wrap,loadFull,shimId,captureDomContentLoaded,captureLoad".split(","),n=0;n<e.length;n++)r[e[n]]=o(e[n])}e.prototype._swapAndProcessMessages=function(r,o){this.impl=r(this.options);for(var e,n,t;e=o.shift();)n=e.method,t=e.args,this[n]&&"function"==typeof this[n]&&("captureDomContentLoaded"===n||"captureLoad"===n?this[n].apply(this,[t[0],e.ts]):this[n].apply(this,t));return this},r.exports=e},function(r,o){"use strict";r.exports=function(r){return function(o){if(!o&&!window._rollbarInitialized){r=r||{};for(var e,n,t=r.globalAlias||"Rollbar",a=window.rollbar,l=function(r){return new a(r)},i=0;e=window._rollbarShims[i++];)n||(n=e.handler),e.handler._swapAndProcessMessages(l,e.messages);window[t]=n,window._rollbarInitialized=!0}}}}]);
</script></head><noscript><h1>Hello there noscripter!</h1><p>CircleCI uses JavaScript pretty heavily to provide a good experience and to allow us to develop code a lot faster. We recognize that the tradeoff is that people using noscript get a worse experience, and we apologize for that.</p><p>So let us pitch you quickly on why you should enable JavaScript and view our site. CircleCI is <b>powerful, fast, and easy-to-use Continuous Integration and Deployment</b> for web applications.</p><p>CircleCI is easy to set up, incredibly fast, allows you to get your code to customers faster, and will even automatically parallelize your tests over many machines to get results to you faster. If that sounds useful, we'd encourage you to whitelist us in noscript and read about it yourself :)</p></noscript><body><div id="app"></div><script crossorigin="anonymous" src="https://dmmj3mmt94rvw.cloudfront.net/assets/js/frontend-production-5ab8a5e94b7618dc5c0e4a9a98e2afcb.js" type="text/javascript"></script>
<script id="ze-snippet" async src="https://static.zdaets.com/ekr/snippet.js?key=d6a46f2f-d5c089096bfe3"> </script>
The job step is to run terraform plan