Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3560b9f
Simplify docker ignore config
jackfirth Nov 24, 2017
b9a59be
Explicitly set COMPOSE_PROJECT_NAME
jackfirth Nov 24, 2017
2f1683f
Add a Dockerfile for docker-compose-in-docker
jackfirth Nov 24, 2017
ea4aa55
Wrap test building and running inside a "test runner" service
jackfirth Nov 24, 2017
38629a9
Update travis configuration to use release tester
jackfirth Nov 24, 2017
185f28e
Change some names
jackfirth Nov 24, 2017
ab1441a
Simplify compose file naming
jackfirth Nov 24, 2017
36b0c85
Wrap in-place installation inside an "installer" service
jackfirth Nov 24, 2017
02fddd5
Add a downloader Dockerfile
jackfirth Nov 24, 2017
97b2a37
Remove unneeded test-runner env var
jackfirth Nov 24, 2017
fba47bd
Add installer service to root docker-compose config
jackfirth Nov 24, 2017
f6418ba
Make root docker-compose pass downloads to installer service
jackfirth Nov 24, 2017
e27a85f
Rely on installer to define what dirs are racket-owned
jackfirth Nov 24, 2017
9ae3765
Update travis config
jackfirth Nov 24, 2017
d680648
Try different fancy YAML syntax
jackfirth Nov 24, 2017
88b477b
Sigh
jackfirth Nov 24, 2017
8767053
Avoid running everything twice in Travis
jackfirth Nov 25, 2017
78c45fb
Remove broken default command
jackfirth Nov 25, 2017
3bbf61f
Simplify installer script with an alias for docker-compose
jackfirth Nov 25, 2017
a5c287c
Change and simplify x11 network config passing
jackfirth Nov 25, 2017
a49fc13
Remove unnecessary docker network and use default only
jackfirth Nov 25, 2017
3d83a55
Split tests into suites chosen by command argument
jackfirth Nov 25, 2017
b90461e
Run only non-gui tests in Travis for now
jackfirth Nov 25, 2017
876e101
Move installation to install section instead of script section
jackfirth Nov 25, 2017
bfb1dcf
Add GUI tests back to Travis
jackfirth Nov 25, 2017
2980dda
Update tested racket version
jackfirth Jan 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
**
!Dockerfile*
!test*.sh
.git
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

# From: /environments/snapshot.env

RACKET_VERSION=6.11.0.2
COMPOSE_PROJECT_NAME=racketrelease
RACKET_VERSION=6.11.0.6

RACKET_INSTALLER_HOST=www.cs.utah.edu
RACKET_INSTALLER_PATH_PREFIX=/plt/snapshots/current/installers
Expand Down
80 changes: 68 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,67 @@
sudo: required

# Test pushes to master and pull requests to master, but don't test other
# branches. Without this, pushing to a same-repository PR causes Travis to run
# everything twice.
branches:
only:
- "master"

