3.1.0 • Published 7 months ago

@eclass/semantic-release-sentry-releases v3.1.0

Weekly downloads
241
License
MIT
Repository
github
Last release
7 months ago

@eclass/semantic-release-sentry-releases

npm Node.js CI downloads Libraries.io dependency status for latest release Coverage Status Maintainability semantic-release

semantic-release plugin to create releases in sentry

StepDescription
verifyConditionsVerify the presence of the SENTRY_AUTH_TOKEN SENTRY_ORG and SENTRY_PROJECT environment variable.
publishCreate release and deploy in sentry project.

Install

npm i -D @eclass/semantic-release-sentry-releases

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git",
    "@semantic-release/gitlab",
    "@eclass/semantic-release-sentry-releases"
  ]
}

Configuration

Environment variables

VariableDescription
SENTRY_AUTH_TOKENThe authentication token with permission for releases created in profile or as internal integration in developer settings of organization. Need scopes release:admin. Optional org:read to get valid repository name from sentry integration
SENTRY_ORGThe slug of the organization.
SENTRY_PROJECTThe slug of the project.
SENTRY_URLThe URL to use to connect to sentry. This defaults to https://sentry.io/.
SENTRY_ENVIRONMENTThe environment to specify with this release. This defaults to production.
DEPLOY_STARTSentry deploy start timestamp. Optional for deploy
DEPLOY_ENDSentry deploy end timestamp. Optional for deploy

Options

VariableDescription
projectThe slug of the project. Optional. Required if not present in environment variables
orgThe slug of the organization. Optional. Required if not present in environment variables
urlThe URL to use to connect to sentry. Optional to set an on-premise instance
repositoryUrlA valid repository name for add link to commits of new release in sentry format. Optional. Ex: 'myorg / myapp'. Default repository property in package.json, or git origin url. Try recovery repository name from sentry api https://docs.sentry.io/api/organizations/list-an-organizations-repositories/
tagsUrlA valid url for add link to new release. Optional. Ex: https://github.com/owner/repo/releases/tag/vx.y.z
environmentSentry environment. Optional for deploy. Default production
deployNameDeploy name. Optional for deploy
deployUrlDeploy url. Optional for deploy
sourcemapsDirectory with sourcemaps. Example dist. Optional for upload sourcemaps
urlPrefixURL prefix for sourcemaps. Example ~/dist. Optional for upload sourcemaps
rewriteBoolean to indicate rewrite sourcemaps. Default false. Optional for upload sourcemaps
releasePrefixString that is passed as prefix to the sentry release. Optional to fix the problem that releases are associated with the organization instead of the project (Read More). Ex: releasePrefix:"web1" would resolve only the sentry release to web1-1.0.0. Important Notice: when you use this feature you also have to change the release name in your sentry client app.

| pathToGitFolder | Path to .git folder, relative to the current working directory. Optional. Defaults to current working directory |

Examples

{
  "plugins": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git",
    "@semantic-release/gitlab",
    [
      "@eclass/semantic-release-sentry-releases",
      {
        "repositoryUrl": "myorg / myapp",
        "tagsUrl": "https://github.com/owner/repo/releases/tag/"
      }
    ]
  ]
}

Upload sourcemaps

{
  "plugins": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git",
    "@semantic-release/gitlab",
    [
      "@semantic-release/exec",
      {
        "prepareCmd": "npm run build"
      }
    ],
    [
      "@eclass/semantic-release-sentry-releases",
      {
        "repositoryUrl": "myorg / myapp",
        "tagsUrl": "https://github.com/owner/repo/releases/tag/",
        "sourcemaps": "dist",
        "urlPrefix": "~/dist"
      }
    ]
  ]
}
# .gitlab-ci.yml
release:
  image: node:alpine
  stage: release
  script:
    - npx semantic-release
  only:
    - master
# .travis.yml
language: node_js
cache:
  directories:
    - ~/.npm
node_js:
  - '12'
stages:
  - test
  - name: deploy
    if: branch = master
jobs:
  include:
    - stage: test
      script: npm t
    - stage: deploy
      script: npx semantic-release

License

MIT

3.1.0

7 months ago

3.0.0

2 years ago

2.11.0

3 years ago

2.10.1

3 years ago

2.10.0

3 years ago

2.9.1

3 years ago

2.9.0

3 years ago

2.8.0

3 years ago

2.7.0

4 years ago

2.6.1

4 years ago

2.5.0

4 years ago

2.6.0

4 years ago

2.4.8

4 years ago

2.4.7

4 years ago

2.4.6

4 years ago

2.4.5

4 years ago

2.4.4

4 years ago

2.4.3

4 years ago

2.4.2

4 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.3.3

4 years ago

2.3.2

4 years ago

2.3.0

4 years ago

2.3.1

4 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago