npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

octopus-deploy-release-promoter

v0.1.0

Published

npm package for helping with deploying releases to different environments

Downloads

4

Readme

Octopus Deploy Release Promoter

This module aims to make Octopus release promotion easier.

npm install --save octopus-deploy-release-promoter

# or

yarn add octopus-deploy-release-promoter

In Octopus Deploy, releases are created and then deployed to an environment. If your lifecycle has multiple environments, you may see a button in the UI saying "Promote release to {environment}...".

What does this actually mean? There's nothing special to it, which confused me at first. It's just deploying the same release to a different environment.

Pretty simple eh?

When to use this?

Let's say you have a project that has a lifecycle with different environments. You've created a release in your "QA/Continuous" environment, but now it's time to promote it to the "Stable/Production" environment.

You don't want to have to do the manual work of finding the latest release ID every time, inserting it, and then running a script. You just want to deploy the latest release in your project to this new environment.

All you'll need to do is below:

const OctopusReleasePromoter = require('octopus-deploy-release-promoter');

const config = {
    host: 'https://deploy.mycompany.com',
    apiKey: 'ABC-123' // This is used to authorize against the REST Api
};

const promoter = new OctopusReleasePromoter(config);

// this will find the latest release on your project
// and deploy it to the environment provided
promoter.promoteRelease({
  environmentId: 'Environment-101',
  projectId: 'project-id-or-slug'
});

When not to use this?

If you have a release ID and an environment ID, and all you're looking to do is deploy that release to an new environment, I suggest using this octopus depoy npm package.

All you'll need to do is below:

const OctoDeployApi = require('octopus-deploy');

const environmentId = 'Environment-101';
const releaseId = 'Release-101';
const config = {
    host: 'https://deploy.mycompany.com',
    apiKey: 'ABC-123' // This is used to authorize against the REST Api
};

const client = new OctoDeployApi(config);

client.deployment.create(environmentId, releaseId);

This can be done using this module as well. It would look like below:

const OctopusReleasePromoter = require('octopus-deploy-release-promoter');

const config = {
    host: 'https://deploy.mycompany.com',
    apiKey: 'ABC-123' // This is used to authorize against the REST Api
};

const promoter = new OctopusReleasePromoter(config);

// this will find the latest release on your project
// and deploy it to the environment provided
promoter.promoteRelease({
  environmentId: 'Environment-101',
  releaseId: 'Release-101'
});

Next Feature

At the moment, this will deploy the latest release even if it's currently on the designated environment. I'm hoping to add a feature that will figure out if the latest release is already on that environment or not. If it is, then we will give a nice little message that it's already that and not trigger a deployment.