env:
- INSTALLATION=racket-x86
- INSTALLATION=racket-x86-minimal
- |
INSTALLER_TYPE=linux-64-ospkg-full
INSTALLATION_TYPE=script-inplace
TEST_SUITE=nogui
- |
INSTALLER_TYPE=linux-64-ospkg-minimal
INSTALLATION_TYPE=script-inplace
TEST_SUITE=nogui
- |
INSTALLER_TYPE=linux-64-natipkg-full
INSTALLATION_TYPE=script-inplace
TEST_SUITE=nogui
- |
INSTALLER_TYPE=linux-64-natipkg-minimal
INSTALLATION_TYPE=script-inplace
TEST_SUITE=nogui
- |
INSTALLER_TYPE=linux-64-ospkg-full
INSTALLATION_TYPE=script-inplace
TEST_SUITE=gui
- |
INSTALLER_TYPE=linux-64-ospkg-minimal
INSTALLATION_TYPE=script-inplace
TEST_SUITE=gui
- |
INSTALLER_TYPE=linux-64-natipkg-full
INSTALLATION_TYPE=script-inplace
TEST_SUITE=gui
- |
INSTALLER_TYPE=linux-64-natipkg-minimal
INSTALLATION_TYPE=script-inplace
TEST_SUITE=gui
# Temporarily disabled due to Typed Racket GUI test failures related to
# extflonums and 32-bit builds, see racket/typed-racket#652
# - INSTALLATION=racket-i386
# - INSTALLATION=racket-i386-minimal
- INSTALLATION=racket-x86-natipkg
- INSTALLATION=racket-x86-natipkg-minimal
# - |
# INSTALLER_TYPE=linux-32-ospkg-full
# INSTALLATION_TYPE=script-inplace
# TEST_SUITE=nogui
# RACKET_BASE_IMAGE=i386/buildpack-deps:jessie
# - |
# INSTALLER_TYPE=linux-32-ospkg-minimal
# INSTALLATION_TYPE=script-inplace
# TEST_SUITE=nogui
# RACKET_BASE_IMAGE=i386/buildpack-deps:jessie
# - |
# INSTALLER_TYPE=linux-32-ospkg-full
# INSTALLATION_TYPE=script-inplace
# TEST_SUITE=gui
# RACKET_BASE_IMAGE=i386/buildpack-deps:jessie
# - |
# INSTALLER_TYPE=linux-32-ospkg-minimal
# INSTALLATION_TYPE=script-inplace
# TEST_SUITE=gui
# RACKET_BASE_IMAGE=i386/buildpack-deps:jessie

services:
- docker
Expand All @@ -19,13 +72,16 @@ before_install:
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
# We build these in before_install because they're prerequisite services and
# tools, not the installer itself
- docker-compose build docker-compose
- docker-compose build xvfb
- docker-compose build installer
- docker-compose build test-runner

install:
- docker-compose build ${INSTALLATION}
- docker-compose build ${INSTALLATION}-test
- docker-compose build ${INSTALLATION}-test-gui
- docker-compose build download-${INSTALLER_TYPE}
- docker-compose run installer ${INSTALLER_TYPE} ${INSTALLATION_TYPE}

script:
- docker-compose run ${INSTALLATION}
- docker-compose run ${INSTALLATION}-test
- docker-compose run ${INSTALLATION}-test-gui
- docker-compose run test-runner racket-${INSTALLER_TYPE}-${INSTALLATION_TYPE} ${TEST_SUITE}
4 changes: 4 additions & 0 deletions Dockerfile.compose
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM buildpack-deps:jessie

RUN curl -L https://github.com/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
RUN chmod +x /usr/local/bin/docker-compose
15 changes: 15 additions & 0 deletions Dockerfile.download
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM buildpack-deps:jessie-curl AS wget

ARG RACKET_VERSION
ARG RACKET_INSTALLER_PLATFORM
ARG RACKET_INSTALLER_DIST
ARG RACKET_INSTALLER_HOST
ARG RACKET_INSTALLER_PATH_PREFIX

ENV RACKET_INSTALLER_URL="https://${RACKET_INSTALLER_HOST}${RACKET_INSTALLER_PATH_PREFIX}/${RACKET_INSTALLER_DIST}-${RACKET_VERSION}-${RACKET_INSTALLER_PLATFORM}.sh"
RUN mkdir -p /usr/share/racket-download
RUN wget --quiet -O /usr/share/racket-download/installer ${RACKET_INSTALLER_URL}

FROM scratch

COPY --from=wget /usr/share/racket-download/installer /usr/share/racket-download/installer
34 changes: 0 additions & 34 deletions Dockerfile.installer

This file was deleted.

167 changes: 51 additions & 116 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
version: "3.2"

# To build and test everything from scratch: "docker-compose up --build"
# But this runs all tests --- including the memory-hungry db tests --- in
# parallel, causing OOMEs and subsequent container death on typical laptops.

services:

# TODO: This configuration is highly repetitive and should be made more
# abstract. This is likely best achieved with a "test runner container" that
# bind mounts the docker socket and calls the docker REST API from a script
# to programmatically build and test each combination of installater options.
# Doing this in Python would be relatively easy, since there's already an
# official and supported docker client python library.

