Skip to content

Commit

Permalink
Merge pull request #3 from AtidaTech/release-0.1.2
Browse files Browse the repository at this point in the history
Release 0.1.2
  • Loading branch information
fciacchi committed Nov 1, 2023
2 parents d70a0fd + 8cd70a6 commit 174fd34
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bun add contentful-cli-release

### Requirements

* `node` >= 18
* `node` >= 18.0.0
* `npm` >= 9.5.0
* `contentful-management` >= 7.50.0
* [contentful-lib-helpers](https://www.npmjs.com/package/contentful-lib-helpers) >= 0.3.0
Expand Down Expand Up @@ -115,7 +115,7 @@ Arguments:
- `--from`: The name of the source environment to duplicate from. Ie: 'master'.
- `--to`: The name of the destination environment to duplicate to. Ie: 'release-1.7.4' or 'staging'.
- `--update-api-key`: It will enable, for the duplicated environment, the CDA API Key that has the same name of the
source environment (so, for environment 'master', the CDA API Key should be also called 'master').
source environment (so, for environment 'master', the CDA API Key should be also called 'master').

> See the section [🎹 Usage](#-usage) for details on the command line options.
Expand Down Expand Up @@ -436,6 +436,8 @@ for both.

#### 1. Promoting 'staging' to production

![Promote 'staging' strategy](./images/release-strategy-1.gif)

A common way of releasing is to promote a staging Environment to production, by duplicating staging into the new
master. Let's see how we could use `contentful-cli-release` and the other tools to do a release, starting from these
environments:
Expand Down Expand Up @@ -481,6 +483,8 @@ present in case of a rollback operation.

#### 2. Release with only have 3 environments (Community)

![Release with 3 environments](./images/release-strategy-2.gif)

As many developers that start with a free tier of Contentful, it is possible to use the Releases process also with
'only' 3 Environments. In this case we need to use 2 real Environments (`dev` and `staging`) and a release Environment
that is aliased by `master`.
Expand Down Expand Up @@ -530,6 +534,8 @@ a 'staging' CDA API Key, separated from the 'master' one.

#### 3. Create a new Release from existing 'master'

![Create a new Release](./images/release-strategy-3.gif)

This is somehow the most complex, but also the most reliable way of performing a release.

The starting scenario is something like this
Expand Down Expand Up @@ -587,6 +593,9 @@ Environments look like:
- Environment 'dev'
```

> You can also have a look at the official Contentful article
[Deploying changes with environment aliases](https://www.contentful.com/developers/docs/tutorials/general/deploying-changes-with-environment-aliases/)

### Integrating with your CI/CD

The following are **examples** of how you could integrate what we said in your GitLab or GitHub CI/CD pipeline.
Expand Down
Binary file added images/release-strategy-1.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/release-strategy-2.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/release-strategy-3.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "contentful-cli-release",
"version": "0.1.1",
"version": "0.1.2",
"type": "module",
"description": "Contentful CLI Release tool",
"homepage": "https://github.com/AtidaTech/contentful-cli-release",
Expand Down

0 comments on commit 174fd34

Please sign in to comment.