2.0.0 • Published 4 years ago

amu-releaser v2.0.0

Weekly downloads
8
License
UNLICENSED
Repository
bitbucket
Last release
4 years ago

AMU RELEASER

This is a util to automatically setup your project for use with Release-It and the custom plugins we've created for it.

Prerequisites

Currently, in order to take advantage of this utility your project must have a jira project associated with it, configured to use sentry cloud, and must have a package.json.

JIRA

Put all your JIRAs that are intended to be released and deployed in the next cycle in a release called "FUTURE_VERSION"

Install

Add the package as a dev dependency to your project:

NPM: npm install amu-releaser -D

Yarn: yarn add amu-releaser -D

Run amu-releaser init

This will generate a config file for release-it and add Release-It to your project's devDependencies. Commit and push these changes to your repo.

Add the following lines to your sentry-raven config:

if Rails.env.production?
  # Reads the package.json for the version in production
  config.release = `node -p -e "require('./package.json').version"`
end

Add the following jenkinsfile pipeline to your project's repo:

library 'jenkins-shared-library'

releasePipeline(image: 'andrewsmcmeeluniversal/amu-img:4.0.0',
                changeLevel: "${env.CHANGE_LEVEL}")

Create a release job in Jenkins.

See The Far Side for an example.

Add the following environment variables with the appropriate values to either your .env if you want to run this locally or to the Jenkins job's "properties content" under "Prepare an environment for the run" (See The Far Side's configuration) .

  • SENTRY_ORG
  • SENTRY_AUTH_TOKEN
  • SENTRY_PROJECT
  • JIRA_API_EMAIL
  • JIRA_API_TOKEN
  • JIRA_PROJECT_KEY
  • JIRA_HOST

Usage in Jenkins

After finishing the setup, you will be able to manually run the "release" job. Setting the change_level to either major, minor, or patch will determine what the version is incremented to.

The pipeline will:

  • update the "FUTURE_VERSION" release in jira to the new version
  • transition all jiras in that version to resolved
  • update the version in the package.json in a new commit to the production branch
  • create a tag
  • create the release in sentry and associate the relevant commits with it
2.0.0

4 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago