/build

Docker image used to build the Cucumber Project

Primary LanguageDockerfileMIT LicenseMIT

Build

Cucumber Build

Docker image used to build and release projects in the Cucumber organization.

Usage

In a cucumber project use the cucumber/cucumber-build:TAG image to build and/or release. You'll find available tags at Docker Hub.

Building the image

make

Processor Architecture

By default, the make script will build just for your local host machine's processor architecture, but you can try building for multiple platforms by specifying the PLATFORMS environment variable.

Before doing this, make sure you've started a multi-platform builder:

docker buildx create --use

Now try running the build with multiple platforms, e.g.

PLATFORMS=linux/arm64,linux/amd64 make

Publishing a new version of the image

The Docker image is published to a public dockerhub repository via an automated Continuous Deployment workflow running off a protected release branch.

To make a release, you make a pull request to the release branch, and wait for a member of the @cucumber/build team to merge it.

Here's the steps in detail:

  1. Make sure you have set up a GPG key - all commits to the release branch must be signed.

  2. Choose a version number, using semantic versioning.

    echo "What's the version number you want to release?"
    read VERSION
    
  3. Update the version number in the release.yaml workflow.

  4. Update the CHANGELOG.md file, adding your changes in a section beneath the new release number.

  5. Commit your changes

    git checkout main
    git add . && git commit -S -m "Prepare to release v$VERSION"
    git push
    
  6. Create a branch for the release, squashing the commits into a single commit, signed by you: (this is in case any of the commits you're releasing were not signed).

    git checkout release
    git checkout -b release-$VERSION
    git merge --squash main
    git commit -S -m "Release v$VERSION"
    git push --set-upstream origin release-$VERSION
    
  7. Submit a pull request to the protected release branch. You need to install the GitHub CLI tool, gh.

    gh pr create --title "📦 Release v$VERSION" --body "See diff for details." --base release --head release-$VERSION
    
  8. Wait for a member of the @cucumber/build team to merge your change which will trigger an automatic release.