Skip to content
This repository has been archived by the owner on Feb 26, 2018. It is now read-only.

Latest commit

 

History

History
79 lines (59 loc) · 2.5 KB

PUBLISHING.md

File metadata and controls

79 lines (59 loc) · 2.5 KB

Publishing the rhel7-s2i-nodejs images to Docker Hub

When there is a new release of Node.js, these images need to be updated. Follow these steps to publish. In all cases, you should have DOCKER_USER and DOCKER_PASS defined in your environment.

$ export DOCKER_USER=lanceball
$ export DOCKER_PASS=xxxxxxxxx

Updating node versions

You will need command line tools to update releases.json, which contains metadata about each of the available release versions; and image-streams.rhel7.json, which provides metadata for OpenShift integration of these builder images in the OpenShift user interface.

First install the node tools.

$ npm install -g node-metadata
$ npm install -g node-image-stream

And a nice json formatter called jq.

Then use these tools to update the relevant files. Follow the commands outlined below.

node-metadata -i 4 5 6 7 8 | jq '.' > releases.json # Write release metadata to disk
node-image-stream -f releases.json -i bucharestgold/rhel7-s2i-nodejs > image-streams.rhel7.json # write image stream data
git add releases.json image-streams.rhel7.json
git commit -a -m "(chore): update node versions"

Note that these files are kept up to date in the master branch, but any changes made here should be cherry-picked into the branch being updated.

New major version

If there is a new major version released, we'll need to create a new branch for it. The master branch is always tracking the latest Node.js version, so let's start there. Node 8 is released.

# update with any changes not present locally
git pull origin master

# Add the new version number in the readme and Makefile
# NODE_VERSION=8.0.0
# NPM_VERSION=5.0.0
# IMAGE_TAG=8.x
vi README.md Makefile

# Make sure nothing broke
make all

# Then make the docker image tags and publish
make tag publish

# We've published the new release under the 'latest' tag.
# Commit and push that to github, then deal with the new branch.
git commit -a -m "(chore) release 8.x version"
git push origin master

# Now create the 8.x branch. Make sure all is good and publish to
# Docker hub.
git checkout -b 8.x
make tag publish

# The 8.x branch has all the commits we need
# right now, since we just made those changes on master.
# Just tag it with the node version and push.
git tag -s node-8.0.0 -m "Node.js 8.0.0 release"
git push origin 8.x --follow-tags

Don't forget the git tags. These are important and allow us to roll back to any previously published version if necessary!