Skip to content

Releases: github/branch-deploy

v5.0.0

13 Mar 22:44
bce5fe1
Compare
Choose a tag to compare

v5.0.0

Environment Specific Locks 🌍 🔒

This release enables a long requested feature, environment locks!

Why?

Currently, there is only one type of lock and it is a global lock. If a user types .lock on a pull request (with this Action), that user will be the only user that can deploy to any environment. This is effectively a global deploy lock and can be quite hindering to teams with multiple deployment environments. For example, if user A comments .lock because they are doing a deployment to production, then user B cannot request a deployment to staging until the deployment lock is removed. This is less than ideal, and this pull request puts all that in the past

How?

The .lock mechanism in this Action is kind of a "neat hack" and has been since its first inception. There isn't really an ideal way of preserving state between two separate Actions. I thought it might be creative to see what sort of atomic operations exist on GitHub and found that a branch push is about the closest you can get. That is what the .lock mechanism first used and still uses with these changes. The main change though, is instead of all locks storing data in a single (kind of global) branch called branch-deploy-lock, it is now multiple branches -> <environment|global>-branch-deploy-lock. This allows for separate environments to be locked on their own and even support a new option for "globally" locking all environments in the project/repository

New Input Option 🆕

This pull request also adds a new input option for this Action -> global_lock_flag: <string>

The global_lock_flag is an optional input and defaults to --global. User's can pass in --global to lock/unlock command to set or remove a global lock which will block all available options.

Example: .lock --reason a major production incident is being investigated --global

Usage 💻

This section documents the new .lock, .unlock, and .wcid information:

.wcid is the shorthand alias for .lock --details - It means "where can I deploy"

  • .lock - locks the default environment
  • .lock <environment> - locks the designated environment
  • .unlock - unlocks the default environment
  • .unlock <environment> - unlocks the designated environment
  • .lock --global - Where --global is a string set by the user's config. If present, it locks all environments
  • .unlock --global - Where --global is a string set by the user's config. If present, it unlocks all environments
  • .wcid - checks if there is a deploy lock on the default environment
  • .wcid <environment> - checks if there is a deploy lock on the designated environment

It should be noted that if you use any commands such as .lock, .unlock, .lock --details, .wcid, etc without a specified environment, then they will use the whatever environment you have configured as the default in your Action's inputs. This value is usually production and you can see its definition here

Examples 📷

Here are some examples using these new options:

Lock

  • .lock <environment>
    • .lock production - Locks the production environment
    • .lock development - Locks the development environment
    • .lock production --reason something is broken -- Locks the production environment with a "reason"
    • .lock --global - Globally lock all available environments (--reason <text> works here too!)

Unlock

  • .unlock <environment>
    • .unlock production - Unlocks the production environment
    • .unlock development - Unlocks the development environment
    • .unlock --global - Globally unlock all available environments

Lock Details

  • .lock <environment> --details
    • .lock --details production - Check to see if there is a production lock and return it's details if it exists
    • .lock --details - Check to see if there is a "default environment" lock and return it's details if it exists
    • .lock --global --details - Check to see if there is a "global" lock and return it's details if it exists
    • .wcid <blank|environment|--global> - Shorthand alias for getting lock details

Note: .lock -d, .lock --details, .lock --d, .lock --info, .lock -i, .lock --i, and .wcid all do the same thing - source

Example Screenshots 📸

Cannot deploy due to a global deploy lock:

image

Locks now match useable environments:

image

Locks details now tell you have to "unlock" the lock that is blocking you:

image


Additional Changes

This pull request has additional changes backed into it as well!

  • Improved unit tests throughout the code base
  • Improved comment output onto pull requests created by this Action
  • Minor bug fixes
  • Improved documentation

⚠️ Breaking Changes

It should be noted that all existing locks for a project should be removed before upgrading to this release or you may have unexpected locking behavior.

What's Changed

Full Changelog: v4.6.1...v5.0.0

v4.6.1

12 Mar 22:36
f6b7faf
Compare
Choose a tag to compare

v4.6.1

What's Changed

Full Changelog: v4.6.0...v4.6.1

v4.6.0

07 Mar 17:43
244e514
Compare
Choose a tag to compare

v4.6.0

This release adds sha as a new output from this Action. The sha will always be present on the following types of interactions:

  • .deploy noop - noop deploys
  • .deploy - standard deploys
  • .deploy main - rollback deploys

What's Changed

Full Changelog: v4.5.2...v4.6.0

v4.5.2

07 Mar 15:06
c2a6b34
Compare
Choose a tag to compare

v4.5.2

What's Changed

Full Changelog: v4.5.1...v4.5.2

v4.5.1

06 Mar 21:22
5b490fd
Compare
Choose a tag to compare

v4.5.1

Adding better support for users on GHES by using environment variables to find the GitHub server URL rather than hardcoding https://github.com

What's Changed

Special Thanks

Thanks to @KevinMSampson for raising attention around GHES support.

Full Changelog: v4.5.0...v4.5.1

v4.5.0

02 Mar 11:25
0c7c257
Compare
Choose a tag to compare

v4.5.0

What's Changed

Full Changelog: v4.4.1...v4.5.0

v4.4.1

02 Mar 10:09
d182017
Compare
Choose a tag to compare

v4.4.1

What's Changed

Full Changelog: v4.4.0...v4.4.1

v4.4.0

27 Feb 11:20
cddb02d
Compare
Choose a tag to compare

v4.4.0

This release adds a new Action's input option (skip_completing) that allows for manual control of when and how deployment status are set by the user. This is an advanced option but will allow for further flexibility when using this Action.

What's Changed

New Contributors

Full Changelog: v4.3.0...v4.4.0

v4.3.0

15 Feb 14:48
e0b8fec
Compare
Choose a tag to compare

v4.3.0

Adds the .help command to the Action 🎉

The help command uses your Action's configuration to generate a dynamic help command output directly on your pull request so contributors know how to operate deployments through IssueOps.

What's Changed

Full Changelog: v4.2.1...v4.3.0

v4.2.1

15 Feb 12:08
4c16773
Compare
Choose a tag to compare
v4.2.1 Pre-release
Pre-release

v4.2.1

What's Changed

Full Changelog: v4.2.0...v4.2.1