8000
Skip to content

Latest commit

 

History

History
 
 

Release process

📝 Description

This repo contains some zx scripts to execute the different release steps for APIM.

It will allow you to run these pipeline on CircleCI:

  1. Release

  2. Package Zip

  3. Docker and RPMs

  4. Generate changelog

  5. Nexus Sync

🛠 Requirement

To run the scripts, you need to have:

  • Node.js >= 16.0.0 (configured in .nvmrc with v18.4.0)

  • zx, to install it you just have to run:

npm i -g zx
# Check everything is ok:
zx -v
  • A dotenv file containing the variable CIRCLECI_TOKEN, which is your personal token on CircleCI:

touch .env && echo "CIRCLECI_TOKEN=[YOUR_TOKEN]" > .env
  • Some dependencies to run the scripts, you can install them with:

# In the `release` folder
npm install

🏁 Usage

Thanks to package.json, you can run those scripts as simple npm commands (do not forget to use npm i before starting).

Each of the commands needs:

  • A CIRCLECI_TOKEN in .env file

  • the --version parameter

Optional flag:

  • --dry-run: allow to run the pipeline in dry run mode (except for nexus_sync which does not have this mode)

Each commands, when successful, will guide you to the next command to run, for example:

When it's done, run 'npm run nexus_sync -- --version=3.15.11'

Here are the steps to run to fully release APIM (Releasing 3.15.11, in the following example):

# 1. Release
npm run release -- --version=3.15.11
# 2. Zip
npm run package_zip -- --version=3.15.11
# 3. Docker & RPMS
# You can also provide the `--latest` parameter to flag the image as `latest`.
npm run docker_rpms -- --version=3.15.11
# 4. Changelog
npm run changelog -- --version=3.15.11
# 5. Nexus
npm run nexus_sync -- --version=3.15.11

🧪 Handle pre-version releases

To create a pre-version release (like alpha, beta, RC`, GA, …​), you just have to change the <sha1/> tag in pom.xml file.
This tag MUST be of the form: -NAME.VERSION (e.g. -alpha.1, -RC.3, …​)

    <!-- Version properties -->
    <revision>3.20.0</revision>
    <sha1>-alpha.1</sha1>
    <changelist>-SNAPSHOT</changelist>

Then, follow instructions of [Usage] with --version=3.20.0-alpha.1.
The version of the modifier will be automatically increased. (3.20.0-alpha.2 in the example above).

0