# TODO: From-source builds aren't included yet, but they're not difficult to
# add. Neither are minimal-with-prebuilt-pkgs installations, unix-style
# installations, or tests for installation uninstall scripts. Doing this
Expand Down Expand Up @@ -69,43 +58,59 @@ services:
- novnc
- websockify

racket-x86:
image: racket-x86
docker-compose:
image: docker-compose
build:
context: .
dockerfile: Dockerfile.compose

installer:
build:
context: ./installer
dockerfile: Dockerfile.installer
args:
DOCKER_COMPOSE_IMAGE: docker-compose
environment:
RACKET_BASE_IMAGE: ${RACKET_BASE_IMAGE:-buildpack-deps:jessie}
INSTALLER_PATH: /usr/share/racket-download/installer
volumes:
- /var/run/docker.sock:/var/run/docker.sock

test-runner:
build:
context: ./test-runner
dockerfile: Dockerfile.test-runner
args:
DOCKER_COMPOSE_IMAGE: docker-compose
environment:
RACKET_TESTS_X11_DISPLAY: xvfb:0.0
RACKET_TESTS_X11_NETWORK: "${COMPOSE_PROJECT_NAME}_default"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- xvfb

download-linux-64-ospkg-full:
image: download-linux-64-ospkg-full
build:
context: .
dockerfile: Dockerfile.download
# We use a YAML anchor for the build args to set a common version,
# installer website, and installer path for building all installation
# service images. See racket-x86-minimal.build.args for an example of how
# the anchor is used.
# service images. See download-linux-64-ospkg-minimal.build.args for an
# example of how the anchor is used.
args: &default-build-args
RACKET_VERSION: "${RACKET_VERSION}"
RACKET_INSTALLER_HOST: "${RACKET_INSTALLER_HOST}"
RACKET_INSTALLER_PATH_PREFIX: "${RACKET_INSTALLER_PATH_PREFIX}"
RACKET_INSTALLER_PLATFORM: "${RACKET_PLATFORM_LINUX_64}"
RACKET_INSTALLER_DIST: "${RACKET_DIST_FULL}"
command: racket -e '(+ 1 2)'
racket-x86-test:
image: racket-x86-test
build:
context: .
dockerfile: Dockerfile.test
args:
RACKET_IMAGE: racket-x86
command: ["/bin/sh", "-c", "/usr/bin/racket-tests.sh"]
racket-x86-test-gui: &gui-test-service
image: racket-x86-test
environment:
DISPLAY: xvfb:0.0
depends_on:
- xvfb
command: ["/bin/sh", "-c", "/usr/bin/racket-gui-tests.sh"]

racket-x86-minimal:
image: racket-x86-minimal
download-linux-64-ospkg-minimal:
image: download-linux-64-ospkg-minimal
build:
context: .
dockerfile: Dockerfile.installer
dockerfile: Dockerfile.download
args:
# We import the default build args and overwrite the desired platform
# and distribution type. The platform defaults to x86_64 linux already
Expand All @@ -116,116 +121,46 @@ services:
<<: *default-build-args
RACKET_INSTALLER_PLATFORM: "${RACKET_PLATFORM_LINUX_64}"
RACKET_INSTALLER_DIST: "${RACKET_DIST_MINIMAL}"
command: racket -e '(+ 1 2)'
racket-x86-minimal-test:
image: racket-x86-minimal-test
build:
context: .
dockerfile: Dockerfile.test
args:
RACKET_IMAGE: racket-x86-minimal
command: ["/bin/sh", "-c", "/usr/bin/racket-tests.sh"]
racket-x86-minimal-test-gui:
<<: *gui-test-service
image: racket-x86-minimal-test

