The release process for these docker images is maintained on Docker Hub in the RStudio organization.
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 theMakefile
- 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
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
, andrstudio/rstudio-connect
images - These builds get the tag
latest
hooks/build
ensures that the appropriateRSP_VERSION
,RSPM_VERSION
orRSC_VERSION
gets used by the buildhooks/post_push
tags thelatest
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.
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!
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
- This script downloads and installs
test/goss.yaml
is mounted into the container to actually run the tests
Read more about goss in the manual.
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