Skip to content

Commit f29cd90

Browse files
committed
add travis build script
1 parent 06d824c commit f29cd90

14 files changed

Lines changed: 69 additions & 17 deletions

.travis.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
language: bash
2+
services: docker
3+
4+
env:
5+
global:
6+
- PROJECT=node
7+
- NAMESPACE=makeomatic
8+
- PUSH_NAMESPACES=makeomatic
9+
- BASE_NAME=makeomatic/node
10+
11+
install:
12+
- curl -sSL https://github.com/makeomatic/ci-scripts/raw/master/install.sh | sh -s
13+
- git clone https://github.com/docker-library/official-images.git ~/official-images
14+
15+
before_script:
16+
- |
17+
export PATH=$PATH:~/ci-scripts
18+
[ ${TRAVIS_BRANCH} == master ] && \
19+
export variant="latest" || \
20+
export variant=${TRAVIS_BRANCH}
21+
script:
22+
- |
23+
# build base node images that are used further in the project
24+
docker-build -v "${variant}" $BASE_NAME -f node/Dockerfile . || exit $?
25+
docker-build -v "${variant}-onbuild" $BASE_NAME -f node/Dockerfile.onbuild . || exit $?
26+
docker-build -v "${variant}-tester" $BASE_NAME -f node/Dockerfile.tester . || exit $?
27+
docker-build -v "${variant}-tester-glibc" $BASE_NAME -f node/Dockerfile.tester-glibc . || exit $?
28+
# build node images with ruby
29+
docker-build -v "${variant}-ruby" $BASE_NAME -f node-ruby/Dockerfile . || exit $?
30+
# build node images with ssh embedded
31+
docker-build -v "${variant}-ssh" $BASE_NAME -f node-ssh/Dockerfile . || exit $?
32+
docker-build -v "${variant}-ssh-onbuild" $BASE_NAME -f node-ssh/Dockerfile.onbuild . || exit $?
33+
# build node images with libvips
34+
docker-build -v "${variant}-vips" $BASE_NAME -f node-vips/Dockerfile . || exit $?
35+
docker-build -v "${variant}-vips-onbuild" $BASE_NAME -f node-vips/Dockerfile.onbuild . || exit $?
36+
docker-build -v "${variant}-vips-tester-glibc" $BASE_NAME -f node-vips/Dockerfile.tester-glibc . || exit $?
37+
# build node images with libvips & ssh
38+
docker-build -v "${variant}-vips-ssh" $BASE_NAME -f node-vips-ssh/Dockerfile . || exit $?
39+
docker-build -v "${variant}-vips-ssh-onbuild" $BASE_NAME -f node-vips-ssh/Dockerfile.onbuild . || exit $?
40+
41+
after_success:
42+
- |
43+
# Check if not PR and namespace (org or user) is in the push list PUSH_NAMESPACES.
44+
[ "${TRAVIS_PULL_REQUEST}" = "false" ] && ( echo "${PUSH_NAMESPACES}" | grep -qw "${TRAVIS_REPO_SLUG%/*}" )
45+
[ $? -eq 0 ] || exit 0
46+
# List of newly created images
47+
export images=$(docker images | grep "^$BASE_NAME" | tr -s '[:space:]' | cut -f1,2 -d' ' | sed 's/ /:/')
48+
# Push to docker when DEPLOY is true
49+
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
50+
for image in $images; do docker push $image; done
51+
after_script:
52+
- docker images

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
Contains the following base images:
44

55
* node versions:
6-
- 6.5.0
7-
- 6.5.0-ssh (with openssh installed)
8-
- 6.5.0-vips (with libvips installed)
9-
- 6.5.0-vips-ssh (ssh+vips)
10-
- 6.5.0-ruby (with ruby 2.3.1 installed)
6+
- 6.7.0
7+
- 6.7.0-ssh (with openssh installed)
8+
- 6.7.0-vips (with libvips installed)
9+
- 6.7.0-vips-ssh (ssh+vips)
10+
- 6.7.0-ruby (with ruby 2.3.1 installed)
1111

1212
* rabbitmq:
1313
- 3.5.7 + autoclustering and many other plugins

node-ruby/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM alpine:3.4
22

3-
ENV NODE_VERSION=v6.5.0 \
3+
ENV NODE_VERSION=v6.7.0 \
44
NPM_VERSION=3 \
55
NODE_HOME=/usr/local \
66
RUBY_MAJOR=2.3 \

node-ssh/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM alpine:3.4
22

3-
ENV NODE_VERSION=v6.5.0 \
3+
ENV NODE_VERSION=v6.7.0 \
44
NPM_VERSION=3 \
55
NODE_HOME=/usr/local
66

node-ssh/Dockerfile.onbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM makeomatic/node:6.5.0-ssh
1+
FROM makeomatic/node:6.7.0-ssh
22

33
# copy stuff in
44
ONBUILD WORKDIR /src

node-vips-ssh/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM alpine:3.4
22

3-
ENV NODE_VERSION=v6.5.0 \
3+
ENV NODE_VERSION=v6.7.0 \
44
NPM_VERSION=3 \
55
NODE_HOME=/usr/local
66

node-vips-ssh/Dockerfile.onbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM makeomatic/node:6.5.0-vips-ssh
1+
FROM makeomatic/node:6.7.0-vips-ssh
22

33
ONBUILD WORKDIR /src
44

node-vips/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM alpine:3.4
22

3-
ENV NODE_VERSION=v6.5.0 \
3+
ENV NODE_VERSION=v6.7.0 \
44
NPM_VERSION=3.9.6 \
55
NODE_HOME=/usr/local
66

node-vips/Dockerfile.onbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM makeomatic/node:6.5.0-vips
1+
FROM makeomatic/node:6.7.0-vips
22

33
ONBUILD WORKDIR /src
44

node-vips/Dockerfile.tester-glibc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM makeomatic/node:6.5.0-vips
1+
FROM makeomatic/node:6.7.0-vips
22

33
ENV GLIBC_VER 2.23-r3
44

0 commit comments

Comments
 (0)