racket-i386:
image: racket-i386
download-linux-32-ospkg-full:
image: download-linux-32-ospkg-full
build:
context: .
dockerfile: Dockerfile.installer
dockerfile: Dockerfile.download
args:
<<: *default-build-args
# Base images changed to i386 variants, as using the default images
# won't compile due to architecture assumptions.
RACKET_IMAGE_FOR_INSTALLER: i386/buildpack-deps
RACKET_IMAGE_FOR_RUNTIME: i386/buildpack-deps
RACKET_INSTALLER_PLATFORM: "${RACKET_PLATFORM_LINUX_32}"
RACKET_INSTALLER_DIST: "${RACKET_DIST_FULL}"
command: racket -e '(+ 1 2)'
racket-i386-test:
image: racket-i386-test
build:
context: .
dockerfile: Dockerfile.test
args:
RACKET_IMAGE: racket-i386
command: ["/bin/sh", "-c", "/usr/bin/racket-tests.sh"]
racket-i386-test-gui:
<<: *gui-test-service
image: racket-i386-test

racket-i386-minimal:
image: racket-i386-minimal
download-linux-32-ospkg-minimal:
image: download-linux-32-ospkg-minimal
build:
context: .
dockerfile: Dockerfile.installer
dockerfile: Dockerfile.download
args:
<<: *default-build-args
RACKET_IMAGE_FOR_INSTALLER: i386/buildpack-deps
RACKET_IMAGE_FOR_RUNTIME: i386/buildpack-deps
RACKET_INSTALLER_PLATFORM: "${RACKET_PLATFORM_LINUX_32}"
RACKET_INSTALLER_DIST: "${RACKET_DIST_MINIMAL}"
command: racket -e '(+ 1 2)'
racket-i386-minimal-test:
image: racket-i386-minimal-test
build:
context: .
dockerfile: Dockerfile.test
args:
RACKET_IMAGE: racket-i386-minimal
command: ["/bin/sh", "-c", "/usr/bin/racket-tests.sh"]
racket-i386-minimal-test-gui:
<<: *gui-test-service
image: racket-i386-minimal-test

# TODO: Figure out why natipkg builds are failing. Seems to be related to
# problems with the libssl and libcrypto (OpenSSL libs) libs included in the
# racket-x86_64-linux-natipkg-2 package.

racket-x86-natipkg:
image: racket-x86-natipkg
download-linux-64-natipkg-full:
image: download-linux-64-natipkg-full
build:
context: .
dockerfile: Dockerfile.installer
dockerfile: Dockerfile.download
args:
<<: *default-build-args
RACKET_INSTALLER_PLATFORM: "${RACKET_PLATFORM_LINUX_NATIPKG_64}"
RACKET_INSTALLER_DIST: "${RACKET_DIST_FULL}"
command: racket -e '(+ 1 2)'
racket-x86-natipkg-test:
image: racket-x86-natipkg-test
build:
context: .
dockerfile: Dockerfile.test
args:
RACKET_IMAGE: racket-x86-natipkg
command: ["/bin/sh", "-c", "/usr/bin/racket-tests.sh"]
racket-x86-natipkg-test-gui:
<<: *gui-test-service
image: racket-x86-natipkg-test

racket-x86-natipkg-minimal:
image: racket-x86-natipkg-minimal
download-linux-64-natipkg-minimal:
image: download-linux-64-natipkg-minimal
build:
context: .
dockerfile: Dockerfile.installer
dockerfile: Dockerfile.download
args:
<<: *default-build-args
RACKET_INSTALLER_PLATFORM: "${RACKET_PLATFORM_LINUX_NATIPKG_64}"
RACKET_INSTALLER_DIST: "${RACKET_DIST_MINIMAL}"
command: racket -e '(+ 1 2)'
racket-x86-natipkg-minimal-test:
image: racket-x86-natipkg-minimal-test
build:
context: .
dockerfile: Dockerfile.test
args:
RACKET_IMAGE: racket-x86-natipkg-minimal
command: ["/bin/sh", "-c", "/usr/bin/racket-tests.sh"]
racket-x86-natipkg-minimal-test-gui:
<<: *gui-test-service
image: racket-x86-natipkg-minimal-test

volumes:
nginx-html:
Loading