{"componentChunkName":"component---src-templates-doc-tsx","path":"/product/releases/release-automation/circleci/","result":{"data":{"file":{"id":"d6224817-b21b-59fc-86ed-ef9c6665bbdd","relativePath":"product/releases/release-automation/circleci/index.mdx","sourceInstanceName":"docs","childMarkdownRemark":null,"childMdx":{"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"CircleCI\",\n  \"redirect_from\": [\"/workflow/releases/release-automation/circleci/\"]\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar CodeTabs = makeShortcode(\"CodeTabs\");\nvar CodeBlock = makeShortcode(\"CodeBlock\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"This guide walks you through the process of automating Sentry release management and deploy notifications in CircleCI. After deploying in CircleCI, you'll be able to identify suspect commits that are likely the culprit for new errors. You'll also be able to apply source maps to see the original code in Sentry.\"), mdx(\"p\", null, \"Before starting, confirm that your Sentry project is properly set up to track commit metadata by \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"/product/releases/#install-repo-integration\"\n  }), \"installing a repository integration\"), \". Once that's installed, and you've added your repository, come back to this guide. If you've already installed a repository integration, you're ready to go.\"), mdx(\"h2\", {\n    \"id\": \"create-a-sentry-internal-integration\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#create-a-sentry-internal-integration\",\n    \"aria-label\": \"create a sentry internal integration permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Create a Sentry Internal Integration\"), mdx(\"p\", null, \"For CircleCI to communicate securely with Sentry, you'll need to create a new internal integration. In Sentry, navigate to \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Settings > Developer Settings > New Internal Integration\"), \".\"), mdx(\"p\", null, \"Give your new integration a name (for example, \\u201CCircleCI Deploy Integration\\u201D) and specify the necessary permissions. In this case, you need Admin access for \\u201CRelease\\u201D and Read access for \\u201COrganization\\u201D.\"), mdx(\"p\", null, \"For more details about scopes and API endpoints, see the full documentation on \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"/api/permissions/\"\n  }), \"API Permissions\"), \".\"), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1200px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/7db283b3cefe98abc19cc2a421bc17a4/aa440/internal-integration-permissions.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"50.66666666666667%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAIAAAA7N+mxAAAACXBIWXMAAAsSAAALEgHS3X78AAAA4klEQVQoz3VR7ZIDIQjb93/Tm961q66IIHrBdlr7xeSHAwRC3C7ncPr5o8yV5QouD1RWqbpmHmDZYogpHq01FXWojiW4MKrWrFtfgUxrtlEuXKqIb9Dq/NHHDWNUrjkT+l6iediWDypUnHOPJ7IcyXV9IKttMR6zbE1dOSStZMjG8g6lH8nYHPZIBHMUe17IYNKUvQIHq67kPMlVUFgNQwa6vhqWYv49nUHGMLkZjqkOs14IvyffZSeKe0KHuuEi86vxgGDMxgNn23v4ATAspP0SZlPFtvEcpTAaXMU89Y6rtH+Qw0u0ckR40QAAAABJRU5ErkJggg==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"View of internal integration permissions.\",\n    \"title\": \"View of internal integration permissions.\",\n    \"src\": \"/static/7db283b3cefe98abc19cc2a421bc17a4/c1b63/internal-integration-permissions.png\",\n    \"srcSet\": [\"/static/7db283b3cefe98abc19cc2a421bc17a4/5a46d/internal-integration-permissions.png 300w\", \"/static/7db283b3cefe98abc19cc2a421bc17a4/0a47e/internal-integration-permissions.png 600w\", \"/static/7db283b3cefe98abc19cc2a421bc17a4/c1b63/internal-integration-permissions.png 1200w\", \"/static/7db283b3cefe98abc19cc2a421bc17a4/aa440/internal-integration-permissions.png 1500w\"],\n    \"sizes\": \"(max-width: 1200px) 100vw, 1200px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\"\n  })), \"\\n  \"), \"\\n    \")), mdx(\"p\", null, \"Click \\\"Save\\\", then record your token, which you'll need in the next section.\"), mdx(\"h2\", {\n    \"id\": \"setting-environment-variables-in-circleci\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#setting-environment-variables-in-circleci\",\n    \"aria-label\": \"setting environment variables in circleci permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Setting Environment Variables in CircleCI\"), mdx(\"p\", null, \"Next, you'll need a few environment variables to configure the Sentry CLI:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"SENTRY_AUTH_TOKEN\"), \"\\xA0- Your\\xA0internal integration token\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"SENTRY_ORG\"), \"\\xA0- Your Sentry organization slug\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"SENTRY_PROJECT\"), \"\\xA0- Your Sentry project slug\")), mdx(\"p\", null, \"To access your internal integration token securely, store it as an \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-project\"\n  }), \"environment variable on your project\"), \":\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"In the CircleCI application, go to your project\\u2019s settings by clicking the gear icon on the Pipelines page, or the three dots on other pages in the application.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Click on Environment Variables.\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Add a new variable by clicking the \\\"Add Variable\\\" button and enter \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"SENTRY_AUTH_TOKEN\"), \" as the name and your internal integration token as the value.\")), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1200px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/636f7846ab2fc6e13ffe70c42c4a1616/93ba6/project-settings-env-var.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"36.66666666666667%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAIAAACHqfpvAAAACXBIWXMAAAsSAAALEgHS3X78AAAAwElEQVQY021QSw6DIBTk/qfohXoCFywsxESKkqrg42MHiMTGzuLlfYcZGOe86zopZYzxuCDdUPvTNI3jiLjvOwshtAHu5wKllHPu+IcrHVuWRWvtvUeBYyFE3/dCSNCrE8ixdidixphhGLBBRLj/FCAHHRXUpLIDISbrI2I+XtcVBqoeRKjFaisBay2slU4uX4YeT83f2RSDb8iu47oKhdu2wUK9R6fRZWspOQrk8z6DHozbV7cHr5/8++fpOGV8AXnomMt3KoeIAAAAAElFTkSuQmCC')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"View of CircleCI environment variables.\",\n    \"title\": \"View of CircleCI environment variables.\",\n    \"src\": \"/static/636f7846ab2fc6e13ffe70c42c4a1616/c1b63/project-settings-env-var.png\",\n    \"srcSet\": [\"/static/636f7846ab2fc6e13ffe70c42c4a1616/5a46d/project-settings-env-var.png 300w\", \"/static/636f7846ab2fc6e13ffe70c42c4a1616/0a47e/project-settings-env-var.png 600w\", \"/static/636f7846ab2fc6e13ffe70c42c4a1616/c1b63/project-settings-env-var.png 1200w\", \"/static/636f7846ab2fc6e13ffe70c42c4a1616/d61c2/project-settings-env-var.png 1800w\", \"/static/636f7846ab2fc6e13ffe70c42c4a1616/97a96/project-settings-env-var.png 2400w\", \"/static/636f7846ab2fc6e13ffe70c42c4a1616/93ba6/project-settings-env-var.png 2874w\"],\n    \"sizes\": \"(max-width: 1200px) 100vw, 1200px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\"\n  })), \"\\n  \"), \"\\n    \")), mdx(\"p\", null, \"The other variables do not contain sensitive information, so you'll use the environment key to define them as environment variables in your config.yml file.\"), mdx(\"h2\", {\n    \"id\": \"create-release-and-notify-sentry-of-deployment\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#create-release-and-notify-sentry-of-deployment\",\n    \"aria-label\": \"create release and notify sentry of deployment permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Create Release and Notify Sentry of Deployment\"), mdx(\"p\", null, \"To automate your Sentry release management process, you'll need to add the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Create release and notify Sentry of deploy\"), \" step below after your deploy step, either in a new job or at the end of your existing deploy job:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"yaml\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"yaml\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-yaml\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-yaml\"\n  }), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"notify-sentry-deploy\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \"\\n  \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"executor\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \"\\n  \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token comment\"\n  }), \"# Specify executor for running deploy job\"), \"\\n  \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"environment\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"SENTRY_ORG\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \" sample\", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"-\"), \"organization\", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"-\"), \"slug\\n    \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"SENTRY_PROJECT\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \" sample\", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"-\"), \"project\", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"-\"), \"slug\\n    \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"SENTRY_ENVIRONMENT\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \" production\\n  \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"steps\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"-\"), \" checkout\\n    \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token comment\"\n  }), \"# ...\"), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"-\"), \" \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"run\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \"\\n        \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"name\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \" Create release and notify Sentry of deploy\\n        \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"command\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \" \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \"|\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token scalar string\"\n  }), \"\\n          curl -sL https://sentry.io/get-cli/ | bash\\n          export SENTRY_RELEASE=$(sentry-cli releases propose-version)\\n          sentry-cli releases new -p $SENTRY_PROJECT $SENTRY_RELEASE\\n          sentry-cli releases set-commits $SENTRY_RELEASE --auto\\n          sentry-cli releases files $SENTRY_RELEASE upload-sourcemaps path-to-sourcemaps-if-applicable\\n          sentry-cli releases finalize $SENTRY_RELEASE\\n          sentry-cli releases deploys $SENTRY_RELEASE new -e $SENTRY_ENVIRONMENT\"))))))), mdx(\"p\", null, \"For more details about the release management concepts in the snippet above, see the full documentation on \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"/product/cli/releases/\"\n  }), \"release management\"), \".\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Notes\"), \":\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"If you\\u2019re not deploying a JavaScript project or have sent source maps to Sentry using another method, omit the\\xA0\", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"upload-sourcemaps\"), \"\\xA0line.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"If you can\\u2019t install a repository integration, send commit metadata via the \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"/product/releases/#alternatively-without-a-repository-integration\"\n  }), \"create release endpoint\"), \" or omit the\\xA0\", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"set-commits\"), \"\\xA0line.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"sentry-cli releases propose-version\"), \"\\xA0defaults to the commit SHA of the commit being deployed. To set this to a different version, modify\\xA0\", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"SENTRY_RELEASE\"), \"\\xA0to the preferred version.\")));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#create-a-sentry-internal-integration","title":"Create a Sentry Internal Integration"},{"url":"#setting-environment-variables-in-circleci","title":"Setting Environment Variables in CircleCI"},{"url":"#create-release-and-notify-sentry-of-deployment","title":"Create Release and Notify Sentry of Deployment"}]},"internal":{"type":"Mdx"}}}},"pageContext":{"excerpt":"This guide walks you through the process of automating Sentry release management and deploy notifications in CircleCI. After deploying in CircleCI, you'll be able to identify suspect commits that are likely the culprit for new errors. You'll also be able to apply source maps to see the original code in Sentry. Before starting, confirm that your Sentry project is properly set up to track commit metadata by  installing a repository integration . Once that's installed, and you've added your repository, come back to this guide. If you've already installed a repository integration, you're ready to go. Create a Sentry Internal Integration For CircleCI to communicate securely with Sentry, you'll need to create a new internal integration. In Sentry, navigate to  Settings > Developer Settings > New Internal Integration . Give your new integration a name (for example, “CircleCI Deploy Integration”) and specify the necessary permissions. In this case, you need Admin access for “Release” and Read access for “Organization”. For more details about scopes and API endpoints, see the full documentation on  API Permissions . Click \"Save\", then record your token, which you'll need in the next section. Setting Environment Variables in CircleCI Next, you'll need a few environment variables to configure the Sentry CLI: SENTRY_AUTH_TOKEN  - Your internal integration token SENTRY_ORG  - Your Sentry organization slug SENTRY_PROJECT  - Your Sentry project slug To access your internal integration token securely, store it as an  environment variable on your project : In the CircleCI application, go to your project’s settings by clicking the gear icon on the Pipelines page, or the three dots on other pages in the application. Click on Environment Variables. Add a new variable by clicking the \"Add Variable\" button and enter  SENTRY_AUTH_TOKEN  as the name and your internal integration token as the value. The other variables do not contain sensitive information, so you'll use the environment key to define them as environment variables in your config.yml file. Create Release and Notify Sentry of Deployment To automate your Sentry release management process, you'll need to add the  Create release and notify Sentry of deploy  step below after your deploy step, either in a new job or at the end of your existing deploy job: For more details about the release management concepts in the snippet above, see the full documentation on  release management . Notes : If you’re not deploying a JavaScript project or have sent source maps to Sentry using another method, omit the  upload-sourcemaps  line. If you can’t install a repository integration, send commit metadata via the  create release endpoint  or omit the  set-commits  line. sentry-cli releases propose-version  defaults to the commit SHA of the commit being deployed. To set this to a different version, modify  SENTRY_RELEASE  to the preferred version.","title":"CircleCI","description":null,"draft":null,"noindex":null,"notoc":null,"sidebar_order":null,"redirect_from":["/workflow/releases/release-automation/circleci/"],"keywords":null,"id":"d6224817-b21b-59fc-86ed-ef9c6665bbdd","legacy":false}},"staticQueryHashes":["1218203755","1222113826","1222113826","1766336459","2158593473","2764967025","3345802723","3818502851","3990806462","4015007367","4192517163","4264099332","518019976"]}