Skip to content

Commit

Permalink
feat(docker): Create Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
hypery2k committed Oct 4, 2017
1 parent 8893dae commit 694998d
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ after_success: npm run coverage && cat ./coverage/lcov.info | coveralls

env:
matrix:
- NODE_VERSION="4" NPM_VERSION="3"
- NODE_VERSION="5" NPM_VERSION="3"
- NODE_VERSION="5" NPM_VERSION="3"
- NODE_VERSION="6" NPM_VERSION="3"
- NODE_VERSION="6" NPM_VERSION="4"
- NODE_VERSION="7" NPM_VERSION="3"
- NODE_VERSION="7" NPM_VERSION="4"
- NODE_VERSION="4" NPM_VERSION="3" DISPLAY=:99
- NODE_VERSION="5" NPM_VERSION="3" DISPLAY=:99
- NODE_VERSION="5" NPM_VERSION="3" DISPLAY=:99
- NODE_VERSION="6" NPM_VERSION="3" DISPLAY=:99
- NODE_VERSION="6" NPM_VERSION="4" DISPLAY=:99
- NODE_VERSION="7" NPM_VERSION="3" DISPLAY=:99
- NODE_VERSION="7" NPM_VERSION="4" DISPLAY=:99
- NODE_VERSION="8" NPM_VERSION="5" DISPLAY=:99

addons:
# From some tests it seems you can only have one firefox addon.
Expand All @@ -23,6 +24,9 @@ addons:
packages:
- google-chrome-stable
- google-chrome-beta
cache:
directories:
- "node_modules"

script:
- export COVERALLS_SERVICE_NAME=travis-ci
Expand All @@ -42,10 +46,8 @@ script:
- npm run coverage
- ./runTests.sh
before_install:
- sudo apt-get update -qq
- wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
- source ~/.nvm/nvm.sh && nvm install $NODE_VERSION && nvm use $NODE_VERSION
# Build Tools
# Prepare node and npm
- nvm install $NODE_VERSION && nvm use $NODE_VERSION
- npm install -g npm@$NPM_VERSION
# Show environment info
- node --version
Expand All @@ -55,7 +57,6 @@ before_script:
- npm install -g istanbul
- npm install -g istanbul-coveralls
- npm install -g nodeunit
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
notifications:
webhooks:
Expand Down
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM selenium/standalone-chrome

ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 6.11.4
ENV GALEN_VERSION 2.3.5
ENV TEST_HOME /var/jenkins_home

# Install nvm with node and npm
RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default \
&& npm install -g galenframework-cli@$GALEN_VERSION

VOLUME /var/test_scripts

ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/v$NODE_VERSION/bin:$PATH
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@ The [core](core/) module is just the node wrapper for [Galen](http://galenframew
The [cli](cli/) module is a command line module for [Galen](http://galenframework.com). This includes the core above and webdriver downloads for different browsers.

[![Join the chat at https://gitter.im/hypery2k/galenframework-cli](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hypery2k/galenframework-cli?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=15642797)](https://www.bountysource.com/trackers/15642797-hypery2k-galenframework-cli?utm_source=15642797&utm_medium=shield&utm_campaign=TRACKER_BADGE) [![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=mreinhardt&url=https://github.com/hypery2k/galenframework-cli&title=badges&language=&tags=github&category=software)

##<a name="docker"> Docker

### Usage


```
docker run -v ./test/galen/specs:/var/test_scripts -it galen test ... galenframework/runtime
```
5 changes: 5 additions & 0 deletions docker-build-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

source ./docker-env.sh

docker-compose create
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '2'
services:
galenframework:
image: galenframework/runtime:$GALEN_VERSION
build:
context: .
dockerfile: Dockerfile
3 changes: 3 additions & 0 deletions docker-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

export GALEN_VERSION=2.3.5

0 comments on commit 694998d

Please sign in to comment.