Skip to content

Latest commit

 

History

History
111 lines (84 loc) · 3.72 KB

RELEASE.md

File metadata and controls

111 lines (84 loc) · 3.72 KB

Release Process

The release process for these docker images is maintained on Docker Hub in the RStudio organization.

Updating Product Versions

Each product has a .env file in its folder. This file is used to specify the version number for building / tagging images.

To update the version for the rstudio/rstudio-server-pro image, for instance:

  • update the RSP_VERSION number in the Makefile
  • run make update-versions
  • submit a PR
  • the next build on master will tag the image with the appropriate version number

For RStudio Connect, edit RSC_VERSION

For RStudio Package Manager, edit RSPM_VERSION

IMPORTANT NOTE: The "default" ARG value in the respective Dockerfile has no effect on the build process

Building Images on Docker Hub

Images are built automatically from the master branch on Docker Hub.

These builds are configured in the Docker Hub UI.

On new commits to master:

  • Builds are initiated for rstudio/rstudio-server-pro, rstudio/rstudio-package-manager, and rstudio/rstudio-connect images
  • These builds get the tag latest
  • hooks/build ensures that the appropriate RSP_VERSION, RSPM_VERSION or RSC_VERSION gets used by the build
  • hooks/post_push tags the latest build with the appropriate version as well

More advanced build specifications are articulated here.

We also want to thank this article for the inspiration behind our tagging process.

Test the Docker Hub hooks

The hooks are just bash scripts, so they can be tested locally. Let's take server-pro for example. The following commands will test these scripts locally. You just have to set the appropriate environment variables yourself. Details are in the section above on what env vars dockerhub sets.

cd ./server-pro
DOCKER_TAG=daily ./hooks/pre_build
DOCKERFILE_PATH=Dockerfile IMAGE_NAME=test ./hooks/build
# post_build will fail interactively because you cannot push tags to the repository

NOTE: There is a difference between GNU bash operations and those on Mac (i.e. sed). You have been warned!

Testing PRs on Docker Hub

All PRs go through the Autotest setup on Docker Hub.

  • Each folder has a docker-compose.test.yml file that orchestrates the test
  • The test/run_tests.sh script is mounted into the container and run
    • This script downloads and installs goss
  • test/goss.yaml is mounted into the container to actually run the tests

Read more about goss in the manual.

Testing Locally

It is possible to test locally from a product directory by using:

# from ./server-pro
docker-compose -f docker-compose.test.yml up

If you want to write goss tests, dgoss simplifies the process.

  • install dgoss locally
  • run the following to create tests interactively:
# from ./server-pro
GOSS_PATH=/path/to/local/goss GOSS_FILES_PATH=./test dgoss edit -it -e RSP_VERSION=1.2.5001-3 rstudio/sol-eng-rstudio:1.2.5001-3

# once in the container
/bin/bash		# shell of preference?
goss validate
goss add --help
  • to run the test suite as-is
# from ./server-pro
GOSS_PATH=/path/to/local/goss GOSS_FILES_PATH=./test dgoss run -it -e RSP_VERSION=1.2.5001-3 rstudio/sol-eng-rstudio:1.2.5